@capgo/camera-preview 7.4.0-beta.20 → 7.4.0-beta.22
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.
- package/README.md +30 -24
- package/android/.gradle/8.14.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/8.14.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.14.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.14.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.14.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/file-system.probe +0 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +161 -55
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraXView.java +79 -38
- package/android/src/main/java/com/ahm/capacitor/camera/preview/GridOverlayView.java +8 -1
- package/dist/docs.json +43 -2
- package/dist/esm/definitions.d.ts +8 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.js +50 -7
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +50 -7
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +50 -7
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapgoCameraPreview/CameraController.swift +70 -59
- package/ios/Sources/CapgoCameraPreview/Plugin.swift +36 -17
- package/package.json +1 -1
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var DeviceType;\n(function (DeviceType) {\n DeviceType[\"ULTRA_WIDE\"] = \"ultraWide\";\n DeviceType[\"WIDE_ANGLE\"] = \"wideAngle\";\n DeviceType[\"TELEPHOTO\"] = \"telephoto\";\n DeviceType[\"TRUE_DEPTH\"] = \"trueDepth\";\n DeviceType[\"DUAL\"] = \"dual\";\n DeviceType[\"DUAL_WIDE\"] = \"dualWide\";\n DeviceType[\"TRIPLE\"] = \"triple\";\n})(DeviceType || (DeviceType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from \"@capacitor/core\";\nconst CameraPreview = registerPlugin(\"CameraPreview\", {\n web: () => import(\"./web\").then((m) => new m.CameraPreviewWeb()),\n});\nexport * from \"./definitions\";\nexport { CameraPreview };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nimport { DeviceType } from \"./definitions\";\nconst DEFAULT_VIDEO_ID = \"capgo_video\";\nexport class CameraPreviewWeb extends WebPlugin {\n constructor() {\n super();\n /**\n * track which camera is used based on start options\n * used in capture\n */\n this.isBackCamera = false;\n this.currentDeviceId = null;\n this.videoElement = null;\n this.isStarted = false;\n }\n async getSupportedPictureSizes() {\n throw new Error(\"getSupportedPictureSizes not supported under the web platform\");\n }\n async start(options) {\n if (options.aspectRatio && (options.width || options.height)) {\n throw new Error(\"Cannot set both aspectRatio and size (width/height). Use setPreviewSize after start.\");\n }\n if (this.isStarted) {\n throw new Error(\"camera already started\");\n }\n this.isBackCamera = true;\n this.isStarted = false;\n const parent = document.getElementById((options === null || options === void 0 ? void 0 : options.parent) || \"\");\n const gridMode = (options === null || options === void 0 ? void 0 : options.gridMode) || \"none\";\n if (options.position) {\n this.isBackCamera = options.position === \"rear\";\n }\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (video) {\n video.remove();\n }\n const container = options.parent\n ? document.getElementById(options.parent)\n : document.body;\n if (!container) {\n throw new Error(\"container not found\");\n }\n this.videoElement = document.createElement(\"video\");\n this.videoElement.id = DEFAULT_VIDEO_ID;\n this.videoElement.className = options.className || \"\";\n this.videoElement.playsInline = true;\n this.videoElement.muted = true;\n this.videoElement.autoplay = true;\n // Remove objectFit as we'll match camera's native aspect ratio\n this.videoElement.style.backgroundColor = \"transparent\";\n // Reset any default margins that might interfere\n this.videoElement.style.margin = \"0\";\n this.videoElement.style.padding = \"0\";\n container.appendChild(this.videoElement);\n if (options.toBack) {\n this.videoElement.style.zIndex = \"-1\";\n }\n // Default to 16:9 vertical (9:16 for portrait) if no aspect ratio or size specified\n const useDefaultAspectRatio = !options.aspectRatio && !options.width && !options.height;\n const effectiveAspectRatio = options.aspectRatio || (useDefaultAspectRatio ? \"16:9\" : null);\n if (options.width) {\n this.videoElement.width = options.width;\n this.videoElement.style.width = `${options.width}px`;\n }\n if (options.height) {\n this.videoElement.height = options.height;\n this.videoElement.style.height = `${options.height}px`;\n }\n // Handle positioning - center if x or y not provided\n const centerX = options.x === undefined;\n const centerY = options.y === undefined;\n // Always set position to absolute for proper positioning\n this.videoElement.style.position = \"absolute\";\n console.log(\"Initial positioning flags:\", {\n centerX,\n centerY,\n x: options.x,\n y: options.y,\n });\n if (options.x !== undefined) {\n this.videoElement.style.left = `${options.x}px`;\n }\n if (options.y !== undefined) {\n this.videoElement.style.top = `${options.y}px`;\n }\n // Create and add grid overlay if needed\n if (gridMode !== \"none\") {\n const gridOverlay = this.createGridOverlay(gridMode);\n gridOverlay.id = \"camera-grid-overlay\";\n parent === null || parent === void 0 ? void 0 : parent.appendChild(gridOverlay);\n }\n // Aspect ratio handling is now done after getting camera stream\n // Store centering flags for later use\n const needsCenterX = centerX;\n const needsCenterY = centerY;\n console.log(\"Centering flags stored:\", { needsCenterX, needsCenterY });\n // First get the camera stream with basic constraints\n const constraints = {\n video: {\n facingMode: this.isBackCamera ? \"environment\" : \"user\",\n },\n };\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n if (!stream) {\n throw new Error(\"could not acquire stream\");\n }\n if (!this.videoElement) {\n throw new Error(\"video element not found\");\n }\n // Get the actual camera dimensions from the video track\n const videoTrack = stream.getVideoTracks()[0];\n const settings = videoTrack.getSettings();\n const cameraWidth = settings.width || 640;\n const cameraHeight = settings.height || 480;\n const cameraAspectRatio = cameraWidth / cameraHeight;\n console.log(\"Camera native dimensions:\", {\n width: cameraWidth,\n height: cameraHeight,\n aspectRatio: cameraAspectRatio,\n });\n console.log(\"Container dimensions:\", {\n width: container.offsetWidth,\n height: container.offsetHeight,\n id: container.id,\n });\n // Now adjust video element size based on camera's native aspect ratio\n if (!options.width && !options.height && !options.aspectRatio) {\n // No size specified, fit camera view within container bounds\n const containerWidth = container.offsetWidth || window.innerWidth;\n const containerHeight = container.offsetHeight || window.innerHeight;\n // Calculate dimensions that fit within container while maintaining camera aspect ratio\n let targetWidth, targetHeight;\n // Try fitting to container width first\n targetWidth = containerWidth;\n targetHeight = targetWidth / cameraAspectRatio;\n // If height exceeds container, fit to height instead\n if (targetHeight > containerHeight) {\n targetHeight = containerHeight;\n targetWidth = targetHeight * cameraAspectRatio;\n }\n console.log(\"Video element dimensions:\", {\n width: targetWidth,\n height: targetHeight,\n container: { width: containerWidth, height: containerHeight },\n });\n this.videoElement.width = targetWidth;\n this.videoElement.height = targetHeight;\n this.videoElement.style.width = `${targetWidth}px`;\n this.videoElement.style.height = `${targetHeight}px`;\n // Center the video element within its parent container\n if (needsCenterX || options.x === undefined) {\n const x = Math.round((containerWidth - targetWidth) / 2);\n this.videoElement.style.left = `${x}px`;\n }\n if (needsCenterY || options.y === undefined) {\n const y = Math.round((window.innerHeight - targetHeight) / 2);\n this.videoElement.style.setProperty(\"top\", `${y}px`, \"important\");\n // Force a style recalculation\n this.videoElement.offsetHeight;\n console.log(\"Centering video:\", {\n viewportHeight: window.innerHeight,\n targetHeight,\n calculatedY: y,\n actualTop: this.videoElement.style.top,\n position: this.videoElement.style.position,\n });\n }\n }\n else if (effectiveAspectRatio && !options.width && !options.height) {\n // Aspect ratio specified but no size\n const [widthRatio, heightRatio] = effectiveAspectRatio\n .split(\":\")\n .map(Number);\n const targetRatio = widthRatio / heightRatio;\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n let targetWidth, targetHeight;\n // Try fitting to viewport width first\n targetWidth = viewportWidth;\n targetHeight = targetWidth / targetRatio;\n // If height exceeds viewport, fit to height instead\n if (targetHeight > viewportHeight) {\n targetHeight = viewportHeight;\n targetWidth = targetHeight * targetRatio;\n }\n this.videoElement.width = targetWidth;\n this.videoElement.height = targetHeight;\n this.videoElement.style.width = `${targetWidth}px`;\n this.videoElement.style.height = `${targetHeight}px`;\n // Center the video element within its parent container\n if (needsCenterX || options.x === undefined) {\n const parentWidth = container.offsetWidth || viewportWidth;\n const x = Math.round((parentWidth - targetWidth) / 2);\n this.videoElement.style.left = `${x}px`;\n }\n if (needsCenterY || options.y === undefined) {\n const parentHeight = container.offsetHeight || viewportHeight;\n const y = Math.round((parentHeight - targetHeight) / 2);\n this.videoElement.style.top = `${y}px`;\n }\n }\n this.videoElement.srcObject = stream;\n if (!this.isBackCamera) {\n this.videoElement.style.transform = \"scaleX(-1)\";\n }\n // Set initial zoom level if specified and supported\n if (options.initialZoomLevel && options.initialZoomLevel !== 1.0) {\n // videoTrack already declared above\n if (videoTrack) {\n const capabilities = videoTrack.getCapabilities();\n if (capabilities.zoom) {\n const zoomLevel = options.initialZoomLevel;\n const minZoom = capabilities.zoom.min || 1;\n const maxZoom = capabilities.zoom.max || 1;\n if (zoomLevel < minZoom || zoomLevel > maxZoom) {\n stream.getTracks().forEach((track) => track.stop());\n throw new Error(`Initial zoom level ${zoomLevel} is not available. Valid range is ${minZoom} to ${maxZoom}`);\n }\n try {\n await videoTrack.applyConstraints({\n advanced: [{ zoom: zoomLevel }],\n });\n }\n catch (error) {\n console.warn(`Failed to set initial zoom level: ${error}`);\n // Don't throw, just continue without zoom\n }\n }\n }\n }\n this.isStarted = true;\n // Wait for video to be ready and get actual dimensions\n await new Promise((resolve) => {\n if (this.videoElement.readyState >= 2) {\n resolve();\n }\n else {\n this.videoElement.addEventListener(\"loadeddata\", () => resolve(), {\n once: true,\n });\n }\n });\n // Ensure centering is applied after DOM updates\n await new Promise((resolve) => requestAnimationFrame(resolve));\n console.log(\"About to re-center, flags:\", { needsCenterX, needsCenterY });\n // Re-apply centering with correct parent dimensions\n if (needsCenterX) {\n const parentWidth = container.offsetWidth;\n const x = Math.round((parentWidth - this.videoElement.offsetWidth) / 2);\n this.videoElement.style.left = `${x}px`;\n console.log(\"Re-centering X:\", {\n parentWidth,\n videoWidth: this.videoElement.offsetWidth,\n x,\n });\n }\n if (needsCenterY) {\n const y = Math.round((window.innerHeight - this.videoElement.offsetHeight) / 2);\n this.videoElement.style.setProperty(\"top\", `${y}px`, \"important\");\n console.log(\"Re-centering Y:\", {\n viewportHeight: window.innerHeight,\n videoHeight: this.videoElement.offsetHeight,\n y,\n position: this.videoElement.style.position,\n top: this.videoElement.style.top,\n });\n }\n // Get the actual rendered dimensions after video is loaded\n const rect = this.videoElement.getBoundingClientRect();\n const computedStyle = window.getComputedStyle(this.videoElement);\n console.log(\"Final video element state:\", {\n rect: { x: rect.x, y: rect.y, width: rect.width, height: rect.height },\n style: {\n position: computedStyle.position,\n left: computedStyle.left,\n top: computedStyle.top,\n width: computedStyle.width,\n height: computedStyle.height,\n },\n });\n return {\n width: Math.round(rect.width),\n height: Math.round(rect.height),\n x: Math.round(rect.x),\n y: Math.round(rect.y),\n };\n }\n stopStream(stream) {\n if (stream) {\n const tracks = stream.getTracks();\n for (const track of tracks)\n track.stop();\n }\n }\n async stop() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (video) {\n video.pause();\n this.stopStream(video.srcObject);\n video.remove();\n this.isStarted = false;\n }\n // Remove grid overlay if it exists\n const gridOverlay = document.getElementById(\"camera-grid-overlay\");\n gridOverlay === null || gridOverlay === void 0 ? void 0 : gridOverlay.remove();\n }\n async capture(options) {\n return new Promise((resolve, reject) => {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n reject(new Error(\"camera is not running\"));\n return;\n }\n // video.width = video.offsetWidth;\n let base64EncodedImage;\n if (video && video.videoWidth > 0 && video.videoHeight > 0) {\n const canvas = document.createElement(\"canvas\");\n const context = canvas.getContext(\"2d\");\n // Calculate capture dimensions\n let captureWidth = video.videoWidth;\n let captureHeight = video.videoHeight;\n let sourceX = 0;\n let sourceY = 0;\n // Check for conflicting parameters\n if (options.aspectRatio && (options.width || options.height)) {\n reject(new Error(\"Cannot set both aspectRatio and size (width/height). Use setPreviewSize after start.\"));\n return;\n }\n // Handle aspect ratio if no width/height specified\n if (!options.width && !options.height && options.aspectRatio) {\n const [widthRatio, heightRatio] = options.aspectRatio.split(':').map(Number);\n if (widthRatio && heightRatio) {\n // For capture in portrait orientation, swap the aspect ratio (16:9 becomes 9:16)\n const isPortrait = video.videoHeight > video.videoWidth;\n const targetAspectRatio = isPortrait ? heightRatio / widthRatio : widthRatio / heightRatio;\n const videoAspectRatio = video.videoWidth / video.videoHeight;\n if (videoAspectRatio > targetAspectRatio) {\n // Video is wider than target - crop sides\n captureWidth = video.videoHeight * targetAspectRatio;\n captureHeight = video.videoHeight;\n sourceX = (video.videoWidth - captureWidth) / 2;\n }\n else {\n // Video is taller than target - crop top/bottom\n captureWidth = video.videoWidth;\n captureHeight = video.videoWidth / targetAspectRatio;\n sourceY = (video.videoHeight - captureHeight) / 2;\n }\n }\n }\n else if (options.width || options.height) {\n // If width or height is specified, use them\n if (options.width)\n captureWidth = options.width;\n if (options.height)\n captureHeight = options.height;\n }\n canvas.width = captureWidth;\n canvas.height = captureHeight;\n // flip horizontally back camera isn't used\n if (!this.isBackCamera) {\n context === null || context === void 0 ? void 0 : context.translate(captureWidth, 0);\n context === null || context === void 0 ? void 0 : context.scale(-1, 1);\n }\n context === null || context === void 0 ? void 0 : context.drawImage(video, sourceX, sourceY, captureWidth, captureHeight, 0, 0, captureWidth, captureHeight);\n if (options.saveToGallery) {\n // saveToGallery is not supported on web\n }\n if (options.withExifLocation) {\n // withExifLocation is not supported on web\n }\n if ((options.format || \"jpeg\") === \"jpeg\") {\n base64EncodedImage = canvas\n .toDataURL(\"image/jpeg\", (options.quality || 85) / 100.0)\n .replace(\"data:image/jpeg;base64,\", \"\");\n }\n else {\n base64EncodedImage = canvas\n .toDataURL(\"image/png\")\n .replace(\"data:image/png;base64,\", \"\");\n }\n }\n resolve({\n value: base64EncodedImage,\n exif: {},\n });\n });\n }\n async captureSample(_options) {\n return this.capture(_options);\n }\n async stopRecordVideo() {\n throw new Error(\"stopRecordVideo not supported under the web platform\");\n }\n async startRecordVideo(_options) {\n console.log(\"startRecordVideo\", _options);\n throw new Error(\"startRecordVideo not supported under the web platform\");\n }\n async getSupportedFlashModes() {\n throw new Error(\"getSupportedFlashModes not supported under the web platform\");\n }\n async getHorizontalFov() {\n throw new Error(\"getHorizontalFov not supported under the web platform\");\n }\n async setFlashMode(_options) {\n throw new Error(`setFlashMode not supported under the web platform${_options}`);\n }\n async flip() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n // Stop current stream\n this.stopStream(video.srcObject);\n // Toggle camera position\n this.isBackCamera = !this.isBackCamera;\n // Get new constraints\n const constraints = {\n video: {\n facingMode: this.isBackCamera ? \"environment\" : \"user\",\n width: { ideal: video.videoWidth || 640 },\n height: { ideal: video.videoHeight || 480 },\n },\n };\n try {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n video.srcObject = stream;\n // Update current device ID from the new stream\n const videoTrack = stream.getVideoTracks()[0];\n if (videoTrack) {\n this.currentDeviceId = videoTrack.getSettings().deviceId || null;\n }\n // Update video transform based on camera\n if (this.isBackCamera) {\n video.style.transform = \"none\";\n video.style.webkitTransform = \"none\";\n }\n else {\n video.style.transform = \"scaleX(-1)\";\n video.style.webkitTransform = \"scaleX(-1)\";\n }\n await video.play();\n }\n catch (error) {\n throw new Error(`Failed to flip camera: ${error}`);\n }\n }\n async setOpacity(_options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!!video && !!_options.opacity)\n video.style.setProperty(\"opacity\", _options.opacity.toString());\n }\n async isRunning() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n return { isRunning: !!video && !!video.srcObject };\n }\n async getAvailableDevices() {\n var _a;\n if (!((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.enumerateDevices)) {\n throw new Error(\"getAvailableDevices not supported under the web platform\");\n }\n const devices = await navigator.mediaDevices.enumerateDevices();\n const videoDevices = devices.filter((device) => device.kind === \"videoinput\");\n // Group devices by position (front/back)\n const frontDevices = [];\n const backDevices = [];\n videoDevices.forEach((device, index) => {\n const label = device.label || `Camera ${index + 1}`;\n const labelLower = label.toLowerCase();\n // Determine device type based on label\n let deviceType = DeviceType.WIDE_ANGLE;\n let baseZoomRatio = 1.0;\n if (labelLower.includes(\"ultra\") || labelLower.includes(\"0.5\")) {\n deviceType = DeviceType.ULTRA_WIDE;\n baseZoomRatio = 0.5;\n }\n else if (labelLower.includes(\"telephoto\") ||\n labelLower.includes(\"tele\") ||\n labelLower.includes(\"2x\") ||\n labelLower.includes(\"3x\")) {\n deviceType = DeviceType.TELEPHOTO;\n baseZoomRatio = 2.0;\n }\n else if (labelLower.includes(\"depth\") ||\n labelLower.includes(\"truedepth\")) {\n deviceType = DeviceType.TRUE_DEPTH;\n baseZoomRatio = 1.0;\n }\n const lensInfo = {\n deviceId: device.deviceId,\n label,\n deviceType,\n focalLength: 4.25,\n baseZoomRatio,\n minZoom: 1.0,\n maxZoom: 1.0,\n };\n // Determine position and add to appropriate array\n if (labelLower.includes(\"back\") || labelLower.includes(\"rear\")) {\n backDevices.push(lensInfo);\n }\n else {\n frontDevices.push(lensInfo);\n }\n });\n const result = [];\n if (frontDevices.length > 0) {\n result.push({\n deviceId: frontDevices[0].deviceId,\n label: \"Front Camera\",\n position: \"front\",\n lenses: frontDevices,\n isLogical: false,\n minZoom: Math.min(...frontDevices.map((d) => d.minZoom)),\n maxZoom: Math.max(...frontDevices.map((d) => d.maxZoom)),\n });\n }\n if (backDevices.length > 0) {\n result.push({\n deviceId: backDevices[0].deviceId,\n label: \"Back Camera\",\n position: \"rear\",\n lenses: backDevices,\n isLogical: false,\n minZoom: Math.min(...backDevices.map((d) => d.minZoom)),\n maxZoom: Math.max(...backDevices.map((d) => d.maxZoom)),\n });\n }\n return { devices: result };\n }\n async getZoom() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n const stream = video.srcObject;\n const videoTrack = stream.getVideoTracks()[0];\n if (!videoTrack) {\n throw new Error(\"no video track found\");\n }\n const capabilities = videoTrack.getCapabilities();\n const settings = videoTrack.getSettings();\n if (!capabilities.zoom) {\n throw new Error(\"zoom not supported by this device\");\n }\n // Get current device info to determine lens type\n let deviceType = DeviceType.WIDE_ANGLE;\n let baseZoomRatio = 1.0;\n if (this.currentDeviceId) {\n const devices = await navigator.mediaDevices.enumerateDevices();\n const device = devices.find((d) => d.deviceId === this.currentDeviceId);\n if (device) {\n const labelLower = device.label.toLowerCase();\n if (labelLower.includes(\"ultra\") || labelLower.includes(\"0.5\")) {\n deviceType = DeviceType.ULTRA_WIDE;\n baseZoomRatio = 0.5;\n }\n else if (labelLower.includes(\"telephoto\") ||\n labelLower.includes(\"tele\") ||\n labelLower.includes(\"2x\") ||\n labelLower.includes(\"3x\")) {\n deviceType = DeviceType.TELEPHOTO;\n baseZoomRatio = 2.0;\n }\n else if (labelLower.includes(\"depth\") ||\n labelLower.includes(\"truedepth\")) {\n deviceType = DeviceType.TRUE_DEPTH;\n baseZoomRatio = 1.0;\n }\n }\n }\n const currentZoom = settings.zoom || 1;\n const lensInfo = {\n focalLength: 4.25,\n deviceType,\n baseZoomRatio,\n digitalZoom: currentZoom / baseZoomRatio,\n };\n return {\n min: capabilities.zoom.min || 1,\n max: capabilities.zoom.max || 1,\n current: currentZoom,\n lens: lensInfo,\n };\n }\n async setZoom(options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n const stream = video.srcObject;\n const videoTrack = stream.getVideoTracks()[0];\n if (!videoTrack) {\n throw new Error(\"no video track found\");\n }\n const capabilities = videoTrack.getCapabilities();\n if (!capabilities.zoom) {\n throw new Error(\"zoom not supported by this device\");\n }\n const zoomLevel = Math.max(capabilities.zoom.min || 1, Math.min(capabilities.zoom.max || 1, options.level));\n // Note: autoFocus is not supported on web platform\n try {\n await videoTrack.applyConstraints({\n advanced: [{ zoom: zoomLevel }],\n });\n }\n catch (error) {\n throw new Error(`Failed to set zoom: ${error}`);\n }\n }\n async getFlashMode() {\n throw new Error(\"getFlashMode not supported under the web platform\");\n }\n async getDeviceId() {\n return { deviceId: this.currentDeviceId || \"\" };\n }\n async setDeviceId(options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n // Stop current stream\n this.stopStream(video.srcObject);\n // Update current device ID\n this.currentDeviceId = options.deviceId;\n // Get new constraints with specific device ID\n const constraints = {\n video: {\n deviceId: { exact: options.deviceId },\n width: { ideal: video.videoWidth || 640 },\n height: { ideal: video.videoHeight || 480 },\n },\n };\n try {\n // Try to determine camera position from device\n const devices = await navigator.mediaDevices.enumerateDevices();\n const device = devices.find((d) => d.deviceId === options.deviceId);\n this.isBackCamera =\n (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes(\"back\")) ||\n (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes(\"rear\")) ||\n false;\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n video.srcObject = stream;\n // Update video transform based on camera\n if (this.isBackCamera) {\n video.style.transform = \"none\";\n video.style.webkitTransform = \"none\";\n }\n else {\n video.style.transform = \"scaleX(-1)\";\n video.style.webkitTransform = \"scaleX(-1)\";\n }\n await video.play();\n }\n catch (error) {\n throw new Error(`Failed to swap to device ${options.deviceId}: ${error}`);\n }\n }\n async getAspectRatio() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!video) {\n throw new Error(\"camera is not running\");\n }\n const width = video.offsetWidth;\n const height = video.offsetHeight;\n if (width && height) {\n const ratio = width / height;\n // Check for portrait camera ratios: 4:3 -> 3:4, 16:9 -> 9:16\n if (Math.abs(ratio - 3 / 4) < 0.01) {\n return { aspectRatio: \"4:3\" };\n }\n if (Math.abs(ratio - 9 / 16) < 0.01) {\n return { aspectRatio: \"16:9\" };\n }\n }\n // Default to 4:3 if no specific aspect ratio is matched\n return { aspectRatio: \"4:3\" };\n }\n async setAspectRatio(options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!video) {\n throw new Error(\"camera is not running\");\n }\n if (options.aspectRatio) {\n const [widthRatio, heightRatio] = options.aspectRatio\n .split(\":\")\n .map(Number);\n // For camera, use portrait orientation: 4:3 becomes 3:4, 16:9 becomes 9:16\n const ratio = heightRatio / widthRatio;\n // Get current position and size\n const rect = video.getBoundingClientRect();\n const currentWidth = rect.width;\n const currentHeight = rect.height;\n const currentRatio = currentWidth / currentHeight;\n let newWidth;\n let newHeight;\n if (currentRatio > ratio) {\n // Width is larger, fit by height and center horizontally\n newWidth = currentHeight * ratio;\n newHeight = currentHeight;\n }\n else {\n // Height is larger, fit by width and center vertically\n newWidth = currentWidth;\n newHeight = currentWidth / ratio;\n }\n // Calculate position\n let x, y;\n if (options.x !== undefined && options.y !== undefined) {\n // Use provided coordinates, ensuring they stay within screen boundaries\n x = Math.max(0, Math.min(options.x, window.innerWidth - newWidth));\n y = Math.max(0, Math.min(options.y, window.innerHeight - newHeight));\n }\n else {\n // Auto-center the view\n x = (window.innerWidth - newWidth) / 2;\n y = (window.innerHeight - newHeight) / 2;\n }\n video.style.width = `${newWidth}px`;\n video.style.height = `${newHeight}px`;\n video.style.left = `${x}px`;\n video.style.top = `${y}px`;\n video.style.position = \"absolute\";\n const offsetX = newWidth / 8;\n const offsetY = newHeight / 8;\n return {\n width: Math.round(newWidth),\n height: Math.round(newHeight),\n x: Math.round(x + offsetX),\n y: Math.round(y + offsetY),\n };\n }\n else {\n video.style.objectFit = \"cover\";\n const rect = video.getBoundingClientRect();\n const offsetX = rect.width / 8;\n const offsetY = rect.height / 8;\n return {\n width: Math.round(rect.width),\n height: Math.round(rect.height),\n x: Math.round(rect.left + offsetX),\n y: Math.round(rect.top + offsetY),\n };\n }\n }\n createGridOverlay(gridMode) {\n const overlay = document.createElement(\"div\");\n overlay.style.position = \"absolute\";\n overlay.style.top = \"0\";\n overlay.style.left = \"0\";\n overlay.style.width = \"100%\";\n overlay.style.height = \"100%\";\n overlay.style.pointerEvents = \"none\";\n overlay.style.zIndex = \"10\";\n const divisions = gridMode === \"3x3\" ? 3 : 4;\n // Create SVG for grid lines\n const svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n svg.style.width = \"100%\";\n svg.style.height = \"100%\";\n svg.style.position = \"absolute\";\n svg.style.top = \"0\";\n svg.style.left = \"0\";\n // Create grid lines\n for (let i = 1; i < divisions; i++) {\n // Vertical lines\n const verticalLine = document.createElementNS(\"http://www.w3.org/2000/svg\", \"line\");\n verticalLine.setAttribute(\"x1\", `${(i / divisions) * 100}%`);\n verticalLine.setAttribute(\"y1\", \"0%\");\n verticalLine.setAttribute(\"x2\", `${(i / divisions) * 100}%`);\n verticalLine.setAttribute(\"y2\", \"100%\");\n verticalLine.setAttribute(\"stroke\", \"rgba(255, 255, 255, 0.5)\");\n verticalLine.setAttribute(\"stroke-width\", \"1\");\n svg.appendChild(verticalLine);\n // Horizontal lines\n const horizontalLine = document.createElementNS(\"http://www.w3.org/2000/svg\", \"line\");\n horizontalLine.setAttribute(\"x1\", \"0%\");\n horizontalLine.setAttribute(\"y1\", `${(i / divisions) * 100}%`);\n horizontalLine.setAttribute(\"x2\", \"100%\");\n horizontalLine.setAttribute(\"y2\", `${(i / divisions) * 100}%`);\n horizontalLine.setAttribute(\"stroke\", \"rgba(255, 255, 255, 0.5)\");\n horizontalLine.setAttribute(\"stroke-width\", \"1\");\n svg.appendChild(horizontalLine);\n }\n overlay.appendChild(svg);\n return overlay;\n }\n async setGridMode(options) {\n // Web implementation of grid mode would need to be implemented\n // For now, just resolve as a no-op\n console.warn(`Grid mode '${options.gridMode}' is not yet implemented for web platform`);\n }\n async getGridMode() {\n // Web implementation - default to none\n return { gridMode: \"none\" };\n }\n async getPreviewSize() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!video) {\n throw new Error(\"camera is not running\");\n }\n const offsetX = video.width / 8;\n const offsetY = video.height / 8;\n return {\n x: video.offsetLeft + offsetX,\n y: video.offsetTop + offsetY,\n width: video.width,\n height: video.height,\n };\n }\n async setPreviewSize(options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!video) {\n throw new Error(\"camera is not running\");\n }\n video.style.left = `${options.x}px`;\n video.style.top = `${options.y}px`;\n video.width = options.width;\n video.height = options.height;\n const offsetX = options.width / 8;\n const offsetY = options.height / 8;\n return {\n width: options.width,\n height: options.height,\n x: options.x + offsetX,\n y: options.y + offsetY,\n };\n }\n async setFocus(options) {\n // Reject if values are outside 0-1 range\n if (options.x < 0 || options.x > 1 || options.y < 0 || options.y > 1) {\n throw new Error(\"Focus coordinates must be between 0 and 1\");\n }\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n const stream = video.srcObject;\n const videoTrack = stream.getVideoTracks()[0];\n if (!videoTrack) {\n throw new Error(\"no video track found\");\n }\n const capabilities = videoTrack.getCapabilities();\n // Check if focusing is supported\n if (capabilities.focusMode) {\n try {\n // Web API supports focus mode settings but not coordinate-based focus\n // Setting to manual mode allows for coordinate focus if supported\n await videoTrack.applyConstraints({\n advanced: [\n {\n focusMode: \"manual\",\n focusDistance: 0.5, // Mid-range focus as fallback\n },\n ],\n });\n }\n catch (error) {\n console.warn(`setFocus is not fully supported on this device: ${error}. Focus coordinates (${options.x}, ${options.y}) were provided but cannot be applied.`);\n }\n }\n else {\n console.warn(\"Focus control is not supported on this device. Focus coordinates were provided but cannot be applied.\");\n }\n }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KAAK,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC;AAC7K;AACA;AACA,aAAa;AACb,YAAY,OAAO,CAAC,IAAI,CAAC,uGAAuG,CAAC;AACjI;AACA;AACA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var DeviceType;\n(function (DeviceType) {\n DeviceType[\"ULTRA_WIDE\"] = \"ultraWide\";\n DeviceType[\"WIDE_ANGLE\"] = \"wideAngle\";\n DeviceType[\"TELEPHOTO\"] = \"telephoto\";\n DeviceType[\"TRUE_DEPTH\"] = \"trueDepth\";\n DeviceType[\"DUAL\"] = \"dual\";\n DeviceType[\"DUAL_WIDE\"] = \"dualWide\";\n DeviceType[\"TRIPLE\"] = \"triple\";\n})(DeviceType || (DeviceType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from \"@capacitor/core\";\nconst CameraPreview = registerPlugin(\"CameraPreview\", {\n web: () => import(\"./web\").then((m) => new m.CameraPreviewWeb()),\n});\nexport * from \"./definitions\";\nexport { CameraPreview };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nimport { DeviceType } from \"./definitions\";\nconst DEFAULT_VIDEO_ID = \"capgo_video\";\nexport class CameraPreviewWeb extends WebPlugin {\n constructor() {\n super();\n /**\n * track which camera is used based on start options\n * used in capture\n */\n this.isBackCamera = false;\n this.currentDeviceId = null;\n this.videoElement = null;\n this.isStarted = false;\n }\n async getSupportedPictureSizes() {\n throw new Error(\"getSupportedPictureSizes not supported under the web platform\");\n }\n async start(options) {\n if (options.aspectRatio && (options.width || options.height)) {\n throw new Error(\"Cannot set both aspectRatio and size (width/height). Use setPreviewSize after start.\");\n }\n if (this.isStarted) {\n throw new Error(\"camera already started\");\n }\n this.isBackCamera = true;\n this.isStarted = false;\n const parent = document.getElementById((options === null || options === void 0 ? void 0 : options.parent) || \"\");\n const gridMode = (options === null || options === void 0 ? void 0 : options.gridMode) || \"none\";\n const positioning = (options === null || options === void 0 ? void 0 : options.positioning) || \"top\";\n if (options.position) {\n this.isBackCamera = options.position === \"rear\";\n }\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (video) {\n video.remove();\n }\n const container = options.parent\n ? document.getElementById(options.parent)\n : document.body;\n if (!container) {\n throw new Error(\"container not found\");\n }\n this.videoElement = document.createElement(\"video\");\n this.videoElement.id = DEFAULT_VIDEO_ID;\n this.videoElement.className = options.className || \"\";\n this.videoElement.playsInline = true;\n this.videoElement.muted = true;\n this.videoElement.autoplay = true;\n // Remove objectFit as we'll match camera's native aspect ratio\n this.videoElement.style.backgroundColor = \"transparent\";\n // Reset any default margins that might interfere\n this.videoElement.style.margin = \"0\";\n this.videoElement.style.padding = \"0\";\n container.appendChild(this.videoElement);\n if (options.toBack) {\n this.videoElement.style.zIndex = \"-1\";\n }\n // Default to 16:9 vertical (9:16 for portrait) if no aspect ratio or size specified\n const useDefaultAspectRatio = !options.aspectRatio && !options.width && !options.height;\n const effectiveAspectRatio = options.aspectRatio || (useDefaultAspectRatio ? \"16:9\" : null);\n if (options.width) {\n this.videoElement.width = options.width;\n this.videoElement.style.width = `${options.width}px`;\n }\n if (options.height) {\n this.videoElement.height = options.height;\n this.videoElement.style.height = `${options.height}px`;\n }\n // Handle positioning - center if x or y not provided\n const centerX = options.x === undefined;\n const centerY = options.y === undefined;\n // Always set position to absolute for proper positioning\n this.videoElement.style.position = \"absolute\";\n console.log(\"Initial positioning flags:\", {\n centerX,\n centerY,\n x: options.x,\n y: options.y,\n });\n if (options.x !== undefined) {\n this.videoElement.style.left = `${options.x}px`;\n }\n if (options.y !== undefined) {\n this.videoElement.style.top = `${options.y}px`;\n }\n // Create and add grid overlay if needed\n if (gridMode !== \"none\") {\n const gridOverlay = this.createGridOverlay(gridMode);\n gridOverlay.id = \"camera-grid-overlay\";\n parent === null || parent === void 0 ? void 0 : parent.appendChild(gridOverlay);\n }\n // Aspect ratio handling is now done after getting camera stream\n // Store centering flags for later use\n const needsCenterX = centerX;\n const needsCenterY = centerY;\n console.log(\"Centering flags stored:\", { needsCenterX, needsCenterY });\n // First get the camera stream with basic constraints\n const constraints = {\n video: {\n facingMode: this.isBackCamera ? \"environment\" : \"user\",\n },\n };\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n if (!stream) {\n throw new Error(\"could not acquire stream\");\n }\n if (!this.videoElement) {\n throw new Error(\"video element not found\");\n }\n // Get the actual camera dimensions from the video track\n const videoTrack = stream.getVideoTracks()[0];\n const settings = videoTrack.getSettings();\n const cameraWidth = settings.width || 640;\n const cameraHeight = settings.height || 480;\n const cameraAspectRatio = cameraWidth / cameraHeight;\n console.log(\"Camera native dimensions:\", {\n width: cameraWidth,\n height: cameraHeight,\n aspectRatio: cameraAspectRatio,\n });\n console.log(\"Container dimensions:\", {\n width: container.offsetWidth,\n height: container.offsetHeight,\n id: container.id,\n });\n // Now adjust video element size based on camera's native aspect ratio\n if (!options.width && !options.height && !options.aspectRatio) {\n // No size specified, fit camera view within container bounds\n const containerWidth = container.offsetWidth || window.innerWidth;\n const containerHeight = container.offsetHeight || window.innerHeight;\n // Calculate dimensions that fit within container while maintaining camera aspect ratio\n let targetWidth, targetHeight;\n // Try fitting to container width first\n targetWidth = containerWidth;\n targetHeight = targetWidth / cameraAspectRatio;\n // If height exceeds container, fit to height instead\n if (targetHeight > containerHeight) {\n targetHeight = containerHeight;\n targetWidth = targetHeight * cameraAspectRatio;\n }\n console.log(\"Video element dimensions:\", {\n width: targetWidth,\n height: targetHeight,\n container: { width: containerWidth, height: containerHeight },\n });\n this.videoElement.width = targetWidth;\n this.videoElement.height = targetHeight;\n this.videoElement.style.width = `${targetWidth}px`;\n this.videoElement.style.height = `${targetHeight}px`;\n // Center the video element within its parent container\n if (needsCenterX || options.x === undefined) {\n const x = Math.round((containerWidth - targetWidth) / 2);\n this.videoElement.style.left = `${x}px`;\n }\n if (needsCenterY || options.y === undefined) {\n let y;\n switch (positioning) {\n case \"top\":\n y = 0;\n break;\n case \"bottom\":\n y = window.innerHeight - targetHeight;\n break;\n case \"center\":\n default:\n y = Math.round((window.innerHeight - targetHeight) / 2);\n break;\n }\n this.videoElement.style.setProperty(\"top\", `${y}px`, \"important\");\n // Force a style recalculation\n this.videoElement.offsetHeight;\n console.log(\"Positioning video:\", {\n positioning,\n viewportHeight: window.innerHeight,\n targetHeight,\n calculatedY: y,\n actualTop: this.videoElement.style.top,\n position: this.videoElement.style.position,\n });\n }\n }\n else if (effectiveAspectRatio && !options.width && !options.height) {\n // Aspect ratio specified but no size\n const [widthRatio, heightRatio] = effectiveAspectRatio\n .split(\":\")\n .map(Number);\n const targetRatio = widthRatio / heightRatio;\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n let targetWidth, targetHeight;\n // Try fitting to viewport width first\n targetWidth = viewportWidth;\n targetHeight = targetWidth / targetRatio;\n // If height exceeds viewport, fit to height instead\n if (targetHeight > viewportHeight) {\n targetHeight = viewportHeight;\n targetWidth = targetHeight * targetRatio;\n }\n this.videoElement.width = targetWidth;\n this.videoElement.height = targetHeight;\n this.videoElement.style.width = `${targetWidth}px`;\n this.videoElement.style.height = `${targetHeight}px`;\n // Center the video element within its parent container\n if (needsCenterX || options.x === undefined) {\n const parentWidth = container.offsetWidth || viewportWidth;\n const x = Math.round((parentWidth - targetWidth) / 2);\n this.videoElement.style.left = `${x}px`;\n }\n if (needsCenterY || options.y === undefined) {\n const parentHeight = container.offsetHeight || viewportHeight;\n let y;\n switch (positioning) {\n case \"top\":\n y = 0;\n break;\n case \"bottom\":\n y = parentHeight - targetHeight;\n break;\n case \"center\":\n default:\n y = Math.round((parentHeight - targetHeight) / 2);\n break;\n }\n this.videoElement.style.top = `${y}px`;\n }\n }\n this.videoElement.srcObject = stream;\n if (!this.isBackCamera) {\n this.videoElement.style.transform = \"scaleX(-1)\";\n }\n // Set initial zoom level if specified and supported\n if (options.initialZoomLevel && options.initialZoomLevel !== 1.0) {\n // videoTrack already declared above\n if (videoTrack) {\n const capabilities = videoTrack.getCapabilities();\n if (capabilities.zoom) {\n const zoomLevel = options.initialZoomLevel;\n const minZoom = capabilities.zoom.min || 1;\n const maxZoom = capabilities.zoom.max || 1;\n if (zoomLevel < minZoom || zoomLevel > maxZoom) {\n stream.getTracks().forEach((track) => track.stop());\n throw new Error(`Initial zoom level ${zoomLevel} is not available. Valid range is ${minZoom} to ${maxZoom}`);\n }\n try {\n await videoTrack.applyConstraints({\n advanced: [{ zoom: zoomLevel }],\n });\n }\n catch (error) {\n console.warn(`Failed to set initial zoom level: ${error}`);\n // Don't throw, just continue without zoom\n }\n }\n }\n }\n this.isStarted = true;\n // Wait for video to be ready and get actual dimensions\n await new Promise((resolve) => {\n if (this.videoElement.readyState >= 2) {\n resolve();\n }\n else {\n this.videoElement.addEventListener(\"loadeddata\", () => resolve(), {\n once: true,\n });\n }\n });\n // Ensure centering is applied after DOM updates\n await new Promise((resolve) => requestAnimationFrame(resolve));\n console.log(\"About to re-center, flags:\", { needsCenterX, needsCenterY });\n // Re-apply centering with correct parent dimensions\n if (needsCenterX) {\n const parentWidth = container.offsetWidth;\n const x = Math.round((parentWidth - this.videoElement.offsetWidth) / 2);\n this.videoElement.style.left = `${x}px`;\n console.log(\"Re-centering X:\", {\n parentWidth,\n videoWidth: this.videoElement.offsetWidth,\n x,\n });\n }\n if (needsCenterY) {\n let y;\n switch (positioning) {\n case \"top\":\n y = 0;\n break;\n case \"bottom\":\n y = window.innerHeight - this.videoElement.offsetHeight;\n break;\n case \"center\":\n default:\n y = Math.round((window.innerHeight - this.videoElement.offsetHeight) / 2);\n break;\n }\n this.videoElement.style.setProperty(\"top\", `${y}px`, \"important\");\n console.log(\"Re-positioning Y:\", {\n positioning,\n viewportHeight: window.innerHeight,\n videoHeight: this.videoElement.offsetHeight,\n y,\n position: this.videoElement.style.position,\n top: this.videoElement.style.top,\n });\n }\n // Get the actual rendered dimensions after video is loaded\n const rect = this.videoElement.getBoundingClientRect();\n const computedStyle = window.getComputedStyle(this.videoElement);\n console.log(\"Final video element state:\", {\n rect: { x: rect.x, y: rect.y, width: rect.width, height: rect.height },\n style: {\n position: computedStyle.position,\n left: computedStyle.left,\n top: computedStyle.top,\n width: computedStyle.width,\n height: computedStyle.height,\n },\n });\n return {\n width: Math.round(rect.width),\n height: Math.round(rect.height),\n x: Math.round(rect.x),\n y: Math.round(rect.y),\n };\n }\n stopStream(stream) {\n if (stream) {\n const tracks = stream.getTracks();\n for (const track of tracks)\n track.stop();\n }\n }\n async stop() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (video) {\n video.pause();\n this.stopStream(video.srcObject);\n video.remove();\n this.isStarted = false;\n }\n // Remove grid overlay if it exists\n const gridOverlay = document.getElementById(\"camera-grid-overlay\");\n gridOverlay === null || gridOverlay === void 0 ? void 0 : gridOverlay.remove();\n }\n async capture(options) {\n return new Promise((resolve, reject) => {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n reject(new Error(\"camera is not running\"));\n return;\n }\n // video.width = video.offsetWidth;\n let base64EncodedImage;\n if (video && video.videoWidth > 0 && video.videoHeight > 0) {\n const canvas = document.createElement(\"canvas\");\n const context = canvas.getContext(\"2d\");\n // Calculate capture dimensions\n let captureWidth = video.videoWidth;\n let captureHeight = video.videoHeight;\n let sourceX = 0;\n let sourceY = 0;\n // Check for conflicting parameters\n if (options.aspectRatio && (options.width || options.height)) {\n reject(new Error(\"Cannot set both aspectRatio and size (width/height). Use setPreviewSize after start.\"));\n return;\n }\n // Handle aspect ratio if no width/height specified\n if (!options.width && !options.height && options.aspectRatio) {\n const [widthRatio, heightRatio] = options.aspectRatio\n .split(\":\")\n .map(Number);\n if (widthRatio && heightRatio) {\n // For capture in portrait orientation, swap the aspect ratio (16:9 becomes 9:16)\n const isPortrait = video.videoHeight > video.videoWidth;\n const targetAspectRatio = isPortrait\n ? heightRatio / widthRatio\n : widthRatio / heightRatio;\n const videoAspectRatio = video.videoWidth / video.videoHeight;\n if (videoAspectRatio > targetAspectRatio) {\n // Video is wider than target - crop sides\n captureWidth = video.videoHeight * targetAspectRatio;\n captureHeight = video.videoHeight;\n sourceX = (video.videoWidth - captureWidth) / 2;\n }\n else {\n // Video is taller than target - crop top/bottom\n captureWidth = video.videoWidth;\n captureHeight = video.videoWidth / targetAspectRatio;\n sourceY = (video.videoHeight - captureHeight) / 2;\n }\n }\n }\n else if (options.width || options.height) {\n // If width or height is specified, use them\n if (options.width)\n captureWidth = options.width;\n if (options.height)\n captureHeight = options.height;\n }\n canvas.width = captureWidth;\n canvas.height = captureHeight;\n // flip horizontally back camera isn't used\n if (!this.isBackCamera) {\n context === null || context === void 0 ? void 0 : context.translate(captureWidth, 0);\n context === null || context === void 0 ? void 0 : context.scale(-1, 1);\n }\n context === null || context === void 0 ? void 0 : context.drawImage(video, sourceX, sourceY, captureWidth, captureHeight, 0, 0, captureWidth, captureHeight);\n if (options.saveToGallery) {\n // saveToGallery is not supported on web\n }\n if (options.withExifLocation) {\n // withExifLocation is not supported on web\n }\n if ((options.format || \"jpeg\") === \"jpeg\") {\n base64EncodedImage = canvas\n .toDataURL(\"image/jpeg\", (options.quality || 85) / 100.0)\n .replace(\"data:image/jpeg;base64,\", \"\");\n }\n else {\n base64EncodedImage = canvas\n .toDataURL(\"image/png\")\n .replace(\"data:image/png;base64,\", \"\");\n }\n }\n resolve({\n value: base64EncodedImage,\n exif: {},\n });\n });\n }\n async captureSample(_options) {\n return this.capture(_options);\n }\n async stopRecordVideo() {\n throw new Error(\"stopRecordVideo not supported under the web platform\");\n }\n async startRecordVideo(_options) {\n console.log(\"startRecordVideo\", _options);\n throw new Error(\"startRecordVideo not supported under the web platform\");\n }\n async getSupportedFlashModes() {\n throw new Error(\"getSupportedFlashModes not supported under the web platform\");\n }\n async getHorizontalFov() {\n throw new Error(\"getHorizontalFov not supported under the web platform\");\n }\n async setFlashMode(_options) {\n throw new Error(`setFlashMode not supported under the web platform${_options}`);\n }\n async flip() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n // Stop current stream\n this.stopStream(video.srcObject);\n // Toggle camera position\n this.isBackCamera = !this.isBackCamera;\n // Get new constraints\n const constraints = {\n video: {\n facingMode: this.isBackCamera ? \"environment\" : \"user\",\n width: { ideal: video.videoWidth || 640 },\n height: { ideal: video.videoHeight || 480 },\n },\n };\n try {\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n video.srcObject = stream;\n // Update current device ID from the new stream\n const videoTrack = stream.getVideoTracks()[0];\n if (videoTrack) {\n this.currentDeviceId = videoTrack.getSettings().deviceId || null;\n }\n // Update video transform based on camera\n if (this.isBackCamera) {\n video.style.transform = \"none\";\n video.style.webkitTransform = \"none\";\n }\n else {\n video.style.transform = \"scaleX(-1)\";\n video.style.webkitTransform = \"scaleX(-1)\";\n }\n await video.play();\n }\n catch (error) {\n throw new Error(`Failed to flip camera: ${error}`);\n }\n }\n async setOpacity(_options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!!video && !!_options.opacity)\n video.style.setProperty(\"opacity\", _options.opacity.toString());\n }\n async isRunning() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n return { isRunning: !!video && !!video.srcObject };\n }\n async getAvailableDevices() {\n var _a;\n if (!((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.enumerateDevices)) {\n throw new Error(\"getAvailableDevices not supported under the web platform\");\n }\n const devices = await navigator.mediaDevices.enumerateDevices();\n const videoDevices = devices.filter((device) => device.kind === \"videoinput\");\n // Group devices by position (front/back)\n const frontDevices = [];\n const backDevices = [];\n videoDevices.forEach((device, index) => {\n const label = device.label || `Camera ${index + 1}`;\n const labelLower = label.toLowerCase();\n // Determine device type based on label\n let deviceType = DeviceType.WIDE_ANGLE;\n let baseZoomRatio = 1.0;\n if (labelLower.includes(\"ultra\") || labelLower.includes(\"0.5\")) {\n deviceType = DeviceType.ULTRA_WIDE;\n baseZoomRatio = 0.5;\n }\n else if (labelLower.includes(\"telephoto\") ||\n labelLower.includes(\"tele\") ||\n labelLower.includes(\"2x\") ||\n labelLower.includes(\"3x\")) {\n deviceType = DeviceType.TELEPHOTO;\n baseZoomRatio = 2.0;\n }\n else if (labelLower.includes(\"depth\") ||\n labelLower.includes(\"truedepth\")) {\n deviceType = DeviceType.TRUE_DEPTH;\n baseZoomRatio = 1.0;\n }\n const lensInfo = {\n deviceId: device.deviceId,\n label,\n deviceType,\n focalLength: 4.25,\n baseZoomRatio,\n minZoom: 1.0,\n maxZoom: 1.0,\n };\n // Determine position and add to appropriate array\n if (labelLower.includes(\"back\") || labelLower.includes(\"rear\")) {\n backDevices.push(lensInfo);\n }\n else {\n frontDevices.push(lensInfo);\n }\n });\n const result = [];\n if (frontDevices.length > 0) {\n result.push({\n deviceId: frontDevices[0].deviceId,\n label: \"Front Camera\",\n position: \"front\",\n lenses: frontDevices,\n isLogical: false,\n minZoom: Math.min(...frontDevices.map((d) => d.minZoom)),\n maxZoom: Math.max(...frontDevices.map((d) => d.maxZoom)),\n });\n }\n if (backDevices.length > 0) {\n result.push({\n deviceId: backDevices[0].deviceId,\n label: \"Back Camera\",\n position: \"rear\",\n lenses: backDevices,\n isLogical: false,\n minZoom: Math.min(...backDevices.map((d) => d.minZoom)),\n maxZoom: Math.max(...backDevices.map((d) => d.maxZoom)),\n });\n }\n return { devices: result };\n }\n async getZoom() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n const stream = video.srcObject;\n const videoTrack = stream.getVideoTracks()[0];\n if (!videoTrack) {\n throw new Error(\"no video track found\");\n }\n const capabilities = videoTrack.getCapabilities();\n const settings = videoTrack.getSettings();\n if (!capabilities.zoom) {\n throw new Error(\"zoom not supported by this device\");\n }\n // Get current device info to determine lens type\n let deviceType = DeviceType.WIDE_ANGLE;\n let baseZoomRatio = 1.0;\n if (this.currentDeviceId) {\n const devices = await navigator.mediaDevices.enumerateDevices();\n const device = devices.find((d) => d.deviceId === this.currentDeviceId);\n if (device) {\n const labelLower = device.label.toLowerCase();\n if (labelLower.includes(\"ultra\") || labelLower.includes(\"0.5\")) {\n deviceType = DeviceType.ULTRA_WIDE;\n baseZoomRatio = 0.5;\n }\n else if (labelLower.includes(\"telephoto\") ||\n labelLower.includes(\"tele\") ||\n labelLower.includes(\"2x\") ||\n labelLower.includes(\"3x\")) {\n deviceType = DeviceType.TELEPHOTO;\n baseZoomRatio = 2.0;\n }\n else if (labelLower.includes(\"depth\") ||\n labelLower.includes(\"truedepth\")) {\n deviceType = DeviceType.TRUE_DEPTH;\n baseZoomRatio = 1.0;\n }\n }\n }\n const currentZoom = settings.zoom || 1;\n const lensInfo = {\n focalLength: 4.25,\n deviceType,\n baseZoomRatio,\n digitalZoom: currentZoom / baseZoomRatio,\n };\n return {\n min: capabilities.zoom.min || 1,\n max: capabilities.zoom.max || 1,\n current: currentZoom,\n lens: lensInfo,\n };\n }\n async setZoom(options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n const stream = video.srcObject;\n const videoTrack = stream.getVideoTracks()[0];\n if (!videoTrack) {\n throw new Error(\"no video track found\");\n }\n const capabilities = videoTrack.getCapabilities();\n if (!capabilities.zoom) {\n throw new Error(\"zoom not supported by this device\");\n }\n const zoomLevel = Math.max(capabilities.zoom.min || 1, Math.min(capabilities.zoom.max || 1, options.level));\n // Note: autoFocus is not supported on web platform\n try {\n await videoTrack.applyConstraints({\n advanced: [{ zoom: zoomLevel }],\n });\n }\n catch (error) {\n throw new Error(`Failed to set zoom: ${error}`);\n }\n }\n async getFlashMode() {\n throw new Error(\"getFlashMode not supported under the web platform\");\n }\n async getDeviceId() {\n return { deviceId: this.currentDeviceId || \"\" };\n }\n async setDeviceId(options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n // Stop current stream\n this.stopStream(video.srcObject);\n // Update current device ID\n this.currentDeviceId = options.deviceId;\n // Get new constraints with specific device ID\n const constraints = {\n video: {\n deviceId: { exact: options.deviceId },\n width: { ideal: video.videoWidth || 640 },\n height: { ideal: video.videoHeight || 480 },\n },\n };\n try {\n // Try to determine camera position from device\n const devices = await navigator.mediaDevices.enumerateDevices();\n const device = devices.find((d) => d.deviceId === options.deviceId);\n this.isBackCamera =\n (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes(\"back\")) ||\n (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes(\"rear\")) ||\n false;\n const stream = await navigator.mediaDevices.getUserMedia(constraints);\n video.srcObject = stream;\n // Update video transform based on camera\n if (this.isBackCamera) {\n video.style.transform = \"none\";\n video.style.webkitTransform = \"none\";\n }\n else {\n video.style.transform = \"scaleX(-1)\";\n video.style.webkitTransform = \"scaleX(-1)\";\n }\n await video.play();\n }\n catch (error) {\n throw new Error(`Failed to swap to device ${options.deviceId}: ${error}`);\n }\n }\n async getAspectRatio() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!video) {\n throw new Error(\"camera is not running\");\n }\n const width = video.offsetWidth;\n const height = video.offsetHeight;\n if (width && height) {\n const ratio = width / height;\n // Check for portrait camera ratios: 4:3 -> 3:4, 16:9 -> 9:16\n if (Math.abs(ratio - 3 / 4) < 0.01) {\n return { aspectRatio: \"4:3\" };\n }\n if (Math.abs(ratio - 9 / 16) < 0.01) {\n return { aspectRatio: \"16:9\" };\n }\n }\n // Default to 4:3 if no specific aspect ratio is matched\n return { aspectRatio: \"4:3\" };\n }\n async setAspectRatio(options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!video) {\n throw new Error(\"camera is not running\");\n }\n if (options.aspectRatio) {\n const [widthRatio, heightRatio] = options.aspectRatio\n .split(\":\")\n .map(Number);\n // For camera, use portrait orientation: 4:3 becomes 3:4, 16:9 becomes 9:16\n const ratio = heightRatio / widthRatio;\n // Get current position and size\n const rect = video.getBoundingClientRect();\n const currentWidth = rect.width;\n const currentHeight = rect.height;\n const currentRatio = currentWidth / currentHeight;\n let newWidth;\n let newHeight;\n if (currentRatio > ratio) {\n // Width is larger, fit by height and center horizontally\n newWidth = currentHeight * ratio;\n newHeight = currentHeight;\n }\n else {\n // Height is larger, fit by width and center vertically\n newWidth = currentWidth;\n newHeight = currentWidth / ratio;\n }\n // Calculate position\n let x, y;\n if (options.x !== undefined && options.y !== undefined) {\n // Use provided coordinates, ensuring they stay within screen boundaries\n x = Math.max(0, Math.min(options.x, window.innerWidth - newWidth));\n y = Math.max(0, Math.min(options.y, window.innerHeight - newHeight));\n }\n else {\n // Auto-center the view\n x = (window.innerWidth - newWidth) / 2;\n y = (window.innerHeight - newHeight) / 2;\n }\n video.style.width = `${newWidth}px`;\n video.style.height = `${newHeight}px`;\n video.style.left = `${x}px`;\n video.style.top = `${y}px`;\n video.style.position = \"absolute\";\n const offsetX = newWidth / 8;\n const offsetY = newHeight / 8;\n return {\n width: Math.round(newWidth),\n height: Math.round(newHeight),\n x: Math.round(x + offsetX),\n y: Math.round(y + offsetY),\n };\n }\n else {\n video.style.objectFit = \"cover\";\n const rect = video.getBoundingClientRect();\n const offsetX = rect.width / 8;\n const offsetY = rect.height / 8;\n return {\n width: Math.round(rect.width),\n height: Math.round(rect.height),\n x: Math.round(rect.left + offsetX),\n y: Math.round(rect.top + offsetY),\n };\n }\n }\n createGridOverlay(gridMode) {\n const overlay = document.createElement(\"div\");\n overlay.style.position = \"absolute\";\n overlay.style.top = \"0\";\n overlay.style.left = \"0\";\n overlay.style.width = \"100%\";\n overlay.style.height = \"100%\";\n overlay.style.pointerEvents = \"none\";\n overlay.style.zIndex = \"10\";\n const divisions = gridMode === \"3x3\" ? 3 : 4;\n // Create SVG for grid lines\n const svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n svg.style.width = \"100%\";\n svg.style.height = \"100%\";\n svg.style.position = \"absolute\";\n svg.style.top = \"0\";\n svg.style.left = \"0\";\n // Create grid lines\n for (let i = 1; i < divisions; i++) {\n // Vertical lines\n const verticalLine = document.createElementNS(\"http://www.w3.org/2000/svg\", \"line\");\n verticalLine.setAttribute(\"x1\", `${(i / divisions) * 100}%`);\n verticalLine.setAttribute(\"y1\", \"0%\");\n verticalLine.setAttribute(\"x2\", `${(i / divisions) * 100}%`);\n verticalLine.setAttribute(\"y2\", \"100%\");\n verticalLine.setAttribute(\"stroke\", \"rgba(255, 255, 255, 0.5)\");\n verticalLine.setAttribute(\"stroke-width\", \"1\");\n svg.appendChild(verticalLine);\n // Horizontal lines\n const horizontalLine = document.createElementNS(\"http://www.w3.org/2000/svg\", \"line\");\n horizontalLine.setAttribute(\"x1\", \"0%\");\n horizontalLine.setAttribute(\"y1\", `${(i / divisions) * 100}%`);\n horizontalLine.setAttribute(\"x2\", \"100%\");\n horizontalLine.setAttribute(\"y2\", `${(i / divisions) * 100}%`);\n horizontalLine.setAttribute(\"stroke\", \"rgba(255, 255, 255, 0.5)\");\n horizontalLine.setAttribute(\"stroke-width\", \"1\");\n svg.appendChild(horizontalLine);\n }\n overlay.appendChild(svg);\n return overlay;\n }\n async setGridMode(options) {\n // Web implementation of grid mode would need to be implemented\n // For now, just resolve as a no-op\n console.warn(`Grid mode '${options.gridMode}' is not yet implemented for web platform`);\n }\n async getGridMode() {\n // Web implementation - default to none\n return { gridMode: \"none\" };\n }\n async getPreviewSize() {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!video) {\n throw new Error(\"camera is not running\");\n }\n const offsetX = video.width / 8;\n const offsetY = video.height / 8;\n return {\n x: video.offsetLeft + offsetX,\n y: video.offsetTop + offsetY,\n width: video.width,\n height: video.height,\n };\n }\n async setPreviewSize(options) {\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!video) {\n throw new Error(\"camera is not running\");\n }\n video.style.left = `${options.x}px`;\n video.style.top = `${options.y}px`;\n video.width = options.width;\n video.height = options.height;\n const offsetX = options.width / 8;\n const offsetY = options.height / 8;\n return {\n width: options.width,\n height: options.height,\n x: options.x + offsetX,\n y: options.y + offsetY,\n };\n }\n async setFocus(options) {\n // Reject if values are outside 0-1 range\n if (options.x < 0 || options.x > 1 || options.y < 0 || options.y > 1) {\n throw new Error(\"Focus coordinates must be between 0 and 1\");\n }\n const video = document.getElementById(DEFAULT_VIDEO_ID);\n if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {\n throw new Error(\"camera is not running\");\n }\n const stream = video.srcObject;\n const videoTrack = stream.getVideoTracks()[0];\n if (!videoTrack) {\n throw new Error(\"no video track found\");\n }\n const capabilities = videoTrack.getCapabilities();\n // Check if focusing is supported\n if (capabilities.focusMode) {\n try {\n // Web API supports focus mode settings but not coordinate-based focus\n // Setting to manual mode allows for coordinate focus if supported\n await videoTrack.applyConstraints({\n advanced: [\n {\n focusMode: \"manual\",\n focusDistance: 0.5, // Mid-range focus as fallback\n },\n ],\n });\n }\n catch (error) {\n console.warn(`setFocus is not fully supported on this device: ${error}. Focus coordinates (${options.x}, ${options.y}) were provided but cannot be applied.`);\n }\n }\n else {\n console.warn(\"Focus control is not supported on this device. Focus coordinates were provided but cannot be applied.\");\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["DeviceType","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,UAAU,EAAE;AACvB,IAAI,UAAU,CAAC,YAAY,CAAC,GAAG,WAAW;AAC1C,IAAI,UAAU,CAAC,YAAY,CAAC,GAAG,WAAW;AAC1C,IAAI,UAAU,CAAC,WAAW,CAAC,GAAG,WAAW;AACzC,IAAI,UAAU,CAAC,YAAY,CAAC,GAAG,WAAW;AAC1C,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,MAAM;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E,YAAY,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;AACpD;AACA,QAAQ,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS;AACtC,QAAQ,MAAM,UAAU,GAAG,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;AACrD,QAAQ,IAAI,CAAC,UAAU,EAAE;AACzB,YAAY,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;AACnD;AACA,QAAQ,MAAM,YAAY,GAAG,UAAU,CAAC,eAAe,EAAE;AACzD;AACA,QAAQ,IAAI,YAAY,CAAC,SAAS,EAAE;AACpC,YAAY,IAAI;AAChB;AACA;AACA,gBAAgB,MAAM,UAAU,CAAC,gBAAgB,CAAC;AAClD,oBAAoB,QAAQ,EAAE;AAC9B,wBAAwB;AACxB,4BAA4B,SAAS,EAAE,QAAQ;AAC/C,4BAA4B,aAAa,EAAE,GAAG;AAC9C,yBAAyB;AACzB,qBAAqB;AACrB,iBAAiB,CAAC;AAClB;AACA,YAAY,OAAO,KAAK,EAAE;AAC1B,gBAAgB,OAAO,CAAC,IAAI,CAAC,CAAC,gDAAgD,EAAE,KAAK,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC;AAC7K;AACA;AACA,aAAa;AACb,YAAY,OAAO,CAAC,IAAI,CAAC,uGAAuG,CAAC;AACjI;AACA;AACA;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -43,6 +43,7 @@ var capacitorCapacitorCameraView = (function (exports, core) {
|
|
|
43
43
|
this.isStarted = false;
|
|
44
44
|
const parent = document.getElementById((options === null || options === void 0 ? void 0 : options.parent) || "");
|
|
45
45
|
const gridMode = (options === null || options === void 0 ? void 0 : options.gridMode) || "none";
|
|
46
|
+
const positioning = (options === null || options === void 0 ? void 0 : options.positioning) || "top";
|
|
46
47
|
if (options.position) {
|
|
47
48
|
this.isBackCamera = options.position === "rear";
|
|
48
49
|
}
|
|
@@ -169,11 +170,24 @@ var capacitorCapacitorCameraView = (function (exports, core) {
|
|
|
169
170
|
this.videoElement.style.left = `${x}px`;
|
|
170
171
|
}
|
|
171
172
|
if (needsCenterY || options.y === undefined) {
|
|
172
|
-
|
|
173
|
+
let y;
|
|
174
|
+
switch (positioning) {
|
|
175
|
+
case "top":
|
|
176
|
+
y = 0;
|
|
177
|
+
break;
|
|
178
|
+
case "bottom":
|
|
179
|
+
y = window.innerHeight - targetHeight;
|
|
180
|
+
break;
|
|
181
|
+
case "center":
|
|
182
|
+
default:
|
|
183
|
+
y = Math.round((window.innerHeight - targetHeight) / 2);
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
173
186
|
this.videoElement.style.setProperty("top", `${y}px`, "important");
|
|
174
187
|
// Force a style recalculation
|
|
175
188
|
this.videoElement.offsetHeight;
|
|
176
|
-
console.log("
|
|
189
|
+
console.log("Positioning video:", {
|
|
190
|
+
positioning,
|
|
177
191
|
viewportHeight: window.innerHeight,
|
|
178
192
|
targetHeight,
|
|
179
193
|
calculatedY: y,
|
|
@@ -211,7 +225,19 @@ var capacitorCapacitorCameraView = (function (exports, core) {
|
|
|
211
225
|
}
|
|
212
226
|
if (needsCenterY || options.y === undefined) {
|
|
213
227
|
const parentHeight = container.offsetHeight || viewportHeight;
|
|
214
|
-
|
|
228
|
+
let y;
|
|
229
|
+
switch (positioning) {
|
|
230
|
+
case "top":
|
|
231
|
+
y = 0;
|
|
232
|
+
break;
|
|
233
|
+
case "bottom":
|
|
234
|
+
y = parentHeight - targetHeight;
|
|
235
|
+
break;
|
|
236
|
+
case "center":
|
|
237
|
+
default:
|
|
238
|
+
y = Math.round((parentHeight - targetHeight) / 2);
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
215
241
|
this.videoElement.style.top = `${y}px`;
|
|
216
242
|
}
|
|
217
243
|
}
|
|
@@ -271,9 +297,22 @@ var capacitorCapacitorCameraView = (function (exports, core) {
|
|
|
271
297
|
});
|
|
272
298
|
}
|
|
273
299
|
if (needsCenterY) {
|
|
274
|
-
|
|
300
|
+
let y;
|
|
301
|
+
switch (positioning) {
|
|
302
|
+
case "top":
|
|
303
|
+
y = 0;
|
|
304
|
+
break;
|
|
305
|
+
case "bottom":
|
|
306
|
+
y = window.innerHeight - this.videoElement.offsetHeight;
|
|
307
|
+
break;
|
|
308
|
+
case "center":
|
|
309
|
+
default:
|
|
310
|
+
y = Math.round((window.innerHeight - this.videoElement.offsetHeight) / 2);
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
275
313
|
this.videoElement.style.setProperty("top", `${y}px`, "important");
|
|
276
|
-
console.log("Re-
|
|
314
|
+
console.log("Re-positioning Y:", {
|
|
315
|
+
positioning,
|
|
277
316
|
viewportHeight: window.innerHeight,
|
|
278
317
|
videoHeight: this.videoElement.offsetHeight,
|
|
279
318
|
y,
|
|
@@ -344,11 +383,15 @@ var capacitorCapacitorCameraView = (function (exports, core) {
|
|
|
344
383
|
}
|
|
345
384
|
// Handle aspect ratio if no width/height specified
|
|
346
385
|
if (!options.width && !options.height && options.aspectRatio) {
|
|
347
|
-
const [widthRatio, heightRatio] = options.aspectRatio
|
|
386
|
+
const [widthRatio, heightRatio] = options.aspectRatio
|
|
387
|
+
.split(":")
|
|
388
|
+
.map(Number);
|
|
348
389
|
if (widthRatio && heightRatio) {
|
|
349
390
|
// For capture in portrait orientation, swap the aspect ratio (16:9 becomes 9:16)
|
|
350
391
|
const isPortrait = video.videoHeight > video.videoWidth;
|
|
351
|
-
const targetAspectRatio = isPortrait
|
|
392
|
+
const targetAspectRatio = isPortrait
|
|
393
|
+
? heightRatio / widthRatio
|
|
394
|
+
: widthRatio / heightRatio;
|
|
352
395
|
const videoAspectRatio = video.videoWidth / video.videoHeight;
|
|
353
396
|
if (videoAspectRatio > targetAspectRatio) {
|
|
354
397
|
// Video is wider than target - crop sides
|