{"id":47886232,"url":"https://github.com/michaelwolz/capacitor-camera-view","last_synced_at":"2026-04-04T02:17:41.618Z","repository":{"id":298049590,"uuid":"941404967","full_name":"michaelwolz/capacitor-camera-view","owner":"michaelwolz","description":"🎞️ A Capacitor plugin for embedding a live camera feed directly into your app.","archived":false,"fork":false,"pushed_at":"2026-02-20T16:08:31.000Z","size":1393,"stargazers_count":22,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-20T18:10:39.816Z","etag":null,"topics":["barcode-scanner","camera","camera-preview","capacitor","capacitor-plugin","qrcode-scanner"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelwolz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"michaelwolz"}},"created_at":"2025-03-02T07:53:21.000Z","updated_at":"2026-02-20T16:08:33.000Z","dependencies_parsed_at":"2025-06-09T05:49:02.355Z","dependency_job_id":"6ab89bd6-e40f-4388-b7da-970181f96fde","html_url":"https://github.com/michaelwolz/capacitor-camera-view","commit_stats":null,"previous_names":["michaelwolz/capacitor-camera-view"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/michaelwolz/capacitor-camera-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelwolz%2Fcapacitor-camera-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelwolz%2Fcapacitor-camera-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelwolz%2Fcapacitor-camera-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelwolz%2Fcapacitor-camera-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelwolz","download_url":"https://codeload.github.com/michaelwolz/capacitor-camera-view/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelwolz%2Fcapacitor-camera-view/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31384925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T01:22:39.193Z","status":"online","status_checked_at":"2026-04-04T02:00:07.569Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode-scanner","camera","camera-preview","capacitor","capacitor-plugin","qrcode-scanner"],"created_at":"2026-04-04T02:17:40.816Z","updated_at":"2026-04-04T02:17:41.606Z","avatar_url":"https://github.com/michaelwolz.png","language":"TypeScript","funding_links":["https://github.com/sponsors/michaelwolz"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/banner.png\" alt=\"Capacitor Camera View Banner\" width=\"100%\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eCapacitor Camera View\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eA Capacitor plugin for embedding a live camera feed directly into your app.\u003c/b\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/capacitor-camera-view\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/capacitor-camera-view?color=blue\u0026label=npm\u0026logo=npm\u0026style=flat-square\" alt=\"npm version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/michaelwolz/capacitor-camera-view/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/michaelwolz/capacitor-camera-view/ci.yml?branch=main\u0026logo=github\u0026style=flat-square\" alt=\"Build Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://capacitorjs.com/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Capacitor-Plugin-blue?logo=capacitor\u0026style=flat-square\" alt=\"Capacitor Plugin\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opensource.org/license/apache-2-0\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-Apache%202.0-green?\u0026style=flat-square\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 🚀 Features\n\n- 📹 Embed a **live camera feed** directly into your app.\n- 📸 Capture photos or frames from the camera preview.\n- 🔍 **Barcode detection** support.\n- 📱 **Virtual device support** for automatic lens selection based on zoom level and focus (iOS only).\n- 🔦 Control **zoom**, **flash** and **torch** modes programmatically.\n- ⚡ **High performance** with optimized native implementations.\n- 🎯 **Simple to use** with a clean and intuitive API.\n- 🌐 Works seamlessly on **iOS**, **Android**, and **Web**.\n\n---\n\n## 🪧 Demo\n\n\u003cimg src=\"https://github.com/user-attachments/assets/77fc4689-ac8b-4572-8f35-09826671683b\" alt=\"Capacitor Camera View Demo\" height=\"500\"\u003e\n\n## 📦 Installation\n\nInstall the plugin using npm:\n\n```bash\nnpm install capacitor-camera-view\nnpx cap sync\n```\n\n### Platform Configuration\n\n#### iOS\n\nAdd the following keys to your app's `Info.plist` file:\n\n```xml\n\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\u003cstring\u003eTo capture photos and videos\u003c/string\u003e\n```\n\n#### Android\n\nThe `CAMERA` permission is automatically added by Capacitor. Ensure your `AndroidManifest.xml` includes it if needed for specific configurations:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.CAMERA\" /\u003e\n```\n\n## ▶️ Basic Usage\n\n```typescript\nimport { CameraView } from 'capacitor-camera-view';\n\n// Start the camera preview\nconst startCamera = async () =\u003e {\n  try {\n    await CameraView.start();\n    console.log('Camera started');\n    // Add the CSS class to make the WebView transparent\n    document.body.classList.add('camera-running');\n  } catch (e) {\n    console.error('Error starting camera:', e);\n  }\n};\n\n// Stop the camera preview\nconst stopCamera = async () =\u003e {\n  try {\n    document.body.classList.remove('camera-running');\n    await CameraView.stop();\n    console.log('Camera stopped');\n  } catch (e) {\n    console.error('Error stopping camera:', e);\n  }\n};\n\n// Capture a photo\nconst capturePhoto = async () =\u003e {\n  try {\n    const result = await CameraView.capture();\n    console.log('Photo captured:', result.photo); // Base64 encoded string\n  } catch (e) {\n    console.error('Error capturing photo:', e);\n  }\n};\n```\n\n### ⚠️ Make the WebView transparent when starting the camera view\n\nTo display the camera view through your app, you need to ensure that the WebView is made transparent. For Ionic applications, this can be done by adding the following styles to your global CSS file and applying the respective class to the body element as soon as you start the camera (see example app on how to do this in Angular):\n\n```css\nbody.camera-running {\n  visibility: hidden;\n  --background: transparent;\n  --ion-background-color: transparent;\n}\n\n.camera-modal {\n  visibility: visible;\n}\n```\n\n## 📸 Virtual Camera Support for iOS\n\nOn supported iPhone models (like the Pro series), this plugin can utilize the [**virtual triple camera**](https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype-swift.struct/builtintriplecamera). This feature combines the ultra-wide, wide, and telephoto cameras into a single virtual device. iOS will then automatically switch between the physical cameras based on factors like zoom level and lighting conditions, providing seamless transitions and optimal image quality across a wider zoom range. You can enable this by setting the `useTripleCameraIfAvailable` option to `true` when calling `start()`.\n\n**Pros:**\n*   Smoother zooming experience across different focal lengths.\n*   Automatic selection of the best lens for the current scene and zoom factor.\n\n**Cons:**\n*   Slightly higher resource usage compared to using a single physical camera (the camera view will take a little longer until initialized).\n*   Only available on specific iPhone models with triple camera systems.\n\nFor more details on the underlying technology, refer to Apple's documentation on [AVCaptureDevice.builtInTripleCamera](https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype-swift.struct/builtintriplecamera).\n\nAlternatively, you can specify the `preferredCameraDeviceTypes` option in the \u003ccode\u003e\u003ca href=\"#camerasessionconfiguration\"\u003eCameraSessionConfiguration\u003c/a\u003e\u003c/code\u003e to prioritize specific virtual cameras, such as the [dual camera system](https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype-swift.struct/builtindualcamera). While this provides similar functionality, the `useTripleCameraIfAvailable` option offers the advantage of a smoother transition during camera initialization and lens switching (blurred overlay).\n\n## 🔍 Barcode Detection\n\nThis plugin supports real-time barcode detection directly from the live camera feed.\n\n**How it works:**\n*   **iOS:** Utilizes the native [`AVCaptureMetadataOutput`](https://developer.apple.com/documentation/avfoundation/avcapturemetadataoutput).\n*   **Android:** Utilizes Google's [**ML Kit Barcode Scanning**](https://developers.google.com/ml-kit/vision/barcode-scanning).\n*   **Web:** Uses the [**Barcode Detection API**](https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API) where available in the browser.\n\n\u003e [!NOTE]\n\u003e **Web Support:** The Barcode Detection API is not supported in all browsers (e.g., Windows browsers). For full browser compatibility, consider using a polyfill such as [`@undecaf/barcode-detector-polyfill`](https://www.npmjs.com/package/@undecaf/barcode-detector-polyfill) or [`barcode-detector`](https://www.npmjs.com/package/barcode-detector).\n\n**Enabling Barcode Detection:**\nTo enable this feature, set the `enableBarcodeDetection` option to `true` when calling the `start()` method:\n\n```typescript\nawait CameraView.start({ enableBarcodeDetection: true });\n```\n\n**Listening for Barcodes:**\nOnce enabled, you can listen for the `barcodeDetected` event to receive data about scanned barcodes:\n\n```typescript\nimport { CameraView } from 'capacitor-camera-view';\n\nCameraView.addListener('barcodeDetected', (data) =\u003e {\n  console.log('Barcode detected:', data.value, data.type);\n  // Handle the detected barcode data (e.g., display it, navigate)\n});\n```\n\nSee the [`BarcodeDetectionData`](#barcodedetectiondata) interface for details on the event payload.\n\n## 🧪 Example App\n\nTo see the plugin in action, check out the example app in the `example-app` folder. The app demonstrates how to integrate and use the Capacitor Camera View plugin in an Ionic Angular project.\n\n## Semantic Release\n\nThis project uses [semantic-release](https://github.com/semantic-release/semantic-release) for automated versioning and changelog generation based on conventional commits.\n\n## Conventional Commits\n\nFollow the [Conventional Commits](https://www.conventionalcommits.org/) specification for your commit messages. Example:\n\n```\nfeat(camera): add autofocus support\nfix(android): resolve crash on startup\nchore: update dependencies\n```\n\n## Resources\n- [semantic-release documentation](https://semantic-release.gitbook.io/semantic-release/)\n- [Conventional Commits](https://www.conventionalcommits.org/)\n\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`start(...)`](#start)\n* [`stop()`](#stop)\n* [`isRunning()`](#isrunning)\n* [`capture(...)`](#capture)\n* [`captureSample(...)`](#capturesample)\n* [`flipCamera()`](#flipcamera)\n* [`getAvailableDevices()`](#getavailabledevices)\n* [`getZoom()`](#getzoom)\n* [`setZoom(...)`](#setzoom)\n* [`getFlashMode()`](#getflashmode)\n* [`getSupportedFlashModes()`](#getsupportedflashmodes)\n* [`setFlashMode(...)`](#setflashmode)\n* [`isTorchAvailable()`](#istorchavailable)\n* [`getTorchMode()`](#gettorchmode)\n* [`setTorchMode(...)`](#settorchmode)\n* [`checkPermissions()`](#checkpermissions)\n* [`requestPermissions()`](#requestpermissions)\n* [`addListener('barcodeDetected', ...)`](#addlistenerbarcodedetected-)\n* [`removeAllListeners(...)`](#removealllisteners)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\nMain plugin interface for Capacitor Camera View functionality.\n\n### start(...)\n\n```typescript\nstart(options?: CameraSessionConfiguration | undefined) =\u003e Promise\u003cvoid\u003e\n```\n\nStart the camera view with optional configuration.\n\n| Param         | Type                                                                              | Description                                    |\n| ------------- | --------------------------------------------------------------------------------- | ---------------------------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#camerasessionconfiguration\"\u003eCameraSessionConfiguration\u003c/a\u003e\u003c/code\u003e | - Configuration options for the camera session |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### stop()\n\n```typescript\nstop() =\u003e Promise\u003cvoid\u003e\n```\n\nStop the camera view and release resources.\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### isRunning()\n\n```typescript\nisRunning() =\u003e Promise\u003cIsRunningResponse\u003e\n```\n\nCheck if the camera view is currently running.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#isrunningresponse\"\u003eIsRunningResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### capture(...)\n\n```typescript\ncapture\u003cT extends CaptureOptions\u003e(options: T) =\u003e Promise\u003cCaptureResponse\u003cT\u003e\u003e\n```\n\nCapture a photo using the current camera configuration.\n\n| Param         | Type           | Description                     |\n| ------------- | -------------- | ------------------------------- |\n| **`options`** | \u003ccode\u003eT\u003c/code\u003e | - Capture configuration options |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#captureresponse\"\u003eCaptureResponse\u003c/a\u003e\u0026lt;T\u0026gt;\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### captureSample(...)\n\n```typescript\ncaptureSample\u003cT extends CaptureOptions\u003e(options: T) =\u003e Promise\u003cCaptureResponse\u003cT\u003e\u003e\n```\n\nCaptures a frame from the current camera preview without using the full camera capture pipeline.\n\nUnlike `capture()` which may trigger hardware-level photo capture on native platforms,\nthis method quickly samples the current video stream. This is suitable computer vision or\nsimple snapshots where high fidelity is not required.\n\nOn web this method does exactly the same as `capture()` as it only captures a frame from the video stream\nbecause unfortunately [ImageCapture API](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture) is\nnot yet well supported on the web.\n\n| Param         | Type           | Description                     |\n| ------------- | -------------- | ------------------------------- |\n| **`options`** | \u003ccode\u003eT\u003c/code\u003e | - Capture configuration options |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#captureresponse\"\u003eCaptureResponse\u003c/a\u003e\u0026lt;T\u0026gt;\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### flipCamera()\n\n```typescript\nflipCamera() =\u003e Promise\u003cvoid\u003e\n```\n\nSwitch between front and back camera.\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### getAvailableDevices()\n\n```typescript\ngetAvailableDevices() =\u003e Promise\u003cGetAvailableDevicesResponse\u003e\n```\n\nGet available camera devices for capturing photos.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getavailabledevicesresponse\"\u003eGetAvailableDevicesResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### getZoom()\n\n```typescript\ngetZoom() =\u003e Promise\u003cGetZoomResponse\u003e\n```\n\nGet current zoom level information and available range.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getzoomresponse\"\u003eGetZoomResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### setZoom(...)\n\n```typescript\nsetZoom(options: { level: number; ramp?: boolean; }) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the camera zoom level.\n\n| Param         | Type                                            | Description                  |\n| ------------- | ----------------------------------------------- | ---------------------------- |\n| **`options`** | \u003ccode\u003e{ level: number; ramp?: boolean; }\u003c/code\u003e | - Zoom configuration options |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### getFlashMode()\n\n```typescript\ngetFlashMode() =\u003e Promise\u003cGetFlashModeResponse\u003e\n```\n\nGet current flash mode setting.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getflashmoderesponse\"\u003eGetFlashModeResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### getSupportedFlashModes()\n\n```typescript\ngetSupportedFlashModes() =\u003e Promise\u003cGetSupportedFlashModesResponse\u003e\n```\n\nGet supported flash modes for the current camera.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getsupportedflashmodesresponse\"\u003eGetSupportedFlashModesResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### setFlashMode(...)\n\n```typescript\nsetFlashMode(options: { mode: FlashMode; }) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the camera flash mode.\n\n| Param         | Type                                                       | Description                        |\n| ------------- | ---------------------------------------------------------- | ---------------------------------- |\n| **`options`** | \u003ccode\u003e{ mode: \u003ca href=\"#flashmode\"\u003eFlashMode\u003c/a\u003e; }\u003c/code\u003e | - Flash mode configuration options |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### isTorchAvailable()\n\n```typescript\nisTorchAvailable() =\u003e Promise\u003cIsTorchAvailableResponse\u003e\n```\n\nCheck if the device supports torch (flashlight) functionality.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#istorchavailableresponse\"\u003eIsTorchAvailableResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.2.0\n\n--------------------\n\n\n### getTorchMode()\n\n```typescript\ngetTorchMode() =\u003e Promise\u003cGetTorchModeResponse\u003e\n```\n\nGet the current torch (flashlight) state.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#gettorchmoderesponse\"\u003eGetTorchModeResponse\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.2.0\n\n--------------------\n\n\n### setTorchMode(...)\n\n```typescript\nsetTorchMode(options: { enabled: boolean; level?: number; }) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the torch (flashlight) mode and intensity.\n\n| Param         | Type                                               | Description                   |\n| ------------- | -------------------------------------------------- | ----------------------------- |\n| **`options`** | \u003ccode\u003e{ enabled: boolean; level?: number; }\u003c/code\u003e | - Torch configuration options |\n\n**Since:** 1.2.0\n\n--------------------\n\n\n### checkPermissions()\n\n```typescript\ncheckPermissions() =\u003e Promise\u003cPermissionStatus\u003e\n```\n\nCheck camera permission status without requesting permissions.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#permissionstatus\"\u003ePermissionStatus\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### requestPermissions()\n\n```typescript\nrequestPermissions() =\u003e Promise\u003cPermissionStatus\u003e\n```\n\nRequest camera permission from the user.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#permissionstatus\"\u003ePermissionStatus\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### addListener('barcodeDetected', ...)\n\n```typescript\naddListener(eventName: 'barcodeDetected', listenerFunc: (data: BarcodeDetectionData) =\u003e void) =\u003e Promise\u003cPluginListenerHandle\u003e\n```\n\nListen for barcode detection events.\nThis event is emitted when a barcode is detected in the camera preview.\n\n| Param              | Type                                                                                     | Description                                                   |\n| ------------------ | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------- |\n| **`eventName`**    | \u003ccode\u003e'barcodeDetected'\u003c/code\u003e                                                           | - The name of the event to listen for ('barcodeDetected')     |\n| **`listenerFunc`** | \u003ccode\u003e(data: \u003ca href=\"#barcodedetectiondata\"\u003eBarcodeDetectionData\u003c/a\u003e) =\u0026gt; void\u003c/code\u003e | - The callback function to execute when a barcode is detected |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#pluginlistenerhandle\"\u003ePluginListenerHandle\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### removeAllListeners(...)\n\n```typescript\nremoveAllListeners(eventName?: string | undefined) =\u003e Promise\u003cvoid\u003e\n```\n\nRemove all listeners for this plugin.\n\n| Param           | Type                | Description                                   |\n| --------------- | ------------------- | --------------------------------------------- |\n| **`eventName`** | \u003ccode\u003estring\u003c/code\u003e | - Optional event name to remove listeners for |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### CameraSessionConfiguration\n\nConfiguration options for starting a camera session.\n\n| Prop                             | Type                                                      | Description                                                                                                                                                                                                                                                                                                                                                              | Default                                                                | Since |\n| -------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- | ----- |\n| **`enableBarcodeDetection`**     | \u003ccode\u003eboolean\u003c/code\u003e                                      | Enables the barcode detection functionality                                                                                                                                                                                                                                                                                                                              | \u003ccode\u003efalse\u003c/code\u003e                                                     |       |\n| **`barcodeTypes`**               | \u003ccode\u003eBarcodeType[]\u003c/code\u003e                                | Specific barcode types to detect. If not provided, all supported types are detected. Specifying only the types you need can significantly improve performance and reduce battery consumption, especially on mobile devices.                                                                                                                                              | \u003ccode\u003eundefined - all supported types are detected\u003c/code\u003e              | 2.1.0 |\n| **`position`**                   | \u003ccode\u003e\u003ca href=\"#cameraposition\"\u003eCameraPosition\u003c/a\u003e\u003c/code\u003e | Position of the camera to use                                                                                                                                                                                                                                                                                                                                            | \u003ccode\u003e'back'\u003c/code\u003e                                                    |       |\n| **`deviceId`**                   | \u003ccode\u003estring\u003c/code\u003e                                       | Specific device ID of the camera to use If provided, takes precedence over position                                                                                                                                                                                                                                                                                      |                                                                        |       |\n| **`useTripleCameraIfAvailable`** | \u003ccode\u003eboolean\u003c/code\u003e                                      | Whether to use the triple camera if available (iPhone Pro models only)                                                                                                                                                                                                                                                                                                   | \u003ccode\u003efalse\u003c/code\u003e                                                     |       |\n| **`preferredCameraDeviceTypes`** | \u003ccode\u003eCameraDeviceType[]\u003c/code\u003e                           | Ordered list of preferred camera device types to use (iOS only). The system will attempt to use the first available camera type in the list. If position is also provided, the system will use the first available camera type that matches the position and is in the list. This will fallback to the default camera type if none of the preferred types are available. | \u003ccode\u003eundefined - system will decide based on position/deviceId\u003c/code\u003e |       |\n| **`zoomFactor`**                 | \u003ccode\u003enumber\u003c/code\u003e                                       | The initial zoom factor to use                                                                                                                                                                                                                                                                                                                                           | \u003ccode\u003e1.0\u003c/code\u003e                                                       |       |\n| **`containerElementId`**         | \u003ccode\u003estring\u003c/code\u003e                                       | Optional HTML ID of the container element where the camera view should be rendered. If not provided, the camera view will be appended to the document body. Web only.                                                                                                                                                                                                    |                                                                        |       |\n\n\n#### IsRunningResponse\n\nResponse for checking if the camera view is running.\n\n| Prop            | Type                 | Description                                                  |\n| --------------- | -------------------- | ------------------------------------------------------------ |\n| **`isRunning`** | \u003ccode\u003eboolean\u003c/code\u003e | Indicates if the camera view is currently active and running |\n\n\n#### CaptureOptions\n\nConfiguration options for capturing photos and samples.\n\n| Prop             | Type                 | Description                                                                                                                                                                                                                                                                                                                | Default            | Since |\n| ---------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |\n| **`quality`**    | \u003ccode\u003enumber\u003c/code\u003e  | The JPEG quality of the captured photo/sample on a scale of 0-100                                                                                                                                                                                                                                                          |                    | 1.1.0 |\n| **`saveToFile`** | \u003ccode\u003eboolean\u003c/code\u003e | If true, saves to a temporary file and returns the web path instead of base64. The web path can be used to set the src attribute of an image for efficient loading and rendering. This reduces the data that needs to be transferred over the bridge, which can improve performance especially for high-resolution images. | \u003ccode\u003efalse\u003c/code\u003e | 1.1.0 |\n\n\n#### GetAvailableDevicesResponse\n\nResponse for getting available camera devices.\n\n| Prop          | Type                        | Description                          |\n| ------------- | --------------------------- | ------------------------------------ |\n| **`devices`** | \u003ccode\u003eCameraDevice[]\u003c/code\u003e | An array of available camera devices |\n\n\n#### CameraDevice\n\nRepresents a physical camera device on the device.\n\n| Prop             | Type                                                          | Description                                                                  |\n| ---------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------- |\n| **`id`**         | \u003ccode\u003estring\u003c/code\u003e                                           | The unique identifier of the camera device                                   |\n| **`name`**       | \u003ccode\u003estring\u003c/code\u003e                                           | The human-readable name of the camera device                                 |\n| **`position`**   | \u003ccode\u003e\u003ca href=\"#cameraposition\"\u003eCameraPosition\u003c/a\u003e\u003c/code\u003e     | The position of the camera device (front or back)                            |\n| **`deviceType`** | \u003ccode\u003e\u003ca href=\"#cameradevicetype\"\u003eCameraDeviceType\u003c/a\u003e\u003c/code\u003e | The type of the camera device (e.g., wide, ultra-wide, telephoto) - iOS only |\n\n\n#### GetZoomResponse\n\nResponse for getting zoom level information.\n\n| Prop          | Type                | Description                      |\n| ------------- | ------------------- | -------------------------------- |\n| **`min`**     | \u003ccode\u003enumber\u003c/code\u003e | The minimum zoom level supported |\n| **`max`**     | \u003ccode\u003enumber\u003c/code\u003e | The maximum zoom level supported |\n| **`current`** | \u003ccode\u003enumber\u003c/code\u003e | The current zoom level           |\n\n\n#### GetFlashModeResponse\n\nResponse for getting the current flash mode.\n\n| Prop            | Type                                            | Description                    |\n| --------------- | ----------------------------------------------- | ------------------------------ |\n| **`flashMode`** | \u003ccode\u003e\u003ca href=\"#flashmode\"\u003eFlashMode\u003c/a\u003e\u003c/code\u003e | The current flash mode setting |\n\n\n#### GetSupportedFlashModesResponse\n\nResponse for getting supported flash modes.\n\n| Prop             | Type                     | Description                                             |\n| ---------------- | ------------------------ | ------------------------------------------------------- |\n| **`flashModes`** | \u003ccode\u003eFlashMode[]\u003c/code\u003e | An array of flash modes supported by the current camera |\n\n\n#### IsTorchAvailableResponse\n\nResponse for checking torch availability.\n\n| Prop            | Type                 | Description                                                       |\n| --------------- | -------------------- | ----------------------------------------------------------------- |\n| **`available`** | \u003ccode\u003eboolean\u003c/code\u003e | Indicates if the device supports torch (flashlight) functionality |\n\n\n#### GetTorchModeResponse\n\nResponse for getting the current torch mode.\n\n| Prop          | Type                 | Description                                                                                  |\n| ------------- | -------------------- | -------------------------------------------------------------------------------------------- |\n| **`enabled`** | \u003ccode\u003eboolean\u003c/code\u003e | Indicates if the torch is currently enabled                                                  |\n| **`level`**   | \u003ccode\u003enumber\u003c/code\u003e  | The current torch intensity level (0.0 to 1.0, iOS only). Always 1.0 on Android when enabled |\n\n\n#### PermissionStatus\n\nResponse for the camera permission status.\n\n| Prop         | Type                                                        | Description                        |\n| ------------ | ----------------------------------------------------------- | ---------------------------------- |\n| **`camera`** | \u003ccode\u003e\u003ca href=\"#permissionstate\"\u003ePermissionState\u003c/a\u003e\u003c/code\u003e | The state of the camera permission |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | \u003ccode\u003e() =\u0026gt; Promise\u0026lt;void\u0026gt;\u003c/code\u003e |\n\n\n#### BarcodeDetectionData\n\nData for a detected barcode.\n\n| Prop               | Type                                                  | Description                                                      |\n| ------------------ | ----------------------------------------------------- | ---------------------------------------------------------------- |\n| **`value`**        | \u003ccode\u003estring\u003c/code\u003e                                   | The decoded string value of the barcode                          |\n| **`displayValue`** | \u003ccode\u003estring\u003c/code\u003e                                   | The display value of the barcode (may differ from the raw value) |\n| **`type`**         | \u003ccode\u003estring\u003c/code\u003e                                   | The type/format of the barcode (e.g., 'qr', 'code128', etc.)     |\n| **`boundingRect`** | \u003ccode\u003e\u003ca href=\"#boundingrect\"\u003eBoundingRect\u003c/a\u003e\u003c/code\u003e | The bounding rectangle of the barcode in the camera frame.       |\n\n\n#### BoundingRect\n\nRectangle defining the boundary of the barcode in the camera frame.\nCoordinates are normalized between 0 and 1 relative to the camera frame.\n\n| Prop         | Type                | Description                                                                      |\n| ------------ | ------------------- | -------------------------------------------------------------------------------- |\n| **`x`**      | \u003ccode\u003enumber\u003c/code\u003e | X-coordinate of the top-left corner                                              |\n| **`y`**      | \u003ccode\u003enumber\u003c/code\u003e | Y-coordinate of the top-left corner                                              |\n| **`width`**  | \u003ccode\u003enumber\u003c/code\u003e | Width of the bounding rectangle (should match the actual width of the barcode)   |\n| **`height`** | \u003ccode\u003enumber\u003c/code\u003e | Height of the bounding rectangle (should match the actual height of the barcode) |\n\n\n### Type Aliases\n\n\n#### BarcodeType\n\nSupported barcode types for detection.\nSpecifying only the barcode types you need can improve performance\nand reduce battery consumption.\n\n\u003ccode\u003e'qr' | 'code128' | 'code39' | 'code39Mod43' | 'code93' | 'ean8' | 'ean13' | 'interleaved2of5' | 'itf14' | 'pdf417' | 'aztec' | 'dataMatrix' | 'upce'\u003c/code\u003e\n\n\n#### CameraPosition\n\nPosition options for the camera.\n- 'front': Front-facing camera\n- 'back': Rear-facing camera\n\n\u003ccode\u003e'front' | 'back'\u003c/code\u003e\n\n\n#### CameraDeviceType\n\nAvailable camera device types for iOS.\nMaps to AVCaptureDevice DeviceTypes in iOS.\n\n\u003ccode\u003e'wideAngle' | 'ultraWide' | 'telephoto' | 'dual' | 'dualWide' | 'triple' | 'trueDepth'\u003c/code\u003e\n\n\n#### CaptureResponse\n\nResponse for capturing a photo\nThis will contain either a base64 encoded string or a web path to the captured photo,\ndepending on the `saveToFile` option in the \u003ca href=\"#captureoptions\"\u003eCaptureOptions\u003c/a\u003e.\n\n\u003ccode\u003eT['saveToFile'] extends true ? { /** The web path to the captured photo that can be used to set the src attribute of an image for efficient loading and rendering (when saveToFile is true) */ webPath: string; } : { /** The base64 encoded string of the captured photo (when saveToFile is false or undefined) */ photo: string; }\u003c/code\u003e\n\n\n#### FlashMode\n\nFlash mode options for the camera.\n- 'off': Flash disabled\n- 'on': Flash always on\n- 'auto': Flash automatically enabled in low-light conditions\n\n\u003ccode\u003e'off' | 'on' | 'auto'\u003c/code\u003e\n\n\n#### PermissionState\n\n\u003ccode\u003e'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'\u003c/code\u003e\n\n\u003c/docgen-api\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelwolz%2Fcapacitor-camera-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelwolz%2Fcapacitor-camera-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelwolz%2Fcapacitor-camera-view/lists"}