Import
Methods
getPhoto()
Capture a photo using the device camera. Opens the native camera app for photo capture.Optional configuration options for photo capture
A pending photo capture instance for fluent configuration
PhotoTaken or PhotoCancelled events.
pickImages()
Open the device gallery to select images and/or videos.Type of media to allow:
'image', 'video', or 'all'Allow multiple selection
Maximum number of items when multiple=true
A pending media picker instance for fluent configuration
MediaSelected event.
recordVideo()
Record a video using the device camera. Opens the native camera app for video recording.Optional recording options (e.g.,
maxDuration)A pending video recorder instance for fluent configuration
VideoRecorded or VideoCancelled events.
PendingPhotoCapture Methods
id()
Set a unique identifier for this photo capture to correlate with events.Unique identifier
getId()
Get the photo capture’s unique identifier.event()
Set a custom event class to dispatch when photo capture completes.Fully qualified event class name
remember()
Store the photo capture ID in session for retrieval in event handlers.lastId()
Retrieve the last remembered photo capture ID from session.start()
Explicitly start the photo capture (automatically called if not invoked).PendingVideoRecorder Methods
id()
Set a unique identifier for this video recording.getId()
Get the video recorder’s unique identifier.event()
Set a custom event class.remember()
Store the video recorder ID in session.lastId()
Retrieve the last remembered video recorder ID.maxDuration()
Set the maximum recording duration in seconds.Maximum duration in seconds
start()
Explicitly start the video recording.PendingMediaPicker Methods
id()
Set a unique identifier for this media picker.getId()
Get the media picker’s unique identifier.event()
Set a custom event class.mediaType()
Set the type of media to pick.'image', 'video', or 'all'images()
Only allow image selection.videos()
Only allow video selection.all()
Allow both images and videos (default).multiple()
Allow multiple media selection.Enable multiple selection
Maximum items to select
single()
Only allow single media selection (default).remember()
Store the media picker ID in session.lastId()
Retrieve the last remembered media picker ID.start()
Explicitly start the media picker.Events
PhotoTaken
Dispatched when a photo is successfully captured. Properties:path(string) - File path to the captured photomimeType(string) - MIME type (default: ‘image/jpeg’)id(string|null) - Tracking ID if set
PhotoCancelled
Dispatched when photo capture is cancelled. Properties:cancelled(bool) - Always trueid(string|null) - Tracking ID if set
VideoRecorded
Dispatched when a video is successfully recorded. Properties:path(string) - File path to the recorded videomimeType(string) - MIME type (default: ‘video/mp4’)id(string|null) - Tracking ID if set
VideoCancelled
Dispatched when video recording is cancelled. Properties:cancelled(bool) - Always trueid(string|null) - Tracking ID if set
MediaSelected
Dispatched when media is selected from the gallery. Properties:success(bool) - Whether selection succeededfiles(array) - Array of selected file informationcount(int) - Number of files selectederror(string|null) - Error message if failedcancelled(bool) - Whether user cancelledid(string|null) - Tracking ID if set
PermissionDenied
Dispatched when camera permission is denied. Properties:action(string) - The attempted action: ‘photo’ or ‘video’id(string|null) - Tracking ID if set