Capacitor plugin for android.hardware.camera2
MIT License
Capacitor plugin for android.hardware.camera2
inspired from and based on @capacitor-community/camera-preview
all made by an Android amateur.
npm install @lihbr/capacitor-camera2
npx cap sync
start(...)
stop()
capture(...)
setViewFinderSize(...)
getShutterSpeedRange()
setShutterSpeed(...)
getApertureRange()
setAperture(...)
getIsoRange()
setIso(...)
getExposureCompensationInfo()
setExposureCompensation(...)
openPIP(...)
closePIP()
setPIPSize(...)
setPIPPosition(...)
pictureToThumbnail(...)
getExifData(...)
start(options: Camera2Options) => any
Param | Type |
---|---|
options |
Camera2Options |
Returns: any
stop() => any
Returns: any
capture(options: { picturePath: string; thumbnailPath?: string; thumbnailWidth?: number; thumbnailHeight?: number; thumbnailQuality?: number; }) => any
Param | Type |
---|---|
options |
{ picturePath: string; thumbnailPath?: string; thumbnailWidth?: number; thumbnailHeight?: number; thumbnailQuality?: number; } |
Returns: any
setViewFinderSize(options: { width: number; height: number; }) => any
Param | Type |
---|---|
options |
{ width: number; height: number; } |
Returns: any
getShutterSpeedRange() => any
Returns: any
setShutterSpeed(options: { value: number; }) => any
Param | Type |
---|---|
options |
{ value: number; } |
Returns: any
getApertureRange() => any
Returns: any
setAperture(options: { value: number; }) => any
Param | Type |
---|---|
options |
{ value: number; } |
Returns: any
getIsoRange() => any
Returns: any
setIso(options: { value: number; }) => any
Param | Type |
---|---|
options |
{ value: number; } |
Returns: any
getExposureCompensationInfo() => any
Returns: any
setExposureCompensation(options: { value: number; }) => any
Param | Type |
---|---|
options |
{ value: number; } |
Returns: any
openPIP(options: { width: number; height: number; x: number; y: number; }) => any
Param | Type |
---|---|
options |
{ width: number; height: number; x: number; y: number; } |
Returns: any
closePIP() => any
Returns: any
setPIPSize(options: { width: number; height: number; }) => any
Param | Type |
---|---|
options |
{ width: number; height: number; } |
Returns: any
setPIPPosition(options: { x: number; y: number; }) => any
Param | Type |
---|---|
options |
{ x: number; y: number; } |
Returns: any
pictureToThumbnail(options: { picture: string; width: number; height: number; quality?: number; }) => any
Param | Type |
---|---|
options |
{ picture: string; width: number; height: number; quality?: number; } |
Returns: any
getExifData(options: { path: string; }) => any
Param | Type |
---|---|
options |
{ path: string; } |
Returns: any
{ x?: number; y?: number; width?: number; height?: number; paddingBottom?: number; toBack?: boolean; lockAndroidOrientation?: boolean; }
Whether you're helping me fix bugs, improve the docs, or spread the word, I'd love to have you as a contributor!
Asking a question: Open a new topic on GitHub Discussions explaining what you want to achieve / your question. I'll try to get back to you shortly.
Reporting a bug: Open an issue explaining your application's setup and the bug you're encountering.
Suggesting an improvement: Open an issue explaining your improvement or feature so we can discuss and learn more.
Submitting code changes: For small fixes, feel free to open a PR with a description of your changes. For large changes, please first open an issue so we can discuss if and how the changes should be implemented.
MIT License © 2024-PRESENT Lucie Haberer