@capgo/camera-preview 7.3.9 → 7.4.0-beta.1
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/CapgoCameraPreview.podspec +16 -13
- package/README.md +298 -68
- package/android/.gradle/8.14.2/checksums/checksums.lock +0 -0
- package/android/.gradle/8.14.2/checksums/sha1-checksums.bin +0 -0
- 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/fileChanges/last-build.bin +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/8.14.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/file-system.probe +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +9 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +239 -545
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraXView.java +848 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraDevice.java +54 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraLens.java +70 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraSessionConfiguration.java +65 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/LensInfo.java +34 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/model/ZoomFactors.java +34 -0
- package/dist/docs.json +702 -151
- package/dist/esm/definitions.d.ts +326 -80
- package/dist/esm/definitions.js +10 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +27 -1
- package/dist/esm/web.js +244 -4
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +254 -4
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +254 -4
- package/dist/plugin.js.map +1 -1
- package/ios/{Plugin → Sources/CapgoCameraPreview}/CameraController.swift +359 -34
- package/ios/{Plugin → Sources/CapgoCameraPreview}/Plugin.swift +307 -16
- package/ios/Tests/CameraPreviewPluginTests/CameraPreviewPluginTests.swift +15 -0
- package/package.json +1 -1
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraActivity.java +0 -1279
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomSurfaceView.java +0 -29
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomTextureView.java +0 -39
- package/android/src/main/java/com/ahm/capacitor/camera/preview/Preview.java +0 -461
- package/android/src/main/java/com/ahm/capacitor/camera/preview/TapGestureDetector.java +0 -24
- package/ios/Plugin/Info.plist +0 -24
- package/ios/Plugin/Plugin.h +0 -10
- package/ios/Plugin/Plugin.m +0 -18
- package/ios/Plugin.xcodeproj/project.pbxproj +0 -593
- package/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/Plugin.xcworkspace/contents.xcworkspacedata +0 -10
- package/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/PluginTests/Info.plist +0 -22
- package/ios/PluginTests/PluginTests.swift +0 -83
- package/ios/Podfile +0 -13
- package/ios/Podfile.lock +0 -23
package/dist/plugin.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
var capacitorCapacitorCameraView = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
exports.DeviceType = void 0;
|
|
5
|
+
(function (DeviceType) {
|
|
6
|
+
DeviceType["ULTRA_WIDE"] = "ultraWide";
|
|
7
|
+
DeviceType["WIDE_ANGLE"] = "wideAngle";
|
|
8
|
+
DeviceType["TELEPHOTO"] = "telephoto";
|
|
9
|
+
DeviceType["TRUE_DEPTH"] = "trueDepth";
|
|
10
|
+
DeviceType["DUAL"] = "dual";
|
|
11
|
+
DeviceType["DUAL_WIDE"] = "dualWide";
|
|
12
|
+
DeviceType["TRIPLE"] = "triple";
|
|
13
|
+
})(exports.DeviceType || (exports.DeviceType = {}));
|
|
14
|
+
|
|
4
15
|
const CameraPreview = core.registerPlugin("CameraPreview", {
|
|
5
16
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CameraPreviewWeb()),
|
|
6
17
|
});
|
|
@@ -13,6 +24,7 @@ var capacitorCapacitorCameraView = (function (exports, core) {
|
|
|
13
24
|
* used in capture
|
|
14
25
|
*/
|
|
15
26
|
this.isBackCamera = false;
|
|
27
|
+
this.currentDeviceId = null;
|
|
16
28
|
}
|
|
17
29
|
async getSupportedPictureSizes() {
|
|
18
30
|
throw new Error("getSupportedPictureSizes not supported under the web platform");
|
|
@@ -59,9 +71,16 @@ var capacitorCapacitorCameraView = (function (exports, core) {
|
|
|
59
71
|
height: { ideal: options.height },
|
|
60
72
|
},
|
|
61
73
|
};
|
|
62
|
-
if (options.
|
|
63
|
-
constraints.video.
|
|
64
|
-
|
|
74
|
+
if (options.deviceId) {
|
|
75
|
+
constraints.video.deviceId = { exact: options.deviceId };
|
|
76
|
+
this.currentDeviceId = options.deviceId;
|
|
77
|
+
// Try to determine camera position from device
|
|
78
|
+
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
79
|
+
const device = devices.find(d => d.deviceId === options.deviceId);
|
|
80
|
+
this.isBackCamera = (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes('back')) || (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes('rear')) || false;
|
|
81
|
+
}
|
|
82
|
+
else if (options.position === "rear") {
|
|
83
|
+
constraints.video.facingMode = "environment";
|
|
65
84
|
this.isBackCamera = true;
|
|
66
85
|
}
|
|
67
86
|
else {
|
|
@@ -159,13 +178,244 @@ var capacitorCapacitorCameraView = (function (exports, core) {
|
|
|
159
178
|
throw new Error(`setFlashMode not supported under the web platform${_options}`);
|
|
160
179
|
}
|
|
161
180
|
async flip() {
|
|
162
|
-
|
|
181
|
+
const video = document.getElementById("video");
|
|
182
|
+
if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {
|
|
183
|
+
throw new Error("camera is not running");
|
|
184
|
+
}
|
|
185
|
+
// Stop current stream
|
|
186
|
+
this.stopStream(video.srcObject);
|
|
187
|
+
// Toggle camera position
|
|
188
|
+
this.isBackCamera = !this.isBackCamera;
|
|
189
|
+
// Get new constraints
|
|
190
|
+
const constraints = {
|
|
191
|
+
video: {
|
|
192
|
+
facingMode: this.isBackCamera ? "environment" : "user",
|
|
193
|
+
width: { ideal: video.videoWidth || 640 },
|
|
194
|
+
height: { ideal: video.videoHeight || 480 },
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
try {
|
|
198
|
+
const stream = await navigator.mediaDevices.getUserMedia(constraints);
|
|
199
|
+
video.srcObject = stream;
|
|
200
|
+
// Update current device ID from the new stream
|
|
201
|
+
const videoTrack = stream.getVideoTracks()[0];
|
|
202
|
+
if (videoTrack) {
|
|
203
|
+
this.currentDeviceId = videoTrack.getSettings().deviceId || null;
|
|
204
|
+
}
|
|
205
|
+
// Update video transform based on camera
|
|
206
|
+
if (this.isBackCamera) {
|
|
207
|
+
video.style.transform = "none";
|
|
208
|
+
video.style.webkitTransform = "none";
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
video.style.transform = "scaleX(-1)";
|
|
212
|
+
video.style.webkitTransform = "scaleX(-1)";
|
|
213
|
+
}
|
|
214
|
+
await video.play();
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
throw new Error(`Failed to flip camera: ${error}`);
|
|
218
|
+
}
|
|
163
219
|
}
|
|
164
220
|
async setOpacity(_options) {
|
|
165
221
|
const video = document.getElementById("video");
|
|
166
222
|
if (!!video && !!_options.opacity)
|
|
167
223
|
video.style.setProperty("opacity", _options.opacity.toString());
|
|
168
224
|
}
|
|
225
|
+
async isRunning() {
|
|
226
|
+
const video = document.getElementById("video");
|
|
227
|
+
return { isRunning: !!video && !!video.srcObject };
|
|
228
|
+
}
|
|
229
|
+
async getAvailableDevices() {
|
|
230
|
+
var _a;
|
|
231
|
+
if (!((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.enumerateDevices)) {
|
|
232
|
+
throw new Error("getAvailableDevices not supported under the web platform");
|
|
233
|
+
}
|
|
234
|
+
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
235
|
+
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
236
|
+
// Group devices by position (front/back)
|
|
237
|
+
const frontDevices = [];
|
|
238
|
+
const backDevices = [];
|
|
239
|
+
videoDevices.forEach((device, index) => {
|
|
240
|
+
const label = device.label || `Camera ${index + 1}`;
|
|
241
|
+
const labelLower = label.toLowerCase();
|
|
242
|
+
// Determine device type based on label
|
|
243
|
+
let deviceType = exports.DeviceType.WIDE_ANGLE;
|
|
244
|
+
let baseZoomRatio = 1.0;
|
|
245
|
+
if (labelLower.includes('ultra') || labelLower.includes('0.5')) {
|
|
246
|
+
deviceType = exports.DeviceType.ULTRA_WIDE;
|
|
247
|
+
baseZoomRatio = 0.5;
|
|
248
|
+
}
|
|
249
|
+
else if (labelLower.includes('telephoto') || labelLower.includes('tele') || labelLower.includes('2x') || labelLower.includes('3x')) {
|
|
250
|
+
deviceType = exports.DeviceType.TELEPHOTO;
|
|
251
|
+
baseZoomRatio = 2.0;
|
|
252
|
+
}
|
|
253
|
+
else if (labelLower.includes('depth') || labelLower.includes('truedepth')) {
|
|
254
|
+
deviceType = exports.DeviceType.TRUE_DEPTH;
|
|
255
|
+
baseZoomRatio = 1.0;
|
|
256
|
+
}
|
|
257
|
+
const lensInfo = {
|
|
258
|
+
deviceId: device.deviceId,
|
|
259
|
+
label,
|
|
260
|
+
deviceType,
|
|
261
|
+
focalLength: 4.25,
|
|
262
|
+
baseZoomRatio,
|
|
263
|
+
minZoom: 1.0,
|
|
264
|
+
maxZoom: 1.0
|
|
265
|
+
};
|
|
266
|
+
// Determine position and add to appropriate array
|
|
267
|
+
if (labelLower.includes('back') || labelLower.includes('rear')) {
|
|
268
|
+
backDevices.push(lensInfo);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
frontDevices.push(lensInfo);
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
const result = [];
|
|
275
|
+
if (frontDevices.length > 0) {
|
|
276
|
+
result.push({
|
|
277
|
+
deviceId: frontDevices[0].deviceId,
|
|
278
|
+
label: "Front Camera",
|
|
279
|
+
position: "front",
|
|
280
|
+
lenses: frontDevices,
|
|
281
|
+
isLogical: false,
|
|
282
|
+
minZoom: Math.min(...frontDevices.map(d => d.minZoom)),
|
|
283
|
+
maxZoom: Math.max(...frontDevices.map(d => d.maxZoom))
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
if (backDevices.length > 0) {
|
|
287
|
+
result.push({
|
|
288
|
+
deviceId: backDevices[0].deviceId,
|
|
289
|
+
label: "Back Camera",
|
|
290
|
+
position: "rear",
|
|
291
|
+
lenses: backDevices,
|
|
292
|
+
isLogical: false,
|
|
293
|
+
minZoom: Math.min(...backDevices.map(d => d.minZoom)),
|
|
294
|
+
maxZoom: Math.max(...backDevices.map(d => d.maxZoom))
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
return { devices: result };
|
|
298
|
+
}
|
|
299
|
+
async getZoom() {
|
|
300
|
+
const video = document.getElementById("video");
|
|
301
|
+
if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {
|
|
302
|
+
throw new Error("camera is not running");
|
|
303
|
+
}
|
|
304
|
+
const stream = video.srcObject;
|
|
305
|
+
const videoTrack = stream.getVideoTracks()[0];
|
|
306
|
+
if (!videoTrack) {
|
|
307
|
+
throw new Error("no video track found");
|
|
308
|
+
}
|
|
309
|
+
const capabilities = videoTrack.getCapabilities();
|
|
310
|
+
const settings = videoTrack.getSettings();
|
|
311
|
+
if (!capabilities.zoom) {
|
|
312
|
+
throw new Error("zoom not supported by this device");
|
|
313
|
+
}
|
|
314
|
+
// Get current device info to determine lens type
|
|
315
|
+
let deviceType = exports.DeviceType.WIDE_ANGLE;
|
|
316
|
+
let baseZoomRatio = 1.0;
|
|
317
|
+
if (this.currentDeviceId) {
|
|
318
|
+
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
319
|
+
const device = devices.find(d => d.deviceId === this.currentDeviceId);
|
|
320
|
+
if (device) {
|
|
321
|
+
const labelLower = device.label.toLowerCase();
|
|
322
|
+
if (labelLower.includes('ultra') || labelLower.includes('0.5')) {
|
|
323
|
+
deviceType = exports.DeviceType.ULTRA_WIDE;
|
|
324
|
+
baseZoomRatio = 0.5;
|
|
325
|
+
}
|
|
326
|
+
else if (labelLower.includes('telephoto') || labelLower.includes('tele') || labelLower.includes('2x') || labelLower.includes('3x')) {
|
|
327
|
+
deviceType = exports.DeviceType.TELEPHOTO;
|
|
328
|
+
baseZoomRatio = 2.0;
|
|
329
|
+
}
|
|
330
|
+
else if (labelLower.includes('depth') || labelLower.includes('truedepth')) {
|
|
331
|
+
deviceType = exports.DeviceType.TRUE_DEPTH;
|
|
332
|
+
baseZoomRatio = 1.0;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
const currentZoom = settings.zoom || 1;
|
|
337
|
+
const lensInfo = {
|
|
338
|
+
focalLength: 4.25,
|
|
339
|
+
deviceType,
|
|
340
|
+
baseZoomRatio,
|
|
341
|
+
digitalZoom: currentZoom / baseZoomRatio
|
|
342
|
+
};
|
|
343
|
+
return {
|
|
344
|
+
min: capabilities.zoom.min || 1,
|
|
345
|
+
max: capabilities.zoom.max || 1,
|
|
346
|
+
current: currentZoom,
|
|
347
|
+
lens: lensInfo,
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
async setZoom(options) {
|
|
351
|
+
const video = document.getElementById("video");
|
|
352
|
+
if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {
|
|
353
|
+
throw new Error("camera is not running");
|
|
354
|
+
}
|
|
355
|
+
const stream = video.srcObject;
|
|
356
|
+
const videoTrack = stream.getVideoTracks()[0];
|
|
357
|
+
if (!videoTrack) {
|
|
358
|
+
throw new Error("no video track found");
|
|
359
|
+
}
|
|
360
|
+
const capabilities = videoTrack.getCapabilities();
|
|
361
|
+
if (!capabilities.zoom) {
|
|
362
|
+
throw new Error("zoom not supported by this device");
|
|
363
|
+
}
|
|
364
|
+
const zoomLevel = Math.max(capabilities.zoom.min || 1, Math.min(capabilities.zoom.max || 1, options.level));
|
|
365
|
+
try {
|
|
366
|
+
await videoTrack.applyConstraints({
|
|
367
|
+
advanced: [{ zoom: zoomLevel }]
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
catch (error) {
|
|
371
|
+
throw new Error(`Failed to set zoom: ${error}`);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
async getFlashMode() {
|
|
375
|
+
throw new Error("getFlashMode not supported under the web platform");
|
|
376
|
+
}
|
|
377
|
+
async getDeviceId() {
|
|
378
|
+
return { deviceId: this.currentDeviceId || "" };
|
|
379
|
+
}
|
|
380
|
+
async setDeviceId(options) {
|
|
381
|
+
const video = document.getElementById("video");
|
|
382
|
+
if (!(video === null || video === void 0 ? void 0 : video.srcObject)) {
|
|
383
|
+
throw new Error("camera is not running");
|
|
384
|
+
}
|
|
385
|
+
// Stop current stream
|
|
386
|
+
this.stopStream(video.srcObject);
|
|
387
|
+
// Update current device ID
|
|
388
|
+
this.currentDeviceId = options.deviceId;
|
|
389
|
+
// Get new constraints with specific device ID
|
|
390
|
+
const constraints = {
|
|
391
|
+
video: {
|
|
392
|
+
deviceId: { exact: options.deviceId },
|
|
393
|
+
width: { ideal: video.videoWidth || 640 },
|
|
394
|
+
height: { ideal: video.videoHeight || 480 },
|
|
395
|
+
},
|
|
396
|
+
};
|
|
397
|
+
try {
|
|
398
|
+
// Try to determine camera position from device
|
|
399
|
+
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
400
|
+
const device = devices.find(d => d.deviceId === options.deviceId);
|
|
401
|
+
this.isBackCamera = (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes('back')) || (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes('rear')) || false;
|
|
402
|
+
const stream = await navigator.mediaDevices.getUserMedia(constraints);
|
|
403
|
+
video.srcObject = stream;
|
|
404
|
+
// Update video transform based on camera
|
|
405
|
+
if (this.isBackCamera) {
|
|
406
|
+
video.style.transform = "none";
|
|
407
|
+
video.style.webkitTransform = "none";
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
video.style.transform = "scaleX(-1)";
|
|
411
|
+
video.style.webkitTransform = "scaleX(-1)";
|
|
412
|
+
}
|
|
413
|
+
await video.play();
|
|
414
|
+
}
|
|
415
|
+
catch (error) {
|
|
416
|
+
throw new Error(`Failed to swap to device ${options.deviceId}: ${error}`);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
169
419
|
}
|
|
170
420
|
|
|
171
421
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["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\";\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 }\n async getSupportedPictureSizes() {\n throw new Error(\"getSupportedPictureSizes not supported under the web platform\");\n }\n async start(options) {\n var _a;\n await navigator.mediaDevices\n .getUserMedia({\n audio: !options.disableAudio,\n video: true,\n })\n .then((stream) => {\n // Stop any existing stream so we can request media with different constraints based on user input\n stream.getTracks().forEach((track) => track.stop());\n })\n .catch((error) => {\n Promise.reject(error);\n });\n const video = document.getElementById(\"video\");\n const parent = document.getElementById((options === null || options === void 0 ? void 0 : options.parent) || \"\");\n if (!video) {\n const videoElement = document.createElement(\"video\");\n videoElement.id = \"video\";\n videoElement.setAttribute(\"class\", (options === null || options === void 0 ? void 0 : options.className) || \"\");\n // Don't flip video feed if camera is rear facing\n if (options.position !== \"rear\") {\n videoElement.setAttribute(\"style\", \"-webkit-transform: scaleX(-1); transform: scaleX(-1);\");\n }\n const userAgent = navigator.userAgent.toLowerCase();\n const isSafari = userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\");\n // Safari on iOS needs to have the autoplay, muted and playsinline attributes set for video.play() to be successful\n // Without these attributes videoElement.play() will throw a NotAllowedError\n // https://developer.apple.com/documentation/webkit/delivering_video_content_for_safari\n if (isSafari) {\n videoElement.setAttribute(\"autoplay\", \"true\");\n videoElement.setAttribute(\"muted\", \"true\");\n videoElement.setAttribute(\"playsinline\", \"true\");\n }\n parent === null || parent === void 0 ? void 0 : parent.appendChild(videoElement);\n if ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia) {\n const constraints = {\n video: {\n width: { ideal: options.width },\n height: { ideal: options.height },\n },\n };\n if (options.position === \"rear\") {\n constraints.video.facingMode =\n \"environment\";\n this.isBackCamera = true;\n }\n else {\n this.isBackCamera = false;\n }\n const self = this;\n await navigator.mediaDevices.getUserMedia(constraints).then((stream) => {\n if (document.getElementById(\"video\")) {\n // video.src = window.URL.createObjectURL(stream);\n videoElement.srcObject = stream;\n videoElement.play();\n Promise.resolve({});\n }\n else {\n self.stopStream(stream);\n Promise.reject(new Error(\"camera already stopped\"));\n }\n }, (err) => {\n Promise.reject(new Error(err));\n });\n }\n }\n else {\n Promise.reject(new Error(\"camera already started\"));\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(\"video\");\n if (video) {\n video.pause();\n this.stopStream(video.srcObject);\n video.remove();\n }\n }\n async capture(options) {\n return new Promise((resolve, reject) => {\n const video = document.getElementById(\"video\");\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 canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n // flip horizontally back camera isn't used\n if (!this.isBackCamera) {\n context === null || context === void 0 ? void 0 : context.translate(video.videoWidth, 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, 0, 0, video.videoWidth, video.videoHeight);\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 });\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 throw new Error(\"flip not supported under the web platform\");\n }\n async setOpacity(_options) {\n const video = document.getElementById(\"video\");\n if (!!video && !!_options.opacity)\n video.style.setProperty(\"opacity\", _options.opacity.toString());\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;IACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;IAChD,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE;IACf;IACA;IACA;IACA;IACA,QAAQ,IAAI,CAAC,YAAY,GAAG,KAAK;IACjC;IACA,IAAI,MAAM,wBAAwB,GAAG;IACrC,QAAQ,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC;IACxF;IACA,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE;IACzB,QAAQ,IAAI,EAAE;IACd,QAAQ,MAAM,SAAS,CAAC;IACxB,aAAa,YAAY,CAAC;IAC1B,YAAY,KAAK,EAAE,CAAC,OAAO,CAAC,YAAY;IACxC,YAAY,KAAK,EAAE,IAAI;IACvB,SAAS;IACT,aAAa,IAAI,CAAC,CAAC,MAAM,KAAK;IAC9B;IACA,YAAY,MAAM,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC;IAC/D,SAAS;IACT,aAAa,KAAK,CAAC,CAAC,KAAK,KAAK;IAC9B,YAAY,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;IACjC,SAAS,CAAC;IACV,QAAQ,MAAM,KAAK,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC;IACtD,QAAQ,MAAM,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,EAAE,CAAC;IACx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AAQ,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC;IAChF;IACA,IAAI,MAAM,sBAAsB,GAAG;IACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC;IACtF;IACA,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC;IAChF;IACA,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;IACjC,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,iDAAiD,EAAE,QAAQ,CAAC,CAAC,CAAC;IACvF;IACA,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC;IACpE;IACA,IAAI,MAAM,UAAU,CAAC,QAAQ,EAAE;IAC/B,QAAQ,MAAM,KAAK,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC;IACtD,QAAQ,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO;IACzC,YAAY,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC3E;IACA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.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\";\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 }\n async getSupportedPictureSizes() {\n throw new Error(\"getSupportedPictureSizes not supported under the web platform\");\n }\n async start(options) {\n var _a;\n await navigator.mediaDevices\n .getUserMedia({\n audio: !options.disableAudio,\n video: true,\n })\n .then((stream) => {\n // Stop any existing stream so we can request media with different constraints based on user input\n stream.getTracks().forEach((track) => track.stop());\n })\n .catch((error) => {\n Promise.reject(error);\n });\n const video = document.getElementById(\"video\");\n const parent = document.getElementById((options === null || options === void 0 ? void 0 : options.parent) || \"\");\n if (!video) {\n const videoElement = document.createElement(\"video\");\n videoElement.id = \"video\";\n videoElement.setAttribute(\"class\", (options === null || options === void 0 ? void 0 : options.className) || \"\");\n // Don't flip video feed if camera is rear facing\n if (options.position !== \"rear\") {\n videoElement.setAttribute(\"style\", \"-webkit-transform: scaleX(-1); transform: scaleX(-1);\");\n }\n const userAgent = navigator.userAgent.toLowerCase();\n const isSafari = userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\");\n // Safari on iOS needs to have the autoplay, muted and playsinline attributes set for video.play() to be successful\n // Without these attributes videoElement.play() will throw a NotAllowedError\n // https://developer.apple.com/documentation/webkit/delivering_video_content_for_safari\n if (isSafari) {\n videoElement.setAttribute(\"autoplay\", \"true\");\n videoElement.setAttribute(\"muted\", \"true\");\n videoElement.setAttribute(\"playsinline\", \"true\");\n }\n parent === null || parent === void 0 ? void 0 : parent.appendChild(videoElement);\n if ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia) {\n const constraints = {\n video: {\n width: { ideal: options.width },\n height: { ideal: options.height },\n },\n };\n if (options.deviceId) {\n constraints.video.deviceId = { exact: options.deviceId };\n this.currentDeviceId = options.deviceId;\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 = (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes('back')) || (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes('rear')) || false;\n }\n else if (options.position === \"rear\") {\n constraints.video.facingMode = \"environment\";\n this.isBackCamera = true;\n }\n else {\n this.isBackCamera = false;\n }\n const self = this;\n await navigator.mediaDevices.getUserMedia(constraints).then((stream) => {\n if (document.getElementById(\"video\")) {\n // video.src = window.URL.createObjectURL(stream);\n videoElement.srcObject = stream;\n videoElement.play();\n Promise.resolve({});\n }\n else {\n self.stopStream(stream);\n Promise.reject(new Error(\"camera already stopped\"));\n }\n }, (err) => {\n Promise.reject(new Error(err));\n });\n }\n }\n else {\n Promise.reject(new Error(\"camera already started\"));\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(\"video\");\n if (video) {\n video.pause();\n this.stopStream(video.srcObject);\n video.remove();\n }\n }\n async capture(options) {\n return new Promise((resolve, reject) => {\n const video = document.getElementById(\"video\");\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 canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n // flip horizontally back camera isn't used\n if (!this.isBackCamera) {\n context === null || context === void 0 ? void 0 : context.translate(video.videoWidth, 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, 0, 0, video.videoWidth, video.videoHeight);\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 });\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(\"video\");\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(\"video\");\n if (!!video && !!_options.opacity)\n video.style.setProperty(\"opacity\", _options.opacity.toString());\n }\n async isRunning() {\n const video = document.getElementById(\"video\");\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') || labelLower.includes('tele') || labelLower.includes('2x') || labelLower.includes('3x')) {\n deviceType = DeviceType.TELEPHOTO;\n baseZoomRatio = 2.0;\n }\n else if (labelLower.includes('depth') || 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(\"video\");\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') || labelLower.includes('tele') || labelLower.includes('2x') || labelLower.includes('3x')) {\n deviceType = DeviceType.TELEPHOTO;\n baseZoomRatio = 2.0;\n }\n else if (labelLower.includes('depth') || 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(\"video\");\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 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(\"video\");\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 = (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes('back')) || (device === null || device === void 0 ? void 0 : device.label.toLowerCase().includes('rear')) || 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}\n//# sourceMappingURL=web.js.map"],"names":["DeviceType","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,UAAU,EAAE;IACvB,IAAI,UAAU,CAAC,YAAY,CAAC,GAAG,WAAW;IAC1C,IAAI,UAAU,C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