capacitor-camera2

Capacitor plugin for android.hardware.camera2

MIT License

Downloads
5
Stars
0

@lihbr/capacitor-camera2

Capacitor plugin for android.hardware.camera2 inspired from and based on @capacitor-community/camera-preview all made by an Android amateur.

Install

npm install @lihbr/capacitor-camera2
npx cap sync

API

start(...)

start(options: Camera2Options) => any
Param Type
options Camera2Options

Returns: any


stop()

stop() => any

Returns: any


capture(...)

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(...)

setViewFinderSize(options: { width: number; height: number; }) => any
Param Type
options { width: number; height: number; }

Returns: any


getShutterSpeedRange()

getShutterSpeedRange() => any

Returns: any


setShutterSpeed(...)

setShutterSpeed(options: { value: number; }) => any
Param Type
options { value: number; }

Returns: any


getApertureRange()

getApertureRange() => any

Returns: any


setAperture(...)

setAperture(options: { value: number; }) => any
Param Type
options { value: number; }

Returns: any


getIsoRange()

getIsoRange() => any

Returns: any


setIso(...)

setIso(options: { value: number; }) => any
Param Type
options { value: number; }

Returns: any


getExposureCompensationInfo()

getExposureCompensationInfo() => any

Returns: any


setExposureCompensation(...)

setExposureCompensation(options: { value: number; }) => any
Param Type
options { value: number; }

Returns: any


openPIP(...)

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()

closePIP() => any

Returns: any


setPIPSize(...)

setPIPSize(options: { width: number; height: number; }) => any
Param Type
options { width: number; height: number; }

Returns: any


setPIPPosition(...)

setPIPPosition(options: { x: number; y: number; }) => any
Param Type
options { x: number; y: number; }

Returns: any


pictureToThumbnail(...)

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(...)

getExifData(options: { path: string; }) => any
Param Type
options { path: string; }

Returns: any


Type Aliases

Camera2Options

{ x?: number; y?: number; width?: number; height?: number; paddingBottom?: number; toBack?: boolean; lockAndroidOrientation?: boolean; }

Contributing

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.

License

MIT License © 2024-PRESENT Lucie Haberer

Package Rankings
Top 34.27% on Npmjs.org
Badges
Extracted from project README
npm version npm downloads Bundle Conventional Commits License