capacitor-camera-module
v0.0.40
Published
Plugin to request permissiones view camera take phots
Readme
capacitor-camera-module
Plugin to request permissiones view camera take phots
Install
npm install capacitor-camera-module
npx cap syncAPI
echo(...)checkPermission()requestPermission()checkAndRequestPermission()getCameraCapabilities()startPreview()stopPreview()toggleFlash(...)hasFlash()checkGalleryPermission()requestGalleryPermission()checkAndRequestGalleryPermission()pickImageBase64()getLastGalleryImage()takePhotoBase64()startBarcodeScan()stopBarcodeScan()- Interfaces
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
| ------------- | ------------------------------- |
| options | { value: string; } |
Returns: Promise<{ value: string; }>
checkPermission()
checkPermission() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
requestPermission()
requestPermission() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
checkAndRequestPermission()
checkAndRequestPermission() => Promise<PermissionStatus>Returns: Promise<PermissionStatus>
getCameraCapabilities()
getCameraCapabilities() => Promise<CameraCapabilities>Returns: Promise<CameraCapabilities>
startPreview()
startPreview() => Promise<void>stopPreview()
stopPreview() => Promise<void>toggleFlash(...)
toggleFlash(enable: boolean) => Promise<void>| Param | Type |
| ------------ | -------------------- |
| enable | boolean |
hasFlash()
hasFlash() => Promise<boolean>Returns: Promise<boolean>
checkGalleryPermission()
checkGalleryPermission() => Promise<PermissionResult>Returns: Promise<PermissionResult>
requestGalleryPermission()
requestGalleryPermission() => Promise<PermissionResult>Returns: Promise<PermissionResult>
checkAndRequestGalleryPermission()
checkAndRequestGalleryPermission() => Promise<PermissionResult>Returns: Promise<PermissionResult>
pickImageBase64()
pickImageBase64() => Promise<PickImageBase64Result>Returns: Promise<PickImageBase64Result>
getLastGalleryImage()
getLastGalleryImage() => Promise<LastGalleryImageResult>Returns: Promise<LastGalleryImageResult>
takePhotoBase64()
takePhotoBase64() => Promise<takephotoBase64Result>Returns: Promise<takephotoBase64Result>
startBarcodeScan()
startBarcodeScan() => Promise<startBarcodeScanResult>Returns: Promise<startBarcodeScanResult>
stopBarcodeScan()
stopBarcodeScan() => Promise<void>Interfaces
PermissionStatus
| Prop | Type |
| ------------- | -------------------------------------------------------------------------------------- |
| granted | boolean |
| status | 'granted' | 'denied' | 'prompt' | 'prompt-with-rationale' | 'limited' |
| details | string |
CameraCapabilities
| Prop | Type |
| --------------------- | -------------------- |
| hasCamera | boolean |
| isSecureContext | boolean |
| userAgent | string |
PermissionResult
| Prop | Type |
| ------------- | ---------------------------------------------- |
| granted | boolean |
| status | 'granted' | 'denied' | 'prompt' |
| details | string |
PickImageBase64Result
| Prop | Type |
| -------------- | ------------------- |
| base64 | string |
| mimeType | string |
LastGalleryImageResult
| Prop | Type |
| ------------ | ------------------- |
| base64 | string |
takephotoBase64Result
| Prop | Type |
| -------------- | ------------------- |
| base64 | string |
| mimeType | string |
startBarcodeScanResult
| Prop | Type |
| -------------- | ------------------- |
| rawValue | string |
| format | number |
