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