Media
Allow users to share device media with your custom JavaScript code.
Select or take a pictureβ
Ask the user to open the camera to take a picture or select a picture from the gallery.
Argumentsβ
Name
Type
Required
Default
Notes
maxHeight
number
-
maxWidth
number
-
quality
number
-
Value between 1 and 100, controls compression level
showCameraOption
boolean
-
showGalleryOption
boolean
-
Errorsβ
Here is a list of errors that can be thrown when calling this function in addition to generic errors:
Error Code
Description
OPERATION_CANCELLED
The user cancelled the operation.
UNKNOWN_ERROR
An error occurred while opening the camera or gallery, for example, the user may have denied permission
Last updated