capacitor-camera-view 2.2.0-rc.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/utils.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n/**\n * The main Capacitor Camera View plugin instance.\n */\nconst CameraView = registerPlugin('CameraView', {\n web: () => import('./web').then((m) => new m.CameraViewWeb()),\n});\nexport * from './definitions';\nexport { CameraView };\n//# sourceMappingURL=index.js.map","/**\n * Converts canvas to base64 string\n */\nexport function canvasToBase64(canvas, quality) {\n const dataUrl = canvas.toDataURL('image/jpeg', quality);\n return dataUrl.split(',')[1];\n}\n/**\n * Calculates the visible area of the video based on object-fit: cover\n */\nexport function calculateVisibleArea(video) {\n // Get the displayed dimensions of the video element\n const videoRect = video.getBoundingClientRect();\n const displayWidth = videoRect.width;\n const displayHeight = videoRect.height;\n // Get the intrinsic dimensions of the video\n const videoWidth = video.videoWidth;\n const videoHeight = video.videoHeight;\n // Calculate which portion of the video is visible (for object-fit: cover)\n const videoAspect = videoWidth / videoHeight;\n const displayAspect = displayWidth / displayHeight;\n let sourceX = 0;\n let sourceY = 0;\n let sourceWidth = videoWidth;\n let sourceHeight = videoHeight;\n // If video aspect ratio is greater than display aspect ratio,\n // the video is cropped on the sides\n if (videoAspect > displayAspect) {\n sourceWidth = videoHeight * displayAspect;\n sourceX = (videoWidth - sourceWidth) / 2;\n }\n // Otherwise the video is cropped on the top and bottom\n else {\n sourceHeight = videoWidth / displayAspect;\n sourceY = (videoHeight - sourceHeight) / 2;\n }\n return {\n sourceX,\n sourceY,\n sourceWidth,\n sourceHeight,\n displayWidth,\n displayHeight,\n };\n}\n/**\n * Draws the visible area of the video to the canvas\n */\nexport function drawVisibleAreaToCanvas(canvas, videoElement, area) {\n const { sourceX, sourceY, sourceWidth, sourceHeight, displayWidth, displayHeight } = area;\n // Set canvas size to match the displayed dimensions\n canvas.width = displayWidth;\n canvas.height = displayHeight;\n const ctx = canvas.getContext('2d', { alpha: false });\n if (!ctx) {\n throw new Error('Could not get canvas context');\n }\n // Draw only the visible portion of the video to match what the user sees\n ctx.drawImage(videoElement, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, displayWidth, displayHeight);\n}\n/**\n * Transforms barcode coordinates from the video source space to display space\n * accounting for object-fit: cover scaling and cropping.\n *\n * @param barcodeBoundingBox The original barcode bounding box from the detector\n * @param videoElement The video element with the camera stream\n * @returns The transformed bounding box coordinates in display space\n */\nexport function transformBarcodeBoundingBox(barcodeBoundingBox, videoElement) {\n // Get the video element's displayed dimensions\n const videoRect = videoElement.getBoundingClientRect();\n const displayWidth = videoRect.width;\n const displayHeight = videoRect.height;\n // Get original video dimensions\n const videoWidth = videoElement.videoWidth;\n const videoHeight = videoElement.videoHeight;\n // Calculate scaling and positioning for object-fit: cover\n const videoAspect = videoWidth / videoHeight;\n const displayAspect = displayWidth / displayHeight;\n let scaledX, scaledY, scaledWidth, scaledHeight;\n if (videoAspect > displayAspect) {\n // Video is wider than display area - height matches, width is centered and cropped\n const scale = displayHeight / videoHeight;\n const scaledVideoWidth = videoWidth * scale;\n const cropX = (scaledVideoWidth - displayWidth) / 2;\n scaledWidth = barcodeBoundingBox.width * scale;\n scaledHeight = barcodeBoundingBox.height * scale;\n scaledX = barcodeBoundingBox.x * scale - cropX;\n scaledY = barcodeBoundingBox.y * scale;\n }\n else {\n // Video is taller than display area - width matches, height is centered and cropped\n const scale = displayWidth / videoWidth;\n const scaledVideoHeight = videoHeight * scale;\n const cropY = (scaledVideoHeight - displayHeight) / 2;\n scaledWidth = barcodeBoundingBox.width * scale;\n scaledHeight = barcodeBoundingBox.height * scale;\n scaledX = barcodeBoundingBox.x * scale;\n scaledY = barcodeBoundingBox.y * scale - cropY;\n }\n return {\n x: scaledX,\n y: scaledY,\n width: scaledWidth,\n height: scaledHeight,\n };\n}\n//# sourceMappingURL=utils.js.map","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _CameraViewWeb_isRunning;\nimport { WebPlugin } from '@capacitor/core';\nimport { calculateVisibleArea, canvasToBase64, drawVisibleAreaToCanvas, transformBarcodeBoundingBox } from './utils';\nexport const BARCODE_TYPE_TO_WEB_FORMAT = {\n qr: 'qr_code',\n code128: 'code_128',\n code39: 'code_39',\n code39Mod43: null,\n code93: 'code_93',\n ean8: 'ean_8',\n ean13: 'ean_13',\n interleaved2of5: 'itf',\n itf14: 'itf',\n pdf417: 'pdf417',\n aztec: 'aztec',\n dataMatrix: 'data_matrix',\n upce: 'upc_e',\n};\n/**\n * Web implementation of the CameraViewPlugin.\n * Optimized for performance and battery efficiency.\n */\nexport class CameraViewWeb extends WebPlugin {\n constructor() {\n super();\n // DOM elements\n this.videoElement = null;\n this.canvasElement = null;\n // Stream state\n this.stream = null;\n _CameraViewWeb_isRunning.set(this, false);\n // Configuration state\n this.currentCamera = 'environment'; // Default to back camera\n this.currentZoom = 1.0;\n this.currentFlashMode = 'off';\n // Barcode detection support\n this.barcodeDetectionSupported = false;\n this.barcodeDetector = null;\n // Recording state\n this.mediaRecorder = null;\n this.recordedChunks = [];\n this.recordingAudioTrack = null;\n this.recordingResolve = null;\n this.recordingReject = null;\n this.checkBarcodeDetectionSupport();\n }\n /**\n * Start the camera with the given configuration\n */\n async start(options) {\n if (__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\")) {\n return;\n }\n const permissionStatus = await this.requestPermissions();\n if (permissionStatus.camera !== 'granted') {\n throw new Error('Camera permission was not granted');\n }\n try {\n // Set up video element if it doesn't exist\n if (!this.videoElement) {\n await this.setupVideoElement(options === null || options === void 0 ? void 0 : options.containerElementId);\n }\n // Set up video constraints based on options\n const videoConstraints = {};\n // Prefer deviceId if specified\n if (options === null || options === void 0 ? void 0 : options.deviceId) {\n videoConstraints.deviceId = { exact: options.deviceId };\n // Remember the current camera mode (though we're using a specific device)\n this.currentCamera = (options === null || options === void 0 ? void 0 : options.position) === 'front' ? 'user' : 'environment';\n }\n else {\n // Fall back to facing mode\n const facingMode = (options === null || options === void 0 ? void 0 : options.position) === 'front' ? 'user' : 'environment';\n this.currentCamera = facingMode;\n videoConstraints.facingMode = facingMode;\n }\n const constraints = {\n video: videoConstraints,\n audio: false,\n };\n this.stream = await navigator.mediaDevices.getUserMedia(constraints);\n if (this.videoElement) {\n this.videoElement.srcObject = this.stream;\n this.videoElement.play();\n __classPrivateFieldSet(this, _CameraViewWeb_isRunning, true, \"f\");\n // If barcode detection is enabled and supported, start detection\n if (options === null || options === void 0 ? void 0 : options.enableBarcodeDetection) {\n await this.checkBarcodeDetectionSupport();\n if (this.barcodeDetectionSupported) {\n await this.configureBarcodeDetector(options === null || options === void 0 ? void 0 : options.barcodeTypes);\n this.startBarcodeDetection();\n }\n }\n }\n }\n catch (err) {\n throw new Error(`Failed to start camera: ${this.formatError(err)}`);\n }\n }\n /**\n * Stop the camera and release resources\n */\n async stop() {\n var _a;\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\")) {\n return;\n }\n try {\n // Stop any active recording\n if (this.mediaRecorder && this.mediaRecorder.state !== 'inactive') {\n // Reject any pending stopRecording promise since we're force-stopping\n (_a = this.recordingReject) === null || _a === void 0 ? void 0 : _a.call(this, new Error('Camera session stopped while recording'));\n this.recordingResolve = null;\n this.recordingReject = null;\n this.mediaRecorder.stop();\n this.mediaRecorder = null;\n }\n this.recordedChunks = [];\n if (this.recordingAudioTrack) {\n this.recordingAudioTrack.stop();\n this.recordingAudioTrack = null;\n }\n // Stop all tracks in the stream\n if (this.stream) {\n this.stream.getTracks().forEach((track) => track.stop());\n this.stream = null;\n }\n // Clear video source\n if (this.videoElement) {\n this.videoElement = null;\n }\n __classPrivateFieldSet(this, _CameraViewWeb_isRunning, false, \"f\");\n }\n catch (err) {\n throw new Error(`Failed to stop camera: ${this.formatError(err)}`);\n }\n }\n /**\n * Check if the camera is currently running\n */\n async isRunning() {\n return { isRunning: __classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\") };\n }\n /**\n * Capture a photo using the camera and return it as a base64-encoded JPEG image.\n * Preserves what the user actually sees in the UI, including cropping from object-fit: cover.\n */\n async capture(options) {\n const videoElement = this.videoElement;\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\") || !videoElement) {\n throw new Error('Camera is not running');\n }\n try {\n const canvas = this.getCanvasElement();\n const visibleArea = calculateVisibleArea(videoElement);\n drawVisibleAreaToCanvas(canvas, videoElement, visibleArea);\n const quality = Math.min(1.0, Math.max(0.1, options.quality / 100));\n if (options.saveToFile) {\n // Create a blob from canvas and return a blob URL\n return new Promise((resolve, reject) => {\n canvas.toBlob((blob) => {\n if (!blob) {\n reject(new Error('Failed to create blob from canvas'));\n return;\n }\n const url = URL.createObjectURL(blob);\n resolve({ webPath: url });\n }, 'image/jpeg', quality);\n });\n }\n else {\n // Return base64 data\n const base64Data = canvasToBase64(canvas, quality);\n return { photo: base64Data };\n }\n }\n catch (err) {\n throw new Error(`Failed to capture photo: ${this.formatError(err)}`);\n }\n }\n /**\n * Web implementation already uses images from the video stream, so this is the same as `capture()`\n */\n async captureSample(options) {\n return this.capture(options);\n }\n /**\n * Start recording video using MediaRecorder API\n */\n async startRecording(options) {\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\") || !this.videoElement) {\n throw new Error('Camera is not running');\n }\n if (this.mediaRecorder) {\n throw new Error('Recording is already in progress');\n }\n try {\n let stream = this.stream;\n // If audio is requested, get a new stream with audio track\n if ((options === null || options === void 0 ? void 0 : options.enableAudio) && stream) {\n const audioStream = await navigator.mediaDevices.getUserMedia({ audio: true });\n const audioTrack = audioStream.getAudioTracks()[0];\n this.recordingAudioTrack = audioTrack;\n const videoTracks = stream.getVideoTracks();\n stream = new MediaStream([...videoTracks, audioTrack]);\n }\n if (!stream) {\n throw new Error('No camera stream available');\n }\n this.recordedChunks = [];\n const mimeType = ['video/webm;codecs=vp9', 'video/webm', 'video/mp4'].find((type) => MediaRecorder.isTypeSupported(type));\n if (!mimeType) {\n throw new Error('No supported video recording format found');\n }\n this.mediaRecorder = new MediaRecorder(stream, { mimeType });\n this.mediaRecorder.ondataavailable = (event) => {\n if (event.data && event.data.size > 0) {\n this.recordedChunks.push(event.data);\n }\n };\n this.mediaRecorder.onstop = () => {\n var _a;\n // Stop audio track if it was added for recording\n if (this.recordingAudioTrack) {\n this.recordingAudioTrack.stop();\n this.recordingAudioTrack = null;\n }\n const blob = new Blob(this.recordedChunks, { type: mimeType });\n const url = URL.createObjectURL(blob);\n this.recordedChunks = [];\n this.mediaRecorder = null;\n (_a = this.recordingResolve) === null || _a === void 0 ? void 0 : _a.call(this, { webPath: url });\n this.recordingResolve = null;\n this.recordingReject = null;\n };\n this.mediaRecorder.onerror = (event) => {\n var _a, _b, _c;\n if (this.recordingAudioTrack) {\n this.recordingAudioTrack.stop();\n this.recordingAudioTrack = null;\n }\n this.mediaRecorder = null;\n this.recordedChunks = [];\n const errorMessage = (_b = (_a = event.error) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : 'Unknown recording error';\n (_c = this.recordingReject) === null || _c === void 0 ? void 0 : _c.call(this, new Error('Recording error: ' + errorMessage));\n this.recordingResolve = null;\n this.recordingReject = null;\n };\n this.mediaRecorder.start(100); // Collect data in 100ms chunks\n }\n catch (err) {\n throw new Error(`Failed to start recording: ${this.formatError(err)}`);\n }\n }\n /**\n * Stop the current video recording\n */\n async stopRecording() {\n if (!this.mediaRecorder) {\n throw new Error('No recording is in progress');\n }\n return new Promise((resolve, reject) => {\n var _a;\n this.recordingResolve = resolve;\n this.recordingReject = reject;\n (_a = this.mediaRecorder) === null || _a === void 0 ? void 0 : _a.stop();\n });\n }\n /**\n * Flip between front and back camera\n */\n async flipCamera() {\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\")) {\n throw new Error('Camera is not running');\n }\n try {\n // Switch current camera\n this.currentCamera = this.currentCamera === 'user' ? 'environment' : 'user';\n // Stop current stream\n if (this.stream) {\n this.stream.getTracks().forEach((track) => track.stop());\n }\n // Restart with new facing mode\n const constraints = {\n video: {\n facingMode: this.currentCamera,\n },\n audio: false,\n };\n this.stream = await navigator.mediaDevices.getUserMedia(constraints);\n if (this.videoElement) {\n this.videoElement.srcObject = this.stream;\n }\n }\n catch (err) {\n throw new Error(`Failed to flip camera: ${this.formatError(err)}`);\n }\n }\n /**\n * Get available camera devices\n */\n async getAvailableDevices() {\n try {\n const devices = await navigator.mediaDevices.enumerateDevices();\n const videoDevices = devices.filter((device) => device.kind === 'videoinput');\n return {\n devices: videoDevices.map((device) => ({\n id: device.deviceId,\n name: device.label || `Camera ${device.deviceId.substring(0, 5)}`,\n position: device.label.toLowerCase().includes('front') ? 'front' : 'back',\n })),\n };\n }\n catch (err) {\n console.error('Failed to get available devices', err);\n return { devices: [] };\n }\n }\n /**\n * Get current zoom information (web has limited zoom support)\n */\n async getZoom() {\n // Web has limited zoom capabilities in most browsers,\n // we fake zoomin by scaling the video element\n return {\n min: 1.0,\n max: 3.0,\n current: this.currentZoom,\n };\n }\n /**\n * Set zoom level (limited support in web)\n */\n async setZoom(options) {\n // Store the requested zoom level\n this.currentZoom = options.level;\n // Apply visual zoom using CSS transform when native zoom isn't supported\n if (this.videoElement) {\n this.videoElement.style.transition = options.ramp ? 'transform 0.2s ease-in-out' : 'none';\n const scale = Math.max(1.0, Math.min(options.level, 3.0)); // Limit scale to reasonable bounds\n this.videoElement.style.transform = `scale(${scale})`;\n this.videoElement.style.transformOrigin = 'center';\n }\n }\n /**\n * Get current flash mode\n */\n async getFlashMode() {\n return { flashMode: this.currentFlashMode };\n }\n /**\n * Get supported flash modes\n */\n async getSupportedFlashModes() {\n // Web has limited flash control\n return { flashModes: ['off'] };\n }\n /**\n * Set flash mode (limited support in web)\n */\n async setFlashMode(options) {\n this.currentFlashMode = options.mode;\n console.warn('Flash mode control is not fully supported in the web implementation');\n }\n /**\n * Check if torch is available (not supported in web)\n */\n async isTorchAvailable() {\n // Torch is not supported in web implementation\n return { available: false };\n }\n /**\n * Get torch mode (not supported in web)\n */\n async getTorchMode() {\n // Torch is not supported in web implementation\n return { enabled: false, level: 0.0 };\n }\n /**\n * Set torch mode (not supported in web)\n */\n async setTorchMode() {\n // Torch is not supported in web implementation\n throw this.unimplemented('Torch control is not supported in web implementation.');\n }\n /**\n * Check camera and microphone permission without requesting\n */\n async checkPermissions() {\n try {\n // Use Permissions API if available\n if (navigator.permissions) {\n const [cameraResult, microphoneResult] = await Promise.all([\n navigator.permissions.query({ name: 'camera' }),\n navigator.permissions.query({ name: 'microphone' }),\n ]);\n return {\n camera: cameraResult.state === 'granted' ? 'granted' : cameraResult.state === 'denied' ? 'denied' : 'prompt',\n microphone: microphoneResult.state === 'granted'\n ? 'granted'\n : microphoneResult.state === 'denied'\n ? 'denied'\n : 'prompt',\n };\n }\n // If Permissions API is not available, fall back to checking the active stream\n return {\n camera: this.stream ? 'granted' : 'prompt',\n microphone: 'prompt',\n };\n }\n catch (err) {\n // If permissions API is not supported or fails\n return {\n camera: 'prompt',\n microphone: 'prompt',\n };\n }\n }\n /**\n * Request camera and/or microphone permissions from the user.\n * By default, only camera permission is requested.\n */\n async requestPermissions(options) {\n var _a;\n const permissions = (_a = options === null || options === void 0 ? void 0 : options.permissions) !== null && _a !== void 0 ? _a : ['camera'];\n const result = { camera: 'prompt', microphone: 'prompt' };\n // Request camera permission if included\n if (permissions.includes('camera')) {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ video: true });\n stream.getTracks().forEach((track) => track.stop());\n result.camera = 'granted';\n }\n catch (_b) {\n result.camera = 'denied';\n }\n }\n else {\n // Still report current status even if not requesting\n result.camera = (await this.checkPermissions()).camera;\n }\n // Request microphone permission only if explicitly included\n if (permissions.includes('microphone')) {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n stream.getTracks().forEach((track) => track.stop());\n result.microphone = 'granted';\n }\n catch (_c) {\n result.microphone = 'denied';\n }\n }\n else {\n result.microphone = (await this.checkPermissions()).microphone;\n }\n return result;\n }\n /**\n * Start barcode detection if supported\n */\n async startBarcodeDetection() {\n const barcodeDetector = this.barcodeDetector;\n const videoElement = this.videoElement;\n if (!this.barcodeDetectionSupported || !barcodeDetector || !videoElement) {\n return;\n }\n // Make sure video is fully loaded before starting detection\n if (videoElement.readyState < 2) {\n await new Promise((resolve) => {\n const loadHandler = () => {\n videoElement.removeEventListener('loadeddata', loadHandler);\n resolve();\n };\n videoElement.addEventListener('loadeddata', loadHandler);\n });\n }\n // Add throttling to reduce CPU usage\n let lastDetectionTime = 0;\n const minTimeBetweenDetections = 100; // ms\n // Set up periodic frame analysis for barcode detection\n const detectFrame = async () => {\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\") || !videoElement || !barcodeDetector) {\n return;\n }\n const now = Date.now();\n if (now - lastDetectionTime >= minTimeBetweenDetections) {\n try {\n const barcodes = await barcodeDetector.detect(videoElement);\n lastDetectionTime = now;\n if (barcodes.length > 0) {\n const barcode = barcodes[0];\n // Transform barcode coordinates using the utility function\n const boundingRect = transformBarcodeBoundingBox(barcode.boundingBox, videoElement);\n this.notifyListeners('barcodeDetected', {\n value: barcode.rawValue,\n type: barcode.format.toLowerCase(),\n boundingRect,\n });\n }\n }\n catch (err) {\n console.error('Barcode detection error', err);\n }\n }\n if (__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\")) {\n requestAnimationFrame(detectFrame);\n }\n };\n requestAnimationFrame(detectFrame);\n }\n /**\n * Clean up resources when the plugin is disposed\n */\n async handleOnDestroy() {\n var _a;\n await this.stop();\n // Remove elements from DOM\n if ((_a = this.videoElement) === null || _a === void 0 ? void 0 : _a.parentNode) {\n this.videoElement.parentNode.removeChild(this.videoElement);\n this.videoElement = null;\n }\n if (this.canvasElement) {\n this.canvasElement = null;\n }\n this.barcodeDetector = null;\n }\n /**\n * Check if barcode detection is supported in this browser\n */\n async checkBarcodeDetectionSupport() {\n if ('BarcodeDetector' in window) {\n try {\n this.barcodeDetector = new BarcodeDetector();\n this.barcodeDetectionSupported = true;\n }\n catch (e) {\n console.warn('BarcodeDetector is not supported by this browser.');\n this.barcodeDetectionSupported = false;\n }\n }\n }\n /**\n * Configure the barcode detector with requested barcode formats.\n * Unsupported formats are ignored and logged.\n */\n async configureBarcodeDetector(barcodeTypes) {\n if (!this.barcodeDetectionSupported) {\n return;\n }\n if (!(barcodeTypes === null || barcodeTypes === void 0 ? void 0 : barcodeTypes.length)) {\n this.barcodeDetector = new BarcodeDetector();\n return;\n }\n const requestedFormats = barcodeTypes\n .map((barcodeType) => {\n const webFormat = BARCODE_TYPE_TO_WEB_FORMAT[barcodeType];\n if (!webFormat) {\n console.warn(`[CameraView] Barcode type \"${barcodeType}\" is not supported by the web BarcodeDetector API.`);\n }\n return webFormat;\n })\n .filter((format) => format !== null);\n if (!requestedFormats.length) {\n console.warn('[CameraView] No requested barcode types are supported on web. Falling back to all supported formats.');\n this.barcodeDetector = new BarcodeDetector();\n return;\n }\n const uniqueRequestedFormats = Array.from(new Set(requestedFormats));\n try {\n const supportedFormats = await BarcodeDetector.getSupportedFormats();\n const configuredFormats = uniqueRequestedFormats.filter((format) => supportedFormats.includes(format));\n const ignoredFormats = uniqueRequestedFormats.filter((format) => !supportedFormats.includes(format));\n if (ignoredFormats.length) {\n console.warn(`[CameraView] Ignoring unsupported barcode formats for this browser: ${ignoredFormats.join(', ')}.`);\n }\n if (!configuredFormats.length) {\n console.warn('[CameraView] No requested barcode formats are available in this browser. Falling back to all supported formats.');\n this.barcodeDetector = new BarcodeDetector();\n return;\n }\n this.barcodeDetector = new BarcodeDetector({ formats: configuredFormats });\n }\n catch (error) {\n console.warn('[CameraView] Failed to resolve supported barcode formats; falling back to unfiltered detector.', error);\n this.barcodeDetector = new BarcodeDetector();\n }\n }\n /**\n * Set up the video element for the camera view\n */\n async setupVideoElement(containerElementId) {\n this.videoElement = document.createElement('video');\n this.videoElement.playsInline = true;\n this.videoElement.autoplay = true;\n this.videoElement.muted = true;\n this.videoElement.style.width = '100%';\n this.videoElement.style.height = '100%';\n this.videoElement.style.objectFit = 'cover';\n // If a container ID is provided, find that element and append the video to it\n if (containerElementId) {\n const container = document.getElementById(containerElementId);\n if (!container) {\n throw new Error(`Container element with ID ${containerElementId} not found`);\n }\n container.appendChild(this.videoElement);\n }\n else {\n // Otherwise, append to body as fallback\n document.body.appendChild(this.videoElement);\n }\n }\n /**\n * Ensures canvas element exists and returns it\n */\n getCanvasElement() {\n if (!this.canvasElement) {\n this.canvasElement = document.createElement('canvas');\n }\n return this.canvasElement;\n }\n /**\n * Format error message\n */\n formatError(err) {\n return err instanceof Error ? err.message : String(err);\n }\n}\n_CameraViewWeb_isRunning = new WeakMap();\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","this","WebPlugin"],"mappings":";;;IACA;IACA;IACA;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICND;IACA;IACA;IACO,SA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,KAAK,CAAC,KAAK,GAAG,MAAM;IAC9C,QAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM;IAC/C,QAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,OAAO;IACnD;IACA,QAAQ,IAAI,kBAAkB,EAAE;IAChC,YAAY,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC;IACzE,YAAY,IAAI,CAAC,SAAS,EAAE;IAC5B,gBAAgB,MAAM,IAAI,KAAK,CAAC,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC5F,YAAY;IACZ,YAAY,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;IACpD,QAAQ;IACR,aAAa;IACb;IACA,YAAY,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;IACxD,QAAQ;IACR,IAAI;IACJ;IACA;IACA;IACA,IAAI,gBAAgB,GAAG;IACvB,QAAQ,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;IACjC,YAAY,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;IACjE,QAAQ;IACR,QAAQ,OAAO,IAAI,CAAC,aAAa;IACjC,IAAI;IACJ;IACA;IACA;IACA,IAAI,WAAW,CAAC,GAAG,EAAE;IACrB,QAAQ,OAAO,GAAG,YAAY,KAAK,GAAG,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC;IAC/D,IAAI;IACJ;IACA,wBAAwB,GAAG,IAAI,OAAO,EAAE;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/utils.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n/**\n * The main Capacitor Camera View plugin instance.\n */\nconst CameraView = registerPlugin('CameraView', {\n web: () => import('./web').then((m) => new m.CameraViewWeb()),\n});\nexport * from './definitions';\nexport { CameraView };\n//# sourceMappingURL=index.js.map","/**\n * Converts canvas to base64 string\n */\nexport function canvasToBase64(canvas, quality) {\n const dataUrl = canvas.toDataURL('image/jpeg', quality);\n return dataUrl.split(',')[1];\n}\n/**\n * Calculates the visible area of the video based on object-fit: cover\n */\nexport function calculateVisibleArea(video) {\n // Get the displayed dimensions of the video element\n const videoRect = video.getBoundingClientRect();\n const displayWidth = videoRect.width;\n const displayHeight = videoRect.height;\n // Get the intrinsic dimensions of the video\n const videoWidth = video.videoWidth;\n const videoHeight = video.videoHeight;\n // Calculate which portion of the video is visible (for object-fit: cover)\n const videoAspect = videoWidth / videoHeight;\n const displayAspect = displayWidth / displayHeight;\n let sourceX = 0;\n let sourceY = 0;\n let sourceWidth = videoWidth;\n let sourceHeight = videoHeight;\n // If video aspect ratio is greater than display aspect ratio,\n // the video is cropped on the sides\n if (videoAspect > displayAspect) {\n sourceWidth = videoHeight * displayAspect;\n sourceX = (videoWidth - sourceWidth) / 2;\n }\n // Otherwise the video is cropped on the top and bottom\n else {\n sourceHeight = videoWidth / displayAspect;\n sourceY = (videoHeight - sourceHeight) / 2;\n }\n return {\n sourceX,\n sourceY,\n sourceWidth,\n sourceHeight,\n displayWidth,\n displayHeight,\n };\n}\n/**\n * Draws the visible area of the video to the canvas\n */\nexport function drawVisibleAreaToCanvas(canvas, videoElement, area) {\n const { sourceX, sourceY, sourceWidth, sourceHeight, displayWidth, displayHeight } = area;\n // Set canvas size to match the displayed dimensions\n canvas.width = displayWidth;\n canvas.height = displayHeight;\n const ctx = canvas.getContext('2d', { alpha: false });\n if (!ctx) {\n throw new Error('Could not get canvas context');\n }\n // Draw only the visible portion of the video to match what the user sees\n ctx.drawImage(videoElement, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, displayWidth, displayHeight);\n}\n/**\n * Transforms barcode coordinates from the video source space to display space\n * accounting for object-fit: cover scaling and cropping.\n *\n * @param barcodeBoundingBox The original barcode bounding box from the detector\n * @param videoElement The video element with the camera stream\n * @returns The transformed bounding box coordinates in display space\n */\nexport function transformBarcodeBoundingBox(barcodeBoundingBox, videoElement) {\n // Get the video element's displayed dimensions\n const videoRect = videoElement.getBoundingClientRect();\n const displayWidth = videoRect.width;\n const displayHeight = videoRect.height;\n // Get original video dimensions\n const videoWidth = videoElement.videoWidth;\n const videoHeight = videoElement.videoHeight;\n // Calculate scaling and positioning for object-fit: cover\n const videoAspect = videoWidth / videoHeight;\n const displayAspect = displayWidth / displayHeight;\n let scaledX, scaledY, scaledWidth, scaledHeight;\n if (videoAspect > displayAspect) {\n // Video is wider than display area - height matches, width is centered and cropped\n const scale = displayHeight / videoHeight;\n const scaledVideoWidth = videoWidth * scale;\n const cropX = (scaledVideoWidth - displayWidth) / 2;\n scaledWidth = barcodeBoundingBox.width * scale;\n scaledHeight = barcodeBoundingBox.height * scale;\n scaledX = barcodeBoundingBox.x * scale - cropX;\n scaledY = barcodeBoundingBox.y * scale;\n }\n else {\n // Video is taller than display area - width matches, height is centered and cropped\n const scale = displayWidth / videoWidth;\n const scaledVideoHeight = videoHeight * scale;\n const cropY = (scaledVideoHeight - displayHeight) / 2;\n scaledWidth = barcodeBoundingBox.width * scale;\n scaledHeight = barcodeBoundingBox.height * scale;\n scaledX = barcodeBoundingBox.x * scale;\n scaledY = barcodeBoundingBox.y * scale - cropY;\n }\n return {\n x: scaledX,\n y: scaledY,\n width: scaledWidth,\n height: scaledHeight,\n };\n}\n//# sourceMappingURL=utils.js.map","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar _CameraViewWeb_isRunning;\nimport { WebPlugin } from '@capacitor/core';\nimport { calculateVisibleArea, canvasToBase64, drawVisibleAreaToCanvas, transformBarcodeBoundingBox } from './utils';\nexport const BARCODE_TYPE_TO_WEB_FORMAT = {\n qr: 'qr_code',\n code128: 'code_128',\n code39: 'code_39',\n code39Mod43: null,\n code93: 'code_93',\n ean8: 'ean_8',\n ean13: 'ean_13',\n interleaved2of5: 'itf',\n itf14: 'itf',\n pdf417: 'pdf417',\n aztec: 'aztec',\n dataMatrix: 'data_matrix',\n upce: 'upc_e',\n};\n/**\n * Web implementation of the CameraViewPlugin.\n * Optimized for performance and battery efficiency.\n */\nexport class CameraViewWeb extends WebPlugin {\n constructor() {\n super();\n // DOM elements\n this.videoElement = null;\n this.canvasElement = null;\n // Stream state\n this.stream = null;\n _CameraViewWeb_isRunning.set(this, false);\n // Configuration state\n this.currentCamera = 'environment'; // Default to back camera\n this.currentZoom = 1.0;\n this.currentFlashMode = 'off';\n // Barcode detection support\n this.barcodeDetectionSupported = false;\n this.barcodeDetector = null;\n // Recording state\n this.mediaRecorder = null;\n this.recordedChunks = [];\n this.recordingAudioTrack = null;\n this.recordingResolve = null;\n this.recordingReject = null;\n this.checkBarcodeDetectionSupport();\n }\n /**\n * Start the camera with the given configuration\n */\n async start(options) {\n if (__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\")) {\n return;\n }\n const permissionStatus = await this.requestPermissions();\n if (permissionStatus.camera !== 'granted') {\n throw new Error('Camera permission was not granted');\n }\n try {\n // Set up video element if it doesn't exist\n if (!this.videoElement) {\n await this.setupVideoElement(options === null || options === void 0 ? void 0 : options.containerElementId);\n }\n // Set up video constraints based on options\n const videoConstraints = {};\n // Prefer deviceId if specified\n if (options === null || options === void 0 ? void 0 : options.deviceId) {\n videoConstraints.deviceId = { exact: options.deviceId };\n // Remember the current camera mode (though we're using a specific device)\n this.currentCamera = (options === null || options === void 0 ? void 0 : options.position) === 'front' ? 'user' : 'environment';\n }\n else {\n // Fall back to facing mode\n const facingMode = (options === null || options === void 0 ? void 0 : options.position) === 'front' ? 'user' : 'environment';\n this.currentCamera = facingMode;\n videoConstraints.facingMode = facingMode;\n }\n const constraints = {\n video: videoConstraints,\n audio: false,\n };\n this.stream = await navigator.mediaDevices.getUserMedia(constraints);\n if (this.videoElement) {\n this.videoElement.srcObject = this.stream;\n this.videoElement.play();\n __classPrivateFieldSet(this, _CameraViewWeb_isRunning, true, \"f\");\n // If barcode detection is enabled and supported, start detection\n if (options === null || options === void 0 ? void 0 : options.enableBarcodeDetection) {\n await this.checkBarcodeDetectionSupport();\n if (this.barcodeDetectionSupported) {\n await this.configureBarcodeDetector(options === null || options === void 0 ? void 0 : options.barcodeTypes);\n this.startBarcodeDetection();\n }\n }\n }\n }\n catch (err) {\n throw new Error(`Failed to start camera: ${this.formatError(err)}`);\n }\n }\n /**\n * Stop the camera and release resources\n */\n async stop() {\n var _a;\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\")) {\n return;\n }\n try {\n // Stop any active recording\n if (this.mediaRecorder && this.mediaRecorder.state !== 'inactive') {\n // Reject any pending stopRecording promise since we're force-stopping\n (_a = this.recordingReject) === null || _a === void 0 ? void 0 : _a.call(this, new Error('Camera session stopped while recording'));\n this.recordingResolve = null;\n this.recordingReject = null;\n this.mediaRecorder.stop();\n this.mediaRecorder = null;\n }\n this.recordedChunks = [];\n if (this.recordingAudioTrack) {\n this.recordingAudioTrack.stop();\n this.recordingAudioTrack = null;\n }\n // Stop all tracks in the stream\n if (this.stream) {\n this.stream.getTracks().forEach((track) => track.stop());\n this.stream = null;\n }\n // Clear video source\n if (this.videoElement) {\n this.videoElement = null;\n }\n __classPrivateFieldSet(this, _CameraViewWeb_isRunning, false, \"f\");\n }\n catch (err) {\n throw new Error(`Failed to stop camera: ${this.formatError(err)}`);\n }\n }\n /**\n * Check if the camera is currently running\n */\n async isRunning() {\n return { isRunning: __classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\") };\n }\n /**\n * Capture a photo using the camera and return it as a base64-encoded JPEG image.\n * Preserves what the user actually sees in the UI, including cropping from object-fit: cover.\n */\n async capture(options) {\n const videoElement = this.videoElement;\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\") || !videoElement) {\n throw new Error('Camera is not running');\n }\n try {\n const canvas = this.getCanvasElement();\n const visibleArea = calculateVisibleArea(videoElement);\n drawVisibleAreaToCanvas(canvas, videoElement, visibleArea);\n const quality = Math.min(1.0, Math.max(0.1, options.quality / 100));\n if (options.saveToFile) {\n // Create a blob from canvas and return a blob URL\n return new Promise((resolve, reject) => {\n canvas.toBlob((blob) => {\n if (!blob) {\n reject(new Error('Failed to create blob from canvas'));\n return;\n }\n const url = URL.createObjectURL(blob);\n resolve({ webPath: url });\n }, 'image/jpeg', quality);\n });\n }\n else {\n // Return base64 data\n const base64Data = canvasToBase64(canvas, quality);\n return { photo: base64Data };\n }\n }\n catch (err) {\n throw new Error(`Failed to capture photo: ${this.formatError(err)}`);\n }\n }\n /**\n * Web implementation already uses images from the video stream, so this is the same as `capture()`\n */\n async captureSample(options) {\n return this.capture(options);\n }\n /**\n * Start recording video using MediaRecorder API\n */\n async startRecording(options) {\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\") || !this.videoElement) {\n throw new Error('Camera is not running');\n }\n if (this.mediaRecorder) {\n throw new Error('Recording is already in progress');\n }\n try {\n let stream = this.stream;\n // If audio is requested, get a new stream with audio track\n if ((options === null || options === void 0 ? void 0 : options.enableAudio) && stream) {\n const audioStream = await navigator.mediaDevices.getUserMedia({ audio: true });\n const audioTrack = audioStream.getAudioTracks()[0];\n this.recordingAudioTrack = audioTrack;\n const videoTracks = stream.getVideoTracks();\n stream = new MediaStream([...videoTracks, audioTrack]);\n }\n if (!stream) {\n throw new Error('No camera stream available');\n }\n this.recordedChunks = [];\n const mimeType = ['video/webm;codecs=vp9', 'video/webm', 'video/mp4'].find((type) => MediaRecorder.isTypeSupported(type));\n if (!mimeType) {\n throw new Error('No supported video recording format found');\n }\n this.mediaRecorder = new MediaRecorder(stream, { mimeType });\n this.mediaRecorder.ondataavailable = (event) => {\n if (event.data && event.data.size > 0) {\n this.recordedChunks.push(event.data);\n }\n };\n this.mediaRecorder.onstop = () => {\n var _a;\n // Stop audio track if it was added for recording\n if (this.recordingAudioTrack) {\n this.recordingAudioTrack.stop();\n this.recordingAudioTrack = null;\n }\n const blob = new Blob(this.recordedChunks, { type: mimeType });\n const url = URL.createObjectURL(blob);\n this.recordedChunks = [];\n this.mediaRecorder = null;\n (_a = this.recordingResolve) === null || _a === void 0 ? void 0 : _a.call(this, { webPath: url });\n this.recordingResolve = null;\n this.recordingReject = null;\n };\n this.mediaRecorder.onerror = (event) => {\n var _a, _b, _c;\n if (this.recordingAudioTrack) {\n this.recordingAudioTrack.stop();\n this.recordingAudioTrack = null;\n }\n this.mediaRecorder = null;\n this.recordedChunks = [];\n const errorMessage = (_b = (_a = event.error) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : 'Unknown recording error';\n (_c = this.recordingReject) === null || _c === void 0 ? void 0 : _c.call(this, new Error('Recording error: ' + errorMessage));\n this.recordingResolve = null;\n this.recordingReject = null;\n };\n this.mediaRecorder.start(100); // Collect data in 100ms chunks\n }\n catch (err) {\n if (this.recordingAudioTrack) {\n this.recordingAudioTrack.stop();\n this.recordingAudioTrack = null;\n }\n this.mediaRecorder = null;\n this.recordedChunks = [];\n throw new Error(`Failed to start recording: ${this.formatError(err)}`);\n }\n }\n /**\n * Stop the current video recording\n */\n async stopRecording() {\n if (!this.mediaRecorder) {\n throw new Error('No recording is in progress');\n }\n return new Promise((resolve, reject) => {\n var _a;\n this.recordingResolve = resolve;\n this.recordingReject = reject;\n (_a = this.mediaRecorder) === null || _a === void 0 ? void 0 : _a.stop();\n });\n }\n /**\n * Flip between front and back camera\n */\n async flipCamera() {\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\")) {\n throw new Error('Camera is not running');\n }\n try {\n // Switch current camera\n this.currentCamera = this.currentCamera === 'user' ? 'environment' : 'user';\n // Stop current stream\n if (this.stream) {\n this.stream.getTracks().forEach((track) => track.stop());\n }\n // Restart with new facing mode\n const constraints = {\n video: {\n facingMode: this.currentCamera,\n },\n audio: false,\n };\n this.stream = await navigator.mediaDevices.getUserMedia(constraints);\n if (this.videoElement) {\n this.videoElement.srcObject = this.stream;\n }\n }\n catch (err) {\n throw new Error(`Failed to flip camera: ${this.formatError(err)}`);\n }\n }\n /**\n * Get available camera devices\n */\n async getAvailableDevices() {\n try {\n const devices = await navigator.mediaDevices.enumerateDevices();\n const videoDevices = devices.filter((device) => device.kind === 'videoinput');\n return {\n devices: videoDevices.map((device) => ({\n id: device.deviceId,\n name: device.label || `Camera ${device.deviceId.substring(0, 5)}`,\n position: device.label.toLowerCase().includes('front') ? 'front' : 'back',\n })),\n };\n }\n catch (err) {\n console.error('Failed to get available devices', err);\n return { devices: [] };\n }\n }\n /**\n * Get current zoom information (web has limited zoom support)\n */\n async getZoom() {\n // Web has limited zoom capabilities in most browsers,\n // we fake zoomin by scaling the video element\n return {\n min: 1.0,\n max: 3.0,\n current: this.currentZoom,\n };\n }\n /**\n * Set zoom level (limited support in web)\n */\n async setZoom(options) {\n // Store the requested zoom level\n this.currentZoom = options.level;\n // Apply visual zoom using CSS transform when native zoom isn't supported\n if (this.videoElement) {\n this.videoElement.style.transition = options.ramp ? 'transform 0.2s ease-in-out' : 'none';\n const scale = Math.max(1.0, Math.min(options.level, 3.0)); // Limit scale to reasonable bounds\n this.videoElement.style.transform = `scale(${scale})`;\n this.videoElement.style.transformOrigin = 'center';\n }\n }\n /**\n * Get current flash mode\n */\n async getFlashMode() {\n return { flashMode: this.currentFlashMode };\n }\n /**\n * Get supported flash modes\n */\n async getSupportedFlashModes() {\n // Web has limited flash control\n return { flashModes: ['off'] };\n }\n /**\n * Set flash mode (limited support in web)\n */\n async setFlashMode(options) {\n this.currentFlashMode = options.mode;\n console.warn('Flash mode control is not fully supported in the web implementation');\n }\n /**\n * Check if torch is available (not supported in web)\n */\n async isTorchAvailable() {\n // Torch is not supported in web implementation\n return { available: false };\n }\n /**\n * Get torch mode (not supported in web)\n */\n async getTorchMode() {\n // Torch is not supported in web implementation\n return { enabled: false, level: 0.0 };\n }\n /**\n * Set torch mode (not supported in web)\n */\n async setTorchMode() {\n // Torch is not supported in web implementation\n throw this.unimplemented('Torch control is not supported in web implementation.');\n }\n /**\n * Check camera and microphone permission without requesting\n */\n async checkPermissions() {\n try {\n // Use Permissions API if available\n if (navigator.permissions) {\n const [cameraResult, microphoneResult] = await Promise.all([\n navigator.permissions.query({ name: 'camera' }),\n navigator.permissions.query({ name: 'microphone' }),\n ]);\n return {\n camera: cameraResult.state === 'granted' ? 'granted' : cameraResult.state === 'denied' ? 'denied' : 'prompt',\n microphone: microphoneResult.state === 'granted'\n ? 'granted'\n : microphoneResult.state === 'denied'\n ? 'denied'\n : 'prompt',\n };\n }\n // If Permissions API is not available, fall back to checking the active stream\n return {\n camera: this.stream ? 'granted' : 'prompt',\n microphone: 'prompt',\n };\n }\n catch (err) {\n // If permissions API is not supported or fails\n return {\n camera: 'prompt',\n microphone: 'prompt',\n };\n }\n }\n /**\n * Request camera and/or microphone permissions from the user.\n * By default, only camera permission is requested.\n */\n async requestPermissions(options) {\n var _a;\n const permissions = (_a = options === null || options === void 0 ? void 0 : options.permissions) !== null && _a !== void 0 ? _a : ['camera'];\n const result = { camera: 'prompt', microphone: 'prompt' };\n // Request camera permission if included\n if (permissions.includes('camera')) {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ video: true });\n stream.getTracks().forEach((track) => track.stop());\n result.camera = 'granted';\n }\n catch (_b) {\n result.camera = 'denied';\n }\n }\n else {\n // Still report current status even if not requesting\n result.camera = (await this.checkPermissions()).camera;\n }\n // Request microphone permission only if explicitly included\n if (permissions.includes('microphone')) {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n stream.getTracks().forEach((track) => track.stop());\n result.microphone = 'granted';\n }\n catch (_c) {\n result.microphone = 'denied';\n }\n }\n else {\n result.microphone = (await this.checkPermissions()).microphone;\n }\n return result;\n }\n /**\n * Start barcode detection if supported\n */\n async startBarcodeDetection() {\n const barcodeDetector = this.barcodeDetector;\n const videoElement = this.videoElement;\n if (!this.barcodeDetectionSupported || !barcodeDetector || !videoElement) {\n return;\n }\n // Make sure video is fully loaded before starting detection\n if (videoElement.readyState < 2) {\n await new Promise((resolve) => {\n const loadHandler = () => {\n videoElement.removeEventListener('loadeddata', loadHandler);\n resolve();\n };\n videoElement.addEventListener('loadeddata', loadHandler);\n });\n }\n // Add throttling to reduce CPU usage\n let lastDetectionTime = 0;\n const minTimeBetweenDetections = 100; // ms\n // Set up periodic frame analysis for barcode detection\n const detectFrame = async () => {\n if (!__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\") || !videoElement || !barcodeDetector) {\n return;\n }\n const now = Date.now();\n if (now - lastDetectionTime >= minTimeBetweenDetections) {\n try {\n const barcodes = await barcodeDetector.detect(videoElement);\n lastDetectionTime = now;\n if (barcodes.length > 0) {\n const barcode = barcodes[0];\n // Transform barcode coordinates using the utility function\n const boundingRect = transformBarcodeBoundingBox(barcode.boundingBox, videoElement);\n this.notifyListeners('barcodeDetected', {\n value: barcode.rawValue,\n type: barcode.format.toLowerCase(),\n boundingRect,\n });\n }\n }\n catch (err) {\n console.error('Barcode detection error', err);\n }\n }\n if (__classPrivateFieldGet(this, _CameraViewWeb_isRunning, \"f\")) {\n requestAnimationFrame(detectFrame);\n }\n };\n requestAnimationFrame(detectFrame);\n }\n /**\n * Clean up resources when the plugin is disposed\n */\n async handleOnDestroy() {\n var _a;\n await this.stop();\n // Remove elements from DOM\n if ((_a = this.videoElement) === null || _a === void 0 ? void 0 : _a.parentNode) {\n this.videoElement.parentNode.removeChild(this.videoElement);\n this.videoElement = null;\n }\n if (this.canvasElement) {\n this.canvasElement = null;\n }\n this.barcodeDetector = null;\n }\n /**\n * Check if barcode detection is supported in this browser\n */\n async checkBarcodeDetectionSupport() {\n if ('BarcodeDetector' in window) {\n try {\n this.barcodeDetector = new BarcodeDetector();\n this.barcodeDetectionSupported = true;\n }\n catch (e) {\n console.warn('BarcodeDetector is not supported by this browser.');\n this.barcodeDetectionSupported = false;\n }\n }\n }\n /**\n * Configure the barcode detector with requested barcode formats.\n * Unsupported formats are ignored and logged.\n */\n async configureBarcodeDetector(barcodeTypes) {\n if (!this.barcodeDetectionSupported) {\n return;\n }\n if (!(barcodeTypes === null || barcodeTypes === void 0 ? void 0 : barcodeTypes.length)) {\n this.barcodeDetector = new BarcodeDetector();\n return;\n }\n const requestedFormats = barcodeTypes\n .map((barcodeType) => {\n const webFormat = BARCODE_TYPE_TO_WEB_FORMAT[barcodeType];\n if (!webFormat) {\n console.warn(`[CameraView] Barcode type \"${barcodeType}\" is not supported by the web BarcodeDetector API.`);\n }\n return webFormat;\n })\n .filter((format) => format !== null);\n if (!requestedFormats.length) {\n console.warn('[CameraView] No requested barcode types are supported on web. Falling back to all supported formats.');\n this.barcodeDetector = new BarcodeDetector();\n return;\n }\n const uniqueRequestedFormats = Array.from(new Set(requestedFormats));\n try {\n const supportedFormats = await BarcodeDetector.getSupportedFormats();\n const configuredFormats = uniqueRequestedFormats.filter((format) => supportedFormats.includes(format));\n const ignoredFormats = uniqueRequestedFormats.filter((format) => !supportedFormats.includes(format));\n if (ignoredFormats.length) {\n console.warn(`[CameraView] Ignoring unsupported barcode formats for this browser: ${ignoredFormats.join(', ')}.`);\n }\n if (!configuredFormats.length) {\n console.warn('[CameraView] No requested barcode formats are available in this browser. Falling back to all supported formats.');\n this.barcodeDetector = new BarcodeDetector();\n return;\n }\n this.barcodeDetector = new BarcodeDetector({ formats: configuredFormats });\n }\n catch (error) {\n console.warn('[CameraView] Failed to resolve supported barcode formats; falling back to unfiltered detector.', error);\n this.barcodeDetector = new BarcodeDetector();\n }\n }\n /**\n * Set up the video element for the camera view\n */\n async setupVideoElement(containerElementId) {\n this.videoElement = document.createElement('video');\n this.videoElement.playsInline = true;\n this.videoElement.autoplay = true;\n this.videoElement.muted = true;\n this.videoElement.style.width = '100%';\n this.videoElement.style.height = '100%';\n this.videoElement.style.objectFit = 'cover';\n // If a container ID is provided, find that element and append the video to it\n if (containerElementId) {\n const container = document.getElementById(containerElementId);\n if (!container) {\n throw new Error(`Container element with ID ${containerElementId} not found`);\n }\n container.appendChild(this.videoElement);\n }\n else {\n // Otherwise, append to body as fallback\n document.body.appendChild(this.videoElement);\n }\n }\n /**\n * Ensures canvas element exists and returns it\n */\n getCanvasElement() {\n if (!this.canvasElement) {\n this.canvasElement = document.createElement('canvas');\n }\n return this.canvasElement;\n }\n /**\n * Format error message\n */\n formatError(err) {\n return err instanceof Error ? err.message : String(err);\n }\n}\n_CameraViewWeb_isRunning = new WeakMap();\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","this","WebPlugin"],"mappings":";;;IACA;IACA;IACA;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICND;IACA;IACA;IACO,SAAS,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE;IAChD,IAAI,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC;IAC3D,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChC;IACA;IACA;IACA;IACO,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AQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM;IAC9C,QAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM;IAC/C,QAAQ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,OAAO;IACnD;IACA,QAAQ,IAAI,kBAAkB,EAAE;IAChC,YAAY,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC;IACzE,YAAY,IAAI,CAAC,SAAS,EAAE;IAC5B,gBAAgB,MAAM,IAAI,KAAK,CAAC,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC5F,YAAY;IACZ,YAAY,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;IACpD,QAAQ;IACR,aAAa;IACb;IACA,YAAY,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;IACxD,QAAQ;IACR,IAAI;IACJ;IACA;IACA;IACA,IAAI,gBAAgB,GAAG;IACvB,QAAQ,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;IACjC,YAAY,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;IACjE,QAAQ;IACR,QAAQ,OAAO,IAAI,CAAC,aAAa;IACjC,IAAI;IACJ;IACA;IACA;IACA,IAAI,WAAW,CAAC,GAAG,EAAE;IACrB,QAAQ,OAAO,GAAG,YAAY,KAAK,GAAG,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC;IAC/D,IAAI;IACJ;IACA,wBAAwB,GAAG,IAAI,OAAO,EAAE;;;;;;;;;;;;;;;;"}
@@ -9,6 +9,12 @@ public struct BarcodeDetectedEvent: Sendable {
9
9
  /// The decoded string value of the barcode.
10
10
  public let value: String
11
11
 
12
+ /// The barcode value in a human readable format.
13
+ public let displayValue: String?
14
+
15
+ /// Raw bytes as they were encoded in the barcode when the platform exposes them.
16
+ public let rawBytes: [UInt8]?
17
+
12
18
  /// The type of barcode detected (e.g., "org.iso.QRCode").
13
19
  public let type: String
14
20
 
@@ -40,19 +46,37 @@ public struct BarcodeDetectedEvent: Sendable {
40
46
  }
41
47
  }
42
48
 
43
- public init(value: String, type: String, boundingRect: BoundingRect) {
49
+ public init(
50
+ value: String,
51
+ displayValue: String? = nil,
52
+ rawBytes: [UInt8]? = nil,
53
+ type: String,
54
+ boundingRect: BoundingRect
55
+ ) {
44
56
  self.value = value
57
+ self.displayValue = displayValue
58
+ self.rawBytes = rawBytes
45
59
  self.type = type
46
60
  self.boundingRect = boundingRect
47
61
  }
48
62
 
49
63
  /// Converts to dictionary for Capacitor event emission.
50
64
  public func toDictionary() -> [String: Any] {
51
- return [
65
+ var dictionary: [String: Any] = [
52
66
  "value": value,
53
67
  "type": type,
54
68
  "boundingRect": boundingRect.toDictionary()
55
69
  ]
70
+
71
+ if let displayValue {
72
+ dictionary["displayValue"] = displayValue
73
+ }
74
+
75
+ if let rawBytes {
76
+ dictionary["rawBytes"] = rawBytes.map(Int.init)
77
+ }
78
+
79
+ return dictionary
56
80
  }
57
81
  }
58
82
 
@@ -81,7 +105,7 @@ public protocol CameraEventDelegate: AnyObject {
81
105
  /// These maintain backwards compatibility with the NotificationCenter-based event system.
82
106
  public extension Notification.Name {
83
107
  /// Posted when a barcode is detected.
84
- /// UserInfo contains: "value", "type", "boundingRect"
108
+ /// UserInfo contains: "value", "displayValue", "rawBytes", "type", "boundingRect"
85
109
  static let cameraViewBarcodeDetected = Notification.Name("barcodeDetected")
86
110
  }
87
111
 
@@ -1,4 +1,5 @@
1
1
  import AVFoundation
2
+ import CoreImage
2
3
  import Foundation
3
4
 
4
5
  extension CameraViewManager: AVCaptureMetadataOutputObjectsDelegate {
@@ -36,7 +37,7 @@ extension CameraViewManager: AVCaptureMetadataOutputObjectsDelegate {
36
37
  }
37
38
 
38
39
  /// Remove the metadata output if in case it is already configured, e.g. because
39
- /// the camera is restarted with a diffrent setting where barcode detection was disabled
40
+ /// the camera is restarted with a different setting where barcode detection was disabled
40
41
  /// again
41
42
  internal func removeMetadataOutput() {
42
43
  if let metadataOutput = captureSession.outputs.first(where: { $0 is AVCaptureMetadataOutput }) {
@@ -62,7 +63,13 @@ extension CameraViewManager: AVCaptureMetadataOutputObjectsDelegate {
62
63
  else {
63
64
  return
64
65
  }
65
- guard let barcodeValue = metadataObject.stringValue else { return }
66
+
67
+ let barcodeValue = metadataObject.stringValue ?? ""
68
+ let rawBytes = getRawBytes(from: metadataObject)
69
+
70
+ if barcodeValue.isEmpty && rawBytes == nil {
71
+ return
72
+ }
66
73
 
67
74
  let barcodeType = metadataObject.type.rawValue
68
75
 
@@ -83,7 +90,31 @@ extension CameraViewManager: AVCaptureMetadataOutputObjectsDelegate {
83
90
  )
84
91
 
85
92
  eventEmitter.emitBarcodeDetected(
86
- BarcodeDetectedEvent(value: barcodeValue, type: barcodeType, boundingRect: boundingRect)
93
+ BarcodeDetectedEvent(
94
+ value: barcodeValue,
95
+ rawBytes: rawBytes,
96
+ type: barcodeType,
97
+ boundingRect: boundingRect
98
+ )
87
99
  )
88
100
  }
101
+
102
+ private func getRawBytes(from metadataObject: AVMetadataMachineReadableCodeObject) -> [UInt8]? {
103
+ guard let descriptor = metadataObject.descriptor else {
104
+ return nil
105
+ }
106
+
107
+ switch descriptor {
108
+ case let descriptor as CIQRCodeDescriptor:
109
+ return [UInt8](descriptor.errorCorrectedPayload)
110
+ case let descriptor as CIAztecCodeDescriptor:
111
+ return [UInt8](descriptor.errorCorrectedPayload)
112
+ case let descriptor as CIPDF417CodeDescriptor:
113
+ return [UInt8](descriptor.errorCorrectedPayload)
114
+ case let descriptor as CIDataMatrixCodeDescriptor:
115
+ return [UInt8](descriptor.errorCorrectedPayload)
116
+ default:
117
+ return nil
118
+ }
119
+ }
89
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-camera-view",
3
- "version": "2.2.0-rc.1",
3
+ "version": "2.3.0",
4
4
  "description": "A Capacitor plugin for embedding a live camera feed directly into your app.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -48,32 +48,32 @@
48
48
  "prepublishOnly": "npm run build"
49
49
  },
50
50
  "devDependencies": {
51
- "@capacitor/android": "^8.1.0",
52
- "@capacitor/core": "^8.1.0",
51
+ "@capacitor/android": "^8.3.1",
52
+ "@capacitor/core": "^8.3.1",
53
53
  "@capacitor/docgen": "^0.3.1",
54
- "@capacitor/ios": "^8.1.0",
55
- "@commitlint/config-conventional": "^20.4.2",
54
+ "@capacitor/ios": "^8.3.1",
55
+ "@commitlint/config-conventional": "^20.5.0",
56
56
  "@ionic/prettier-config": "^4.0.0",
57
57
  "@ionic/swiftlint-config": "^2.0.0",
58
58
  "@semantic-release/changelog": "^6.0.3",
59
59
  "@semantic-release/commit-analyzer": "^13.0.1",
60
60
  "@semantic-release/git": "^10.0.1",
61
61
  "@semantic-release/github": "^12.0.6",
62
- "@semantic-release/npm": "^13.1.4",
62
+ "@semantic-release/npm": "^13.1.5",
63
63
  "@semantic-release/release-notes-generator": "^14.1.0",
64
- "@typescript-eslint/eslint-plugin": "^8.56.0",
65
- "@typescript-eslint/parser": "^8.56.0",
66
- "commitlint": "^20.4.2",
64
+ "@typescript-eslint/eslint-plugin": "^8.59.1",
65
+ "@typescript-eslint/parser": "^8.59.1",
66
+ "commitlint": "^20.5.2",
67
67
  "eslint": "^9.39.2",
68
68
  "eslint-config-prettier": "^10.1.8",
69
69
  "eslint-plugin-prettier": "^5.5.5",
70
70
  "husky": "^9.1.7",
71
- "prettier": "^3.8.1",
71
+ "prettier": "^3.8.3",
72
72
  "prettier-plugin-java": "^2.8.1",
73
73
  "prettier-plugin-organize-imports": "^4.3.0",
74
- "prettier-plugin-packagejson": "^3.0.0",
74
+ "prettier-plugin-packagejson": "^3.0.2",
75
75
  "rimraf": "^6.1.3",
76
- "rollup": "^4.58.0",
76
+ "rollup": "^4.60.2",
77
77
  "semantic-release": "^25.0.3",
78
78
  "swiftlint": "^2.0.0",
79
79
  "typescript": "^5.9.3"