capacitor-plugin-multi-camera
多功能相机,预览、百度OCR、人脸检测等功能
Install
npm install capacitor-plugin-multi-camera
npx cap sync
API
startPreview(...)
startPreview(options: StartOption) => Promise<void>
stopPreview()
stopPreview() => Promise<void>
flip()
flip() => Promise<void>
capture(...)
capture(options: CaptureOption) => Promise<CaptureResult>
Returns: Promise<CaptureResult>
startFaceDetection()
startFaceDetection() => Promise<void>
stopFaceDetection()
stopFaceDetection() => Promise<void>
startIDCardDetection(...)
startIDCardDetection(options: IDCardDetectionOption) => Promise<void>
stopIDCardDetection()
stopIDCardDetection() => Promise<void>
Interfaces
StartOption
camera | CameraType |
toBack | boolean |
width | number |
height | number |
x | number |
y | number |
overlay | boolean |
landscape | boolean |
CaptureResult
CaptureOption
quality | number |
storeToFile | boolean |
IDCardDetectionOption
Type Aliases
CameraType
相机选项
'back' | 'front'
IDCardType
'back' | 'front'