@elizaos/capacitor-camera 2.0.0-beta.1 → 2.0.3-beta.2
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/LICENSE +21 -0
- package/README.md +142 -0
- package/android/build.gradle +16 -2
- package/dist/esm/web.d.ts +2 -1
- package/dist/esm/web.d.ts.map +1 -1
- package/dist/esm/web.js +113 -87
- package/dist/plugin.cjs.js +113 -87
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +113 -87
- package/dist/plugin.js.map +1 -1
- package/package.json +13 -9
package/dist/plugin.js
CHANGED
|
@@ -13,6 +13,37 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
13
13
|
"video/mp4",
|
|
14
14
|
];
|
|
15
15
|
const getSupportedMimeType = () => VIDEO_MIME_TYPES.find((m) => MediaRecorder.isTypeSupported(m)) ?? null;
|
|
16
|
+
const getMediaDevices = () => {
|
|
17
|
+
if (!navigator.mediaDevices?.getUserMedia) {
|
|
18
|
+
throw new Error("Camera media devices API is not available");
|
|
19
|
+
}
|
|
20
|
+
return navigator.mediaDevices;
|
|
21
|
+
};
|
|
22
|
+
const assertPositiveFinite = (value, name) => {
|
|
23
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
24
|
+
throw new Error(`${name} must be a positive finite number`);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const assertRecordingOptions = (options) => {
|
|
28
|
+
if (!options)
|
|
29
|
+
return;
|
|
30
|
+
if (options.quality !== undefined &&
|
|
31
|
+
!["low", "medium", "high", "highest"].includes(options.quality)) {
|
|
32
|
+
throw new Error("quality must be one of low, medium, high, or highest");
|
|
33
|
+
}
|
|
34
|
+
if (options.maxDuration !== undefined) {
|
|
35
|
+
assertPositiveFinite(options.maxDuration, "maxDuration");
|
|
36
|
+
}
|
|
37
|
+
if (options.maxFileSize !== undefined) {
|
|
38
|
+
assertPositiveFinite(options.maxFileSize, "maxFileSize");
|
|
39
|
+
}
|
|
40
|
+
if (options.bitrate !== undefined) {
|
|
41
|
+
assertPositiveFinite(options.bitrate, "bitrate");
|
|
42
|
+
}
|
|
43
|
+
if (options.frameRate !== undefined) {
|
|
44
|
+
assertPositiveFinite(options.frameRate, "frameRate");
|
|
45
|
+
}
|
|
46
|
+
};
|
|
16
47
|
class CameraWeb extends core.WebPlugin {
|
|
17
48
|
constructor() {
|
|
18
49
|
super(...arguments);
|
|
@@ -36,27 +67,29 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
36
67
|
this.pluginListeners = [];
|
|
37
68
|
}
|
|
38
69
|
async getDevices() {
|
|
39
|
-
// enumerateDevices() returns device
|
|
40
|
-
//
|
|
70
|
+
// enumerateDevices() returns unlabeled device records unless the user has
|
|
71
|
+
// already granted camera permission via a prior getUserMedia() call.
|
|
41
72
|
// We intentionally do NOT call getUserMedia() here because it requires a
|
|
42
73
|
// user gesture and would throw NotAllowedError if called programmatically.
|
|
43
|
-
const
|
|
74
|
+
const mediaDevices = getMediaDevices();
|
|
75
|
+
if (!mediaDevices.enumerateDevices) {
|
|
76
|
+
throw new Error("Camera device enumeration is not available");
|
|
77
|
+
}
|
|
78
|
+
const allDevices = await mediaDevices.enumerateDevices();
|
|
44
79
|
const videoDevices = allDevices.filter((d) => d.kind === "videoinput");
|
|
45
|
-
const devices = await Promise.all(videoDevices.map(async (device, index) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
}));
|
|
80
|
+
const devices = await Promise.all(videoDevices.map(async (device, index) => ({
|
|
81
|
+
deviceId: device.deviceId,
|
|
82
|
+
label: device.label || `Camera ${index + 1}`,
|
|
83
|
+
direction: this.inferDirection(device.label),
|
|
84
|
+
// Capability probing requires getUserMedia(), which can prompt for
|
|
85
|
+
// camera permission. Enumeration stays prompt-free and reports
|
|
86
|
+
// unknown capabilities until preview/capture has explicit access.
|
|
87
|
+
hasFlash: false,
|
|
88
|
+
hasZoom: false,
|
|
89
|
+
maxZoom: 1,
|
|
90
|
+
supportedResolutions: [],
|
|
91
|
+
supportedFrameRates: [],
|
|
92
|
+
})));
|
|
60
93
|
return { devices };
|
|
61
94
|
}
|
|
62
95
|
inferDirection(label) {
|
|
@@ -73,60 +106,17 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
73
106
|
}
|
|
74
107
|
return "external";
|
|
75
108
|
}
|
|
76
|
-
async
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
stream = await navigator.mediaDevices.getUserMedia({
|
|
80
|
-
video: { deviceId: { exact: deviceId } },
|
|
81
|
-
});
|
|
109
|
+
async startPreview(options) {
|
|
110
|
+
if (!options?.element?.appendChild) {
|
|
111
|
+
throw new Error("Preview element is required");
|
|
82
112
|
}
|
|
83
|
-
|
|
84
|
-
|
|
113
|
+
if (options.resolution) {
|
|
114
|
+
assertPositiveFinite(options.resolution.width, "resolution.width");
|
|
115
|
+
assertPositiveFinite(options.resolution.height, "resolution.height");
|
|
85
116
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
stream.getTracks().forEach((t) => {
|
|
89
|
-
t.stop();
|
|
90
|
-
});
|
|
91
|
-
return null;
|
|
117
|
+
if (options.frameRate !== undefined) {
|
|
118
|
+
assertPositiveFinite(options.frameRate, "frameRate");
|
|
92
119
|
}
|
|
93
|
-
const capabilities = track.getCapabilities ? track.getCapabilities() : {};
|
|
94
|
-
stream.getTracks().forEach((t) => {
|
|
95
|
-
t.stop();
|
|
96
|
-
});
|
|
97
|
-
const caps = capabilities;
|
|
98
|
-
// Build resolutions from actual device capabilities only
|
|
99
|
-
const resolutions = [];
|
|
100
|
-
if (caps.width?.max && caps.height?.max) {
|
|
101
|
-
resolutions.push({ width: caps.width.max, height: caps.height.max });
|
|
102
|
-
// Add common lower resolutions only if device supports them
|
|
103
|
-
if (caps.width.max >= 1280 && caps.height.max >= 720) {
|
|
104
|
-
resolutions.push({ width: 1280, height: 720 });
|
|
105
|
-
}
|
|
106
|
-
if (caps.width.max >= 640 && caps.height.max >= 480) {
|
|
107
|
-
resolutions.push({ width: 640, height: 480 });
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
// Build frameRates from actual device capabilities only
|
|
111
|
-
const frameRates = [];
|
|
112
|
-
if (caps.frameRate?.max) {
|
|
113
|
-
if (caps.frameRate.max >= 60)
|
|
114
|
-
frameRates.push(60);
|
|
115
|
-
if (caps.frameRate.max >= 30)
|
|
116
|
-
frameRates.push(30);
|
|
117
|
-
if (caps.frameRate.max >= 24)
|
|
118
|
-
frameRates.push(24);
|
|
119
|
-
if (caps.frameRate.max >= 15)
|
|
120
|
-
frameRates.push(15);
|
|
121
|
-
}
|
|
122
|
-
return {
|
|
123
|
-
zoom: caps.zoom,
|
|
124
|
-
resolutions: resolutions.length > 0 ? resolutions : undefined,
|
|
125
|
-
frameRates: frameRates.length > 0 ? frameRates : undefined,
|
|
126
|
-
hasFlash: caps.torch === true, // Torch capability indicates flash support
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
async startPreview(options) {
|
|
130
120
|
await this.stopPreview();
|
|
131
121
|
const constraints = {
|
|
132
122
|
video: {
|
|
@@ -148,13 +138,9 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
148
138
|
},
|
|
149
139
|
audio: false,
|
|
150
140
|
};
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
|
|
154
|
-
// `packages/agent/src/services/permissions/probers/camera.ts` first,
|
|
155
|
-
// then asks the user, only then opens the stream. Will be retired by
|
|
156
|
-
// the chat-surface migration agent.
|
|
157
|
-
this.mediaStream = await navigator.mediaDevices.getUserMedia(constraints);
|
|
141
|
+
// Browser camera permission is requested by opening the stream. Native
|
|
142
|
+
// permission probing is handled outside this Capacitor web fallback.
|
|
143
|
+
this.mediaStream = await getMediaDevices().getUserMedia(constraints);
|
|
158
144
|
this.previewElement = options.element;
|
|
159
145
|
this.videoElement = document.createElement("video");
|
|
160
146
|
this.videoElement.srcObject = this.mediaStream;
|
|
@@ -188,8 +174,10 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
188
174
|
});
|
|
189
175
|
this.mediaStream = null;
|
|
190
176
|
}
|
|
191
|
-
if (this.videoElement
|
|
192
|
-
this.previewElement
|
|
177
|
+
if (this.videoElement) {
|
|
178
|
+
if (this.previewElement?.contains(this.videoElement)) {
|
|
179
|
+
this.previewElement.removeChild(this.videoElement);
|
|
180
|
+
}
|
|
193
181
|
this.videoElement = null;
|
|
194
182
|
}
|
|
195
183
|
this.previewElement = null;
|
|
@@ -215,8 +203,18 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
215
203
|
const settings = track.getSettings();
|
|
216
204
|
const videoWidth = settings.width || this.videoElement.videoWidth;
|
|
217
205
|
const videoHeight = settings.height || this.videoElement.videoHeight;
|
|
206
|
+
assertPositiveFinite(videoWidth, "videoWidth");
|
|
207
|
+
assertPositiveFinite(videoHeight, "videoHeight");
|
|
218
208
|
const targetWidth = options?.width || videoWidth;
|
|
219
209
|
const targetHeight = options?.height || videoHeight;
|
|
210
|
+
assertPositiveFinite(targetWidth, "width");
|
|
211
|
+
assertPositiveFinite(targetHeight, "height");
|
|
212
|
+
if (options?.quality !== undefined &&
|
|
213
|
+
(!Number.isFinite(options.quality) ||
|
|
214
|
+
options.quality < 0 ||
|
|
215
|
+
options.quality > 100)) {
|
|
216
|
+
throw new Error("quality must be a finite number between 0 and 100");
|
|
217
|
+
}
|
|
220
218
|
const canvas = document.createElement("canvas");
|
|
221
219
|
canvas.width = targetWidth;
|
|
222
220
|
canvas.height = targetHeight;
|
|
@@ -239,7 +237,11 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
239
237
|
: format === "webp"
|
|
240
238
|
? "image/webp"
|
|
241
239
|
: "image/jpeg";
|
|
242
|
-
const
|
|
240
|
+
const dataUrl = canvas.toDataURL(mimeType, quality);
|
|
241
|
+
const base64 = dataUrl.split(",")[1];
|
|
242
|
+
if (!base64) {
|
|
243
|
+
throw new Error("Failed to encode captured photo");
|
|
244
|
+
}
|
|
243
245
|
return {
|
|
244
246
|
base64,
|
|
245
247
|
format,
|
|
@@ -254,9 +256,10 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
254
256
|
if (this.isRecording) {
|
|
255
257
|
throw new Error("Recording already in progress");
|
|
256
258
|
}
|
|
259
|
+
assertRecordingOptions(options);
|
|
257
260
|
let streamToRecord = this.mediaStream;
|
|
258
261
|
if (options?.audio !== false) {
|
|
259
|
-
const audioStream = await
|
|
262
|
+
const audioStream = await getMediaDevices().getUserMedia({
|
|
260
263
|
audio: true,
|
|
261
264
|
});
|
|
262
265
|
streamToRecord = new MediaStream([
|
|
@@ -378,17 +381,28 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
378
381
|
return { settings: { ...this.currentSettings } };
|
|
379
382
|
}
|
|
380
383
|
async setSettings(options) {
|
|
384
|
+
if (!options?.settings || typeof options.settings !== "object") {
|
|
385
|
+
throw new Error("settings object is required");
|
|
386
|
+
}
|
|
387
|
+
if (options.settings.zoom !== undefined) {
|
|
388
|
+
const zoom = options.settings.zoom;
|
|
389
|
+
this.assertValidZoom(zoom);
|
|
390
|
+
}
|
|
381
391
|
this.currentSettings = { ...this.currentSettings, ...options.settings };
|
|
382
392
|
if (this.mediaStream && options.settings.zoom !== undefined) {
|
|
383
393
|
await this.applyZoom(options.settings.zoom);
|
|
384
394
|
}
|
|
385
395
|
}
|
|
386
396
|
async setZoom(options) {
|
|
387
|
-
|
|
388
|
-
|
|
397
|
+
const zoom = options?.zoom;
|
|
398
|
+
this.assertValidZoom(zoom);
|
|
399
|
+
await this.applyZoom(zoom);
|
|
400
|
+
this.currentSettings.zoom = zoom;
|
|
401
|
+
}
|
|
402
|
+
assertValidZoom(zoom) {
|
|
403
|
+
if (typeof zoom !== "number" || !Number.isFinite(zoom) || zoom < 0) {
|
|
404
|
+
throw new Error(`Invalid zoom value: ${zoom}. Must be a non-negative finite number.`);
|
|
389
405
|
}
|
|
390
|
-
await this.applyZoom(options.zoom);
|
|
391
|
-
this.currentSettings.zoom = options.zoom;
|
|
392
406
|
}
|
|
393
407
|
async applyZoom(zoom) {
|
|
394
408
|
if (!this.mediaStream)
|
|
@@ -408,6 +422,7 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
408
422
|
async setFocusPoint(options) {
|
|
409
423
|
if (!this.mediaStream)
|
|
410
424
|
throw new Error("Preview not started");
|
|
425
|
+
this.assertNormalizedPoint(options, "focus point");
|
|
411
426
|
const track = this.mediaStream.getVideoTracks()[0];
|
|
412
427
|
if (!track)
|
|
413
428
|
throw new Error("No video track available");
|
|
@@ -433,6 +448,7 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
433
448
|
async setExposurePoint(options) {
|
|
434
449
|
if (!this.mediaStream)
|
|
435
450
|
throw new Error("Preview not started");
|
|
451
|
+
this.assertNormalizedPoint(options, "exposure point");
|
|
436
452
|
const track = this.mediaStream.getVideoTracks()[0];
|
|
437
453
|
if (!track)
|
|
438
454
|
throw new Error("No video track available");
|
|
@@ -455,6 +471,16 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
455
471
|
throw new Error(`Failed to set exposure point: ${e instanceof Error ? e.message : "unknown error"}`);
|
|
456
472
|
}
|
|
457
473
|
}
|
|
474
|
+
assertNormalizedPoint(options, name) {
|
|
475
|
+
if (!Number.isFinite(options?.x) ||
|
|
476
|
+
!Number.isFinite(options?.y) ||
|
|
477
|
+
options.x < 0 ||
|
|
478
|
+
options.x > 1 ||
|
|
479
|
+
options.y < 0 ||
|
|
480
|
+
options.y > 1) {
|
|
481
|
+
throw new Error(`${name} must use finite x/y values between 0 and 1`);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
458
484
|
async checkPermissions() {
|
|
459
485
|
let cameraStatus = "prompt";
|
|
460
486
|
let microphoneStatus = "prompt";
|
|
@@ -488,7 +514,7 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
488
514
|
let cameraStatus = "denied";
|
|
489
515
|
let microphoneStatus = "denied";
|
|
490
516
|
try {
|
|
491
|
-
const stream = await
|
|
517
|
+
const stream = await getMediaDevices().getUserMedia({
|
|
492
518
|
video: true,
|
|
493
519
|
audio: true,
|
|
494
520
|
});
|
|
@@ -500,7 +526,7 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
500
526
|
}
|
|
501
527
|
catch {
|
|
502
528
|
try {
|
|
503
|
-
const videoStream = await
|
|
529
|
+
const videoStream = await getMediaDevices().getUserMedia({
|
|
504
530
|
video: true,
|
|
505
531
|
});
|
|
506
532
|
videoStream.getTracks().forEach((track) => {
|
|
@@ -512,7 +538,7 @@ var capacitorElizaCamera = (function (exports, core) {
|
|
|
512
538
|
cameraStatus = "denied";
|
|
513
539
|
}
|
|
514
540
|
try {
|
|
515
|
-
const audioStream = await
|
|
541
|
+
const audioStream = await getMediaDevices().getUserMedia({
|
|
516
542
|
audio: true,
|
|
517
543
|
});
|
|
518
544
|
audioStream.getTracks().forEach((track) => {
|
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\";\nexport * from \"./definitions\";\nconst loadWeb = () => import(\"./web\").then((m) => new m.CameraWeb());\nexport const Camera = registerPlugin(\"ElizaCamera\", {\n web: loadWeb,\n});\n","import { WebPlugin } from \"@capacitor/core\";\nconst VIDEO_MIME_TYPES = [\n \"video/webm;codecs=vp9,opus\",\n \"video/webm;codecs=vp8,opus\",\n \"video/webm\",\n \"video/mp4\",\n];\nconst getSupportedMimeType = () => VIDEO_MIME_TYPES.find((m) => MediaRecorder.isTypeSupported(m)) ?? null;\nexport class CameraWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.mediaStream = null;\n this.videoElement = null;\n this.previewElement = null;\n this.currentDeviceId = null;\n this.mediaRecorder = null;\n this.recordedChunks = [];\n this.recordingStartTime = 0;\n this.recordingStateInterval = null;\n this.isRecording = false;\n this.currentSettings = {\n flash: \"off\",\n zoom: 1,\n focusMode: \"continuous\",\n exposureMode: \"continuous\",\n exposureCompensation: 0,\n whiteBalance: \"auto\",\n };\n this.pluginListeners = [];\n }\n async getDevices() {\n // enumerateDevices() returns device stubs without labels unless the user\n // has already granted camera permission via a prior getUserMedia() call.\n // We intentionally do NOT call getUserMedia() here because it requires a\n // user gesture and would throw NotAllowedError if called programmatically.\n const allDevices = await navigator.mediaDevices.enumerateDevices();\n const videoDevices = allDevices.filter((d) => d.kind === \"videoinput\");\n const devices = await Promise.all(videoDevices.map(async (device, index) => {\n const capabilities = await this.getDeviceCapabilities(device.deviceId);\n return {\n deviceId: device.deviceId,\n label: device.label || `Camera ${index + 1}`,\n direction: this.inferDirection(device.label),\n // Flash detection not available via MediaDevices API on web\n hasFlash: capabilities?.hasFlash ?? false,\n hasZoom: !!capabilities?.zoom,\n maxZoom: capabilities?.zoom?.max ?? 1,\n // Return actual capabilities or empty array to indicate unknown\n supportedResolutions: capabilities?.resolutions ?? [],\n supportedFrameRates: capabilities?.frameRates ?? [],\n };\n }));\n return { devices };\n }\n inferDirection(label) {\n const lowerLabel = label.toLowerCase();\n if (lowerLabel.includes(\"front\") ||\n lowerLabel.includes(\"facetime\") ||\n lowerLabel.includes(\"user\")) {\n return \"front\";\n }\n if (lowerLabel.includes(\"back\") ||\n lowerLabel.includes(\"rear\") ||\n lowerLabel.includes(\"environment\")) {\n return \"back\";\n }\n return \"external\";\n }\n async getDeviceCapabilities(deviceId) {\n let stream;\n try {\n stream = await navigator.mediaDevices.getUserMedia({\n video: { deviceId: { exact: deviceId } },\n });\n }\n catch {\n return null; // Device not accessible\n }\n const track = stream.getVideoTracks()[0];\n if (!track) {\n stream.getTracks().forEach((t) => {\n t.stop();\n });\n return null;\n }\n const capabilities = track.getCapabilities ? track.getCapabilities() : {};\n stream.getTracks().forEach((t) => {\n t.stop();\n });\n const caps = capabilities;\n // Build resolutions from actual device capabilities only\n const resolutions = [];\n if (caps.width?.max && caps.height?.max) {\n resolutions.push({ width: caps.width.max, height: caps.height.max });\n // Add common lower resolutions only if device supports them\n if (caps.width.max >= 1280 && caps.height.max >= 720) {\n resolutions.push({ width: 1280, height: 720 });\n }\n if (caps.width.max >= 640 && caps.height.max >= 480) {\n resolutions.push({ width: 640, height: 480 });\n }\n }\n // Build frameRates from actual device capabilities only\n const frameRates = [];\n if (caps.frameRate?.max) {\n if (caps.frameRate.max >= 60)\n frameRates.push(60);\n if (caps.frameRate.max >= 30)\n frameRates.push(30);\n if (caps.frameRate.max >= 24)\n frameRates.push(24);\n if (caps.frameRate.max >= 15)\n frameRates.push(15);\n }\n return {\n zoom: caps.zoom,\n resolutions: resolutions.length > 0 ? resolutions : undefined,\n frameRates: frameRates.length > 0 ? frameRates : undefined,\n hasFlash: caps.torch === true, // Torch capability indicates flash support\n };\n }\n async startPreview(options) {\n await this.stopPreview();\n const constraints = {\n video: {\n deviceId: options.deviceId ? { exact: options.deviceId } : undefined,\n facingMode: options.direction === \"front\"\n ? \"user\"\n : options.direction === \"back\"\n ? \"environment\"\n : undefined,\n width: options.resolution?.width\n ? { ideal: options.resolution.width }\n : { ideal: 1920 },\n height: options.resolution?.height\n ? { ideal: options.resolution.height }\n : { ideal: 1080 },\n frameRate: options.frameRate\n ? { ideal: options.frameRate }\n : { ideal: 30 },\n },\n audio: false,\n };\n // PERMISSIONS_MIGRATION: this getUserMedia() call triggers the OS\n // camera-permission dialog implicitly. New flow probes via\n // `cameraProber` from\n // `packages/agent/src/services/permissions/probers/camera.ts` first,\n // then asks the user, only then opens the stream. Will be retired by\n // the chat-surface migration agent.\n this.mediaStream = await navigator.mediaDevices.getUserMedia(constraints);\n this.previewElement = options.element;\n this.videoElement = document.createElement(\"video\");\n this.videoElement.srcObject = this.mediaStream;\n this.videoElement.autoplay = true;\n this.videoElement.playsInline = true;\n this.videoElement.muted = true;\n this.videoElement.style.width = \"100%\";\n this.videoElement.style.height = \"100%\";\n this.videoElement.style.objectFit = \"cover\";\n if (options.mirror) {\n this.videoElement.style.transform = \"scaleX(-1)\";\n }\n this.previewElement.appendChild(this.videoElement);\n await this.videoElement.play();\n const track = this.mediaStream.getVideoTracks()[0];\n const settings = track.getSettings();\n this.currentDeviceId = settings.deviceId || options.deviceId || \"\";\n return {\n width: settings.width || options.resolution?.width || 1920,\n height: settings.height || options.resolution?.height || 1080,\n deviceId: this.currentDeviceId,\n };\n }\n async stopPreview() {\n if (this.isRecording) {\n await this.stopRecording();\n }\n if (this.mediaStream) {\n this.mediaStream.getTracks().forEach((track) => {\n track.stop();\n });\n this.mediaStream = null;\n }\n if (this.videoElement && this.previewElement) {\n this.previewElement.removeChild(this.videoElement);\n this.videoElement = null;\n }\n this.previewElement = null;\n this.currentDeviceId = null;\n }\n async switchCamera(options) {\n if (!this.previewElement) {\n throw new Error(\"Preview not started\");\n }\n const mirror = options.direction === \"front\";\n return this.startPreview({\n element: this.previewElement,\n deviceId: options.deviceId,\n direction: options.direction,\n mirror,\n });\n }\n async capturePhoto(options) {\n if (!this.videoElement || !this.mediaStream) {\n throw new Error(\"Preview not started\");\n }\n const track = this.mediaStream.getVideoTracks()[0];\n const settings = track.getSettings();\n const videoWidth = settings.width || this.videoElement.videoWidth;\n const videoHeight = settings.height || this.videoElement.videoHeight;\n const targetWidth = options?.width || videoWidth;\n const targetHeight = options?.height || videoHeight;\n const canvas = document.createElement(\"canvas\");\n canvas.width = targetWidth;\n canvas.height = targetHeight;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) {\n throw new Error(\"Failed to get canvas context\");\n }\n const scaleX = targetWidth / videoWidth;\n const scaleY = targetHeight / videoHeight;\n const scale = Math.max(scaleX, scaleY);\n const drawWidth = videoWidth * scale;\n const drawHeight = videoHeight * scale;\n const drawX = (targetWidth - drawWidth) / 2;\n const drawY = (targetHeight - drawHeight) / 2;\n ctx.drawImage(this.videoElement, drawX, drawY, drawWidth, drawHeight);\n const quality = (options?.quality ?? 90) / 100;\n const format = options?.format || \"jpeg\";\n const mimeType = format === \"png\"\n ? \"image/png\"\n : format === \"webp\"\n ? \"image/webp\"\n : \"image/jpeg\";\n const base64 = canvas.toDataURL(mimeType, quality).split(\",\")[1];\n return {\n base64,\n format,\n width: targetWidth,\n height: targetHeight,\n };\n }\n async startRecording(options) {\n if (!this.mediaStream) {\n throw new Error(\"Preview not started\");\n }\n if (this.isRecording) {\n throw new Error(\"Recording already in progress\");\n }\n let streamToRecord = this.mediaStream;\n if (options?.audio !== false) {\n const audioStream = await navigator.mediaDevices.getUserMedia({\n audio: true,\n });\n streamToRecord = new MediaStream([\n ...this.mediaStream.getVideoTracks(),\n ...audioStream.getAudioTracks(),\n ]);\n }\n const mimeType = getSupportedMimeType();\n if (!mimeType)\n throw new Error(\"No supported video mime type found\");\n const recorderOptions = { mimeType };\n if (options?.bitrate)\n recorderOptions.videoBitsPerSecond = options.bitrate;\n this.recordedChunks = [];\n this.mediaRecorder = new MediaRecorder(streamToRecord, recorderOptions);\n this.mediaRecorder.ondataavailable = (event) => {\n if (event.data.size > 0) {\n this.recordedChunks.push(event.data);\n }\n };\n this.mediaRecorder.onerror = (event) => {\n this.notifyListeners(\"error\", {\n code: \"RECORDING_ERROR\",\n message: `Recording error: ${event.message || \"Unknown error\"}`,\n });\n };\n this.recordingStartTime = Date.now();\n this.isRecording = true;\n this.mediaRecorder.start(1000);\n this.notifyListeners(\"recordingState\", {\n isRecording: true,\n duration: 0,\n fileSize: 0,\n });\n let autoStopping = false;\n this.recordingStateInterval = setInterval(() => {\n if (!this.isRecording || autoStopping)\n return;\n const duration = (Date.now() - this.recordingStartTime) / 1000;\n const fileSize = this.recordedChunks.reduce((acc, chunk) => acc + chunk.size, 0);\n this.notifyListeners(\"recordingState\", {\n isRecording: true,\n duration,\n fileSize,\n });\n const overLimit = (options?.maxDuration && duration >= options.maxDuration) ||\n (options?.maxFileSize && fileSize >= options.maxFileSize);\n if (overLimit) {\n autoStopping = true;\n this.stopRecording().catch((err) => {\n console.error(\"[Camera] Auto-stop recording failed:\", err);\n });\n }\n }, 500);\n }\n async stopRecording() {\n if (!this.isRecording || !this.mediaRecorder) {\n throw new Error(\"Not recording\");\n }\n return new Promise((resolve, reject) => {\n if (!this.mediaRecorder) {\n reject(new Error(\"MediaRecorder not initialized\"));\n return;\n }\n const duration = (Date.now() - this.recordingStartTime) / 1000;\n this.mediaRecorder.onstop = () => {\n if (this.recordingStateInterval) {\n clearInterval(this.recordingStateInterval);\n this.recordingStateInterval = null;\n }\n this.isRecording = false;\n const blob = new Blob(this.recordedChunks, {\n type: this.mediaRecorder?.mimeType || \"video/webm\",\n });\n const url = URL.createObjectURL(blob);\n const video = document.createElement(\"video\");\n video.src = url;\n video.onloadedmetadata = () => {\n resolve({\n path: url,\n duration,\n width: video.videoWidth,\n height: video.videoHeight,\n fileSize: blob.size,\n mimeType: this.mediaRecorder?.mimeType || \"video/webm\",\n });\n };\n video.onerror = () => {\n resolve({\n path: url,\n duration,\n width: 0,\n height: 0,\n fileSize: blob.size,\n mimeType: this.mediaRecorder?.mimeType || \"video/webm\",\n });\n };\n this.notifyListeners(\"recordingState\", {\n isRecording: false,\n duration,\n fileSize: blob.size,\n });\n };\n this.mediaRecorder.stop();\n });\n }\n async getRecordingState() {\n const duration = this.isRecording\n ? (Date.now() - this.recordingStartTime) / 1000\n : 0;\n const fileSize = this.recordedChunks.reduce((acc, chunk) => acc + chunk.size, 0);\n return {\n isRecording: this.isRecording,\n duration,\n fileSize,\n };\n }\n async getSettings() {\n return { settings: { ...this.currentSettings } };\n }\n async setSettings(options) {\n this.currentSettings = { ...this.currentSettings, ...options.settings };\n if (this.mediaStream && options.settings.zoom !== undefined) {\n await this.applyZoom(options.settings.zoom);\n }\n }\n async setZoom(options) {\n if (!Number.isFinite(options.zoom) || options.zoom < 0) {\n throw new Error(`Invalid zoom value: ${options.zoom}. Must be a non-negative finite number.`);\n }\n await this.applyZoom(options.zoom);\n this.currentSettings.zoom = options.zoom;\n }\n async applyZoom(zoom) {\n if (!this.mediaStream)\n return;\n const track = this.mediaStream.getVideoTracks()[0];\n if (!track)\n return;\n const capabilities = track.getCapabilities ? track.getCapabilities() : {};\n const caps = capabilities;\n if (caps.zoom) {\n const clampedZoom = Math.max(caps.zoom.min, Math.min(caps.zoom.max, zoom));\n await track.applyConstraints({\n advanced: [{ zoom: clampedZoom }],\n });\n }\n }\n async setFocusPoint(options) {\n if (!this.mediaStream)\n throw new Error(\"Preview not started\");\n const track = this.mediaStream.getVideoTracks()[0];\n if (!track)\n throw new Error(\"No video track available\");\n // Check if focus control is supported\n const caps = track.getCapabilities ? track.getCapabilities() : {};\n if (!caps.focusMode?.includes(\"manual\")) {\n throw new Error(\"Manual focus not supported by this camera\");\n }\n try {\n await track.applyConstraints({\n advanced: [\n {\n focusMode: \"manual\",\n pointsOfInterest: [{ x: options.x, y: options.y }],\n },\n ],\n });\n }\n catch (e) {\n throw new Error(`Failed to set focus point: ${e instanceof Error ? e.message : \"unknown error\"}`);\n }\n }\n async setExposurePoint(options) {\n if (!this.mediaStream)\n throw new Error(\"Preview not started\");\n const track = this.mediaStream.getVideoTracks()[0];\n if (!track)\n throw new Error(\"No video track available\");\n // Check if exposure control is supported\n const caps = track.getCapabilities ? track.getCapabilities() : {};\n if (!caps.exposureMode?.includes(\"manual\")) {\n throw new Error(\"Manual exposure not supported by this camera\");\n }\n try {\n await track.applyConstraints({\n advanced: [\n {\n exposureMode: \"manual\",\n pointsOfInterest: [{ x: options.x, y: options.y }],\n },\n ],\n });\n }\n catch (e) {\n throw new Error(`Failed to set exposure point: ${e instanceof Error ? e.message : \"unknown error\"}`);\n }\n }\n async checkPermissions() {\n let cameraStatus = \"prompt\";\n let microphoneStatus = \"prompt\";\n try {\n const cameraResult = await navigator.permissions.query({\n name: \"camera\",\n });\n cameraStatus = cameraResult.state;\n }\n catch (err) {\n console.debug(\"[Camera] permissions.query('camera') not supported:\", err);\n }\n try {\n const micResult = await navigator.permissions.query({\n name: \"microphone\",\n });\n microphoneStatus = micResult.state;\n }\n catch (err) {\n console.debug(\"[Camera] permissions.query('microphone') not supported:\", err);\n }\n // Note: Web platform doesn't have a \"photos\" permission concept.\n // Photos are captured from camera stream, so camera permission covers this.\n return {\n camera: cameraStatus,\n microphone: microphoneStatus,\n photos: cameraStatus, // Photos access follows camera permission on web\n };\n }\n async requestPermissions() {\n let cameraStatus = \"denied\";\n let microphoneStatus = \"denied\";\n try {\n const stream = await navigator.mediaDevices.getUserMedia({\n video: true,\n audio: true,\n });\n stream.getTracks().forEach((track) => {\n track.stop();\n });\n cameraStatus = \"granted\";\n microphoneStatus = \"granted\";\n }\n catch {\n try {\n const videoStream = await navigator.mediaDevices.getUserMedia({\n video: true,\n });\n videoStream.getTracks().forEach((track) => {\n track.stop();\n });\n cameraStatus = \"granted\";\n }\n catch {\n cameraStatus = \"denied\";\n }\n try {\n const audioStream = await navigator.mediaDevices.getUserMedia({\n audio: true,\n });\n audioStream.getTracks().forEach((track) => {\n track.stop();\n });\n microphoneStatus = \"granted\";\n }\n catch {\n microphoneStatus = \"denied\";\n }\n }\n return {\n camera: cameraStatus,\n microphone: microphoneStatus,\n photos: cameraStatus, // Photos access follows camera permission on web\n };\n }\n async addListener(eventName, listenerFunc) {\n const entry = { eventName, callback: listenerFunc };\n this.pluginListeners.push(entry);\n return {\n remove: async () => {\n const i = this.pluginListeners.indexOf(entry);\n if (i >= 0)\n this.pluginListeners.splice(i, 1);\n },\n };\n }\n async removeAllListeners() {\n this.pluginListeners = [];\n }\n notifyListeners(eventName, data) {\n this.pluginListeners\n .filter((l) => l.eventName === eventName)\n .forEach((l) => {\n l.callback(data);\n });\n }\n}\n"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAEA,MAAM,OAAO,GAAG,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE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AChC,SAAS;IACT,IAAI;IACJ,IAAI,MAAM,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE;IAC/C,QAAQ,MAAM,KAAK,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE;IAC3D,QAAQ,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;IACxC,QAAQ,OAAO;IACf,YAAY,MAAM,EAAE,YAAY;IAChC,gBAAgB,MAAM,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC;IAC7D,gBAAgB,IAAI,CAAC,IAAI,CAAC;IAC1B,oBAAoB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IACrD,YAAY,CAAC;IACb,SAAS;IACT,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,IAAI,CAAC,eAAe,GAAG,EAAE;IACjC,IAAI;IACJ,IAAI,eAAe,CAAC,SAAS,EAAE,IAAI,EAAE;IACrC,QAAQ,IAAI,CAAC;IACb,aAAa,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,KAAK,SAAS;IACpD,aAAa,OAAO,CAAC,CAAC,CAAC,KAAK;IAC5B,YAAY,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5B,QAAQ,CAAC,CAAC;IACV,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nexport * from \"./definitions\";\nconst loadWeb = () => import(\"./web\").then((m) => new m.CameraWeb());\nexport const Camera = registerPlugin(\"ElizaCamera\", {\n web: loadWeb,\n});\n","import { WebPlugin } from \"@capacitor/core\";\nconst VIDEO_MIME_TYPES = [\n \"video/webm;codecs=vp9,opus\",\n \"video/webm;codecs=vp8,opus\",\n \"video/webm\",\n \"video/mp4\",\n];\nconst getSupportedMimeType = () => VIDEO_MIME_TYPES.find((m) => MediaRecorder.isTypeSupported(m)) ?? null;\nconst getMediaDevices = () => {\n if (!navigator.mediaDevices?.getUserMedia) {\n throw new Error(\"Camera media devices API is not available\");\n }\n return navigator.mediaDevices;\n};\nconst assertPositiveFinite = (value, name) => {\n if (!Number.isFinite(value) || value <= 0) {\n throw new Error(`${name} must be a positive finite number`);\n }\n};\nconst assertRecordingOptions = (options) => {\n if (!options)\n return;\n if (options.quality !== undefined &&\n ![\"low\", \"medium\", \"high\", \"highest\"].includes(options.quality)) {\n throw new Error(\"quality must be one of low, medium, high, or highest\");\n }\n if (options.maxDuration !== undefined) {\n assertPositiveFinite(options.maxDuration, \"maxDuration\");\n }\n if (options.maxFileSize !== undefined) {\n assertPositiveFinite(options.maxFileSize, \"maxFileSize\");\n }\n if (options.bitrate !== undefined) {\n assertPositiveFinite(options.bitrate, \"bitrate\");\n }\n if (options.frameRate !== undefined) {\n assertPositiveFinite(options.frameRate, \"frameRate\");\n }\n};\nexport class CameraWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.mediaStream = null;\n this.videoElement = null;\n this.previewElement = null;\n this.currentDeviceId = null;\n this.mediaRecorder = null;\n this.recordedChunks = [];\n this.recordingStartTime = 0;\n this.recordingStateInterval = null;\n this.isRecording = false;\n this.currentSettings = {\n flash: \"off\",\n zoom: 1,\n focusMode: \"continuous\",\n exposureMode: \"continuous\",\n exposureCompensation: 0,\n whiteBalance: \"auto\",\n };\n this.pluginListeners = [];\n }\n async getDevices() {\n // enumerateDevices() returns unlabeled device records unless the user has\n // already granted camera permission via a prior getUserMedia() call.\n // We intentionally do NOT call getUserMedia() here because it requires a\n // user gesture and would throw NotAllowedError if called programmatically.\n const mediaDevices = getMediaDevices();\n if (!mediaDevices.enumerateDevices) {\n throw new Error(\"Camera device enumeration is not available\");\n }\n const allDevices = await mediaDevices.enumerateDevices();\n const videoDevices = allDevices.filter((d) => d.kind === \"videoinput\");\n const devices = await Promise.all(videoDevices.map(async (device, index) => ({\n deviceId: device.deviceId,\n label: device.label || `Camera ${index + 1}`,\n direction: this.inferDirection(device.label),\n // Capability probing requires getUserMedia(), which can prompt for\n // camera permission. Enumeration stays prompt-free and reports\n // unknown capabilities until preview/capture has explicit access.\n hasFlash: false,\n hasZoom: false,\n maxZoom: 1,\n supportedResolutions: [],\n supportedFrameRates: [],\n })));\n return { devices };\n }\n inferDirection(label) {\n const lowerLabel = label.toLowerCase();\n if (lowerLabel.includes(\"front\") ||\n lowerLabel.includes(\"facetime\") ||\n lowerLabel.includes(\"user\")) {\n return \"front\";\n }\n if (lowerLabel.includes(\"back\") ||\n lowerLabel.includes(\"rear\") ||\n lowerLabel.includes(\"environment\")) {\n return \"back\";\n }\n return \"external\";\n }\n async startPreview(options) {\n if (!options?.element?.appendChild) {\n throw new Error(\"Preview element is required\");\n }\n if (options.resolution) {\n assertPositiveFinite(options.resolution.width, \"resolution.width\");\n assertPositiveFinite(options.resolution.height, \"resolution.height\");\n }\n if (options.frameRate !== undefined) {\n assertPositiveFinite(options.frameRate, \"frameRate\");\n }\n await this.stopPreview();\n const constraints = {\n video: {\n deviceId: options.deviceId ? { exact: options.deviceId } : undefined,\n facingMode: options.direction === \"front\"\n ? \"user\"\n : options.direction === \"back\"\n ? \"environment\"\n : undefined,\n width: options.resolution?.width\n ? { ideal: options.resolution.width }\n : { ideal: 1920 },\n height: options.resolution?.height\n ? { ideal: options.resolution.height }\n : { ideal: 1080 },\n frameRate: options.frameRate\n ? { ideal: options.frameRate }\n : { ideal: 30 },\n },\n audio: false,\n };\n // Browser camera permission is requested by opening the stream. Native\n // permission probing is handled outside this Capacitor web fallback.\n this.mediaStream = await getMediaDevices().getUserMedia(constraints);\n this.previewElement = options.element;\n this.videoElement = document.createElement(\"video\");\n this.videoElement.srcObject = this.mediaStream;\n this.videoElement.autoplay = true;\n this.videoElement.playsInline = true;\n this.videoElement.muted = true;\n this.videoElement.style.width = \"100%\";\n this.videoElement.style.height = \"100%\";\n this.videoElement.style.objectFit = \"cover\";\n if (options.mirror) {\n this.videoElement.style.transform = \"scaleX(-1)\";\n }\n this.previewElement.appendChild(this.videoElement);\n await this.videoElement.play();\n const track = this.mediaStream.getVideoTracks()[0];\n const settings = track.getSettings();\n this.currentDeviceId = settings.deviceId || options.deviceId || \"\";\n return {\n width: settings.width || options.resolution?.width || 1920,\n height: settings.height || options.resolution?.height || 1080,\n deviceId: this.currentDeviceId,\n };\n }\n async stopPreview() {\n if (this.isRecording) {\n await this.stopRecording();\n }\n if (this.mediaStream) {\n this.mediaStream.getTracks().forEach((track) => {\n track.stop();\n });\n this.mediaStream = null;\n }\n if (this.videoElement) {\n if (this.previewElement?.contains(this.videoElement)) {\n this.previewElement.removeChild(this.videoElement);\n }\n this.videoElement = null;\n }\n this.previewElement = null;\n this.currentDeviceId = null;\n }\n async switchCamera(options) {\n if (!this.previewElement) {\n throw new Error(\"Preview not started\");\n }\n const mirror = options.direction === \"front\";\n return this.startPreview({\n element: this.previewElement,\n deviceId: options.deviceId,\n direction: options.direction,\n mirror,\n });\n }\n async capturePhoto(options) {\n if (!this.videoElement || !this.mediaStream) {\n throw new Error(\"Preview not started\");\n }\n const track = this.mediaStream.getVideoTracks()[0];\n const settings = track.getSettings();\n const videoWidth = settings.width || this.videoElement.videoWidth;\n const videoHeight = settings.height || this.videoElement.videoHeight;\n assertPositiveFinite(videoWidth, \"videoWidth\");\n assertPositiveFinite(videoHeight, \"videoHeight\");\n const targetWidth = options?.width || videoWidth;\n const targetHeight = options?.height || videoHeight;\n assertPositiveFinite(targetWidth, \"width\");\n assertPositiveFinite(targetHeight, \"height\");\n if (options?.quality !== undefined &&\n (!Number.isFinite(options.quality) ||\n options.quality < 0 ||\n options.quality > 100)) {\n throw new Error(\"quality must be a finite number between 0 and 100\");\n }\n const canvas = document.createElement(\"canvas\");\n canvas.width = targetWidth;\n canvas.height = targetHeight;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) {\n throw new Error(\"Failed to get canvas context\");\n }\n const scaleX = targetWidth / videoWidth;\n const scaleY = targetHeight / videoHeight;\n const scale = Math.max(scaleX, scaleY);\n const drawWidth = videoWidth * scale;\n const drawHeight = videoHeight * scale;\n const drawX = (targetWidth - drawWidth) / 2;\n const drawY = (targetHeight - drawHeight) / 2;\n ctx.drawImage(this.videoElement, drawX, drawY, drawWidth, drawHeight);\n const quality = (options?.quality ?? 90) / 100;\n const format = options?.format || \"jpeg\";\n const mimeType = format === \"png\"\n ? \"image/png\"\n : format === \"webp\"\n ? \"image/webp\"\n : \"image/jpeg\";\n const dataUrl = canvas.toDataURL(mimeType, quality);\n const base64 = dataUrl.split(\",\")[1];\n if (!base64) {\n throw new Error(\"Failed to encode captured photo\");\n }\n return {\n base64,\n format,\n width: targetWidth,\n height: targetHeight,\n };\n }\n async startRecording(options) {\n if (!this.mediaStream) {\n throw new Error(\"Preview not started\");\n }\n if (this.isRecording) {\n throw new Error(\"Recording already in progress\");\n }\n assertRecordingOptions(options);\n let streamToRecord = this.mediaStream;\n if (options?.audio !== false) {\n const audioStream = await getMediaDevices().getUserMedia({\n audio: true,\n });\n streamToRecord = new MediaStream([\n ...this.mediaStream.getVideoTracks(),\n ...audioStream.getAudioTracks(),\n ]);\n }\n const mimeType = getSupportedMimeType();\n if (!mimeType)\n throw new Error(\"No supported video mime type found\");\n const recorderOptions = { mimeType };\n if (options?.bitrate)\n recorderOptions.videoBitsPerSecond = options.bitrate;\n this.recordedChunks = [];\n this.mediaRecorder = new MediaRecorder(streamToRecord, recorderOptions);\n this.mediaRecorder.ondataavailable = (event) => {\n if (event.data.size > 0) {\n this.recordedChunks.push(event.data);\n }\n };\n this.mediaRecorder.onerror = (event) => {\n this.notifyListeners(\"error\", {\n code: \"RECORDING_ERROR\",\n message: `Recording error: ${event.message || \"Unknown error\"}`,\n });\n };\n this.recordingStartTime = Date.now();\n this.isRecording = true;\n this.mediaRecorder.start(1000);\n this.notifyListeners(\"recordingState\", {\n isRecording: true,\n duration: 0,\n fileSize: 0,\n });\n let autoStopping = false;\n this.recordingStateInterval = setInterval(() => {\n if (!this.isRecording || autoStopping)\n return;\n const duration = (Date.now() - this.recordingStartTime) / 1000;\n const fileSize = this.recordedChunks.reduce((acc, chunk) => acc + chunk.size, 0);\n this.notifyListeners(\"recordingState\", {\n isRecording: true,\n duration,\n fileSize,\n });\n const overLimit = (options?.maxDuration && duration >= options.maxDuration) ||\n (options?.maxFileSize && fileSize >= options.maxFileSize);\n if (overLimit) {\n autoStopping = true;\n this.stopRecording().catch((err) => {\n console.error(\"[Camera] Auto-stop recording failed:\", err);\n });\n }\n }, 500);\n }\n async stopRecording() {\n if (!this.isRecording || !this.mediaRecorder) {\n throw new Error(\"Not recording\");\n }\n return new Promise((resolve, reject) => {\n if (!this.mediaRecorder) {\n reject(new Error(\"MediaRecorder not initialized\"));\n return;\n }\n const duration = (Date.now() - this.recordingStartTime) / 1000;\n this.mediaRecorder.onstop = () => {\n if (this.recordingStateInterval) {\n clearInterval(this.recordingStateInterval);\n this.recordingStateInterval = null;\n }\n this.isRecording = false;\n const blob = new Blob(this.recordedChunks, {\n type: this.mediaRecorder?.mimeType || \"video/webm\",\n });\n const url = URL.createObjectURL(blob);\n const video = document.createElement(\"video\");\n video.src = url;\n video.onloadedmetadata = () => {\n resolve({\n path: url,\n duration,\n width: video.videoWidth,\n height: video.videoHeight,\n fileSize: blob.size,\n mimeType: this.mediaRecorder?.mimeType || \"video/webm\",\n });\n };\n video.onerror = () => {\n resolve({\n path: url,\n duration,\n width: 0,\n height: 0,\n fileSize: blob.size,\n mimeType: this.mediaRecorder?.mimeType || \"video/webm\",\n });\n };\n this.notifyListeners(\"recordingState\", {\n isRecording: false,\n duration,\n fileSize: blob.size,\n });\n };\n this.mediaRecorder.stop();\n });\n }\n async getRecordingState() {\n const duration = this.isRecording\n ? (Date.now() - this.recordingStartTime) / 1000\n : 0;\n const fileSize = this.recordedChunks.reduce((acc, chunk) => acc + chunk.size, 0);\n return {\n isRecording: this.isRecording,\n duration,\n fileSize,\n };\n }\n async getSettings() {\n return { settings: { ...this.currentSettings } };\n }\n async setSettings(options) {\n if (!options?.settings || typeof options.settings !== \"object\") {\n throw new Error(\"settings object is required\");\n }\n if (options.settings.zoom !== undefined) {\n const zoom = options.settings.zoom;\n this.assertValidZoom(zoom);\n }\n this.currentSettings = { ...this.currentSettings, ...options.settings };\n if (this.mediaStream && options.settings.zoom !== undefined) {\n await this.applyZoom(options.settings.zoom);\n }\n }\n async setZoom(options) {\n const zoom = options?.zoom;\n this.assertValidZoom(zoom);\n await this.applyZoom(zoom);\n this.currentSettings.zoom = zoom;\n }\n assertValidZoom(zoom) {\n if (typeof zoom !== \"number\" || !Number.isFinite(zoom) || zoom < 0) {\n throw new Error(`Invalid zoom value: ${zoom}. Must be a non-negative finite number.`);\n }\n }\n async applyZoom(zoom) {\n if (!this.mediaStream)\n return;\n const track = this.mediaStream.getVideoTracks()[0];\n if (!track)\n return;\n const capabilities = track.getCapabilities ? track.getCapabilities() : {};\n const caps = capabilities;\n if (caps.zoom) {\n const clampedZoom = Math.max(caps.zoom.min, Math.min(caps.zoom.max, zoom));\n await track.applyConstraints({\n advanced: [{ zoom: clampedZoom }],\n });\n }\n }\n async setFocusPoint(options) {\n if (!this.mediaStream)\n throw new Error(\"Preview not started\");\n this.assertNormalizedPoint(options, \"focus point\");\n const track = this.mediaStream.getVideoTracks()[0];\n if (!track)\n throw new Error(\"No video track available\");\n // Check if focus control is supported\n const caps = track.getCapabilities ? track.getCapabilities() : {};\n if (!caps.focusMode?.includes(\"manual\")) {\n throw new Error(\"Manual focus not supported by this camera\");\n }\n try {\n await track.applyConstraints({\n advanced: [\n {\n focusMode: \"manual\",\n pointsOfInterest: [{ x: options.x, y: options.y }],\n },\n ],\n });\n }\n catch (e) {\n throw new Error(`Failed to set focus point: ${e instanceof Error ? e.message : \"unknown error\"}`);\n }\n }\n async setExposurePoint(options) {\n if (!this.mediaStream)\n throw new Error(\"Preview not started\");\n this.assertNormalizedPoint(options, \"exposure point\");\n const track = this.mediaStream.getVideoTracks()[0];\n if (!track)\n throw new Error(\"No video track available\");\n // Check if exposure control is supported\n const caps = track.getCapabilities ? track.getCapabilities() : {};\n if (!caps.exposureMode?.includes(\"manual\")) {\n throw new Error(\"Manual exposure not supported by this camera\");\n }\n try {\n await track.applyConstraints({\n advanced: [\n {\n exposureMode: \"manual\",\n pointsOfInterest: [{ x: options.x, y: options.y }],\n },\n ],\n });\n }\n catch (e) {\n throw new Error(`Failed to set exposure point: ${e instanceof Error ? e.message : \"unknown error\"}`);\n }\n }\n assertNormalizedPoint(options, name) {\n if (!Number.isFinite(options?.x) ||\n !Number.isFinite(options?.y) ||\n options.x < 0 ||\n options.x > 1 ||\n options.y < 0 ||\n options.y > 1) {\n throw new Error(`${name} must use finite x/y values between 0 and 1`);\n }\n }\n async checkPermissions() {\n let cameraStatus = \"prompt\";\n let microphoneStatus = \"prompt\";\n try {\n const cameraResult = await navigator.permissions.query({\n name: \"camera\",\n });\n cameraStatus = cameraResult.state;\n }\n catch (err) {\n console.debug(\"[Camera] permissions.query('camera') not supported:\", err);\n }\n try {\n const micResult = await navigator.permissions.query({\n name: \"microphone\",\n });\n microphoneStatus = micResult.state;\n }\n catch (err) {\n console.debug(\"[Camera] permissions.query('microphone') not supported:\", err);\n }\n // Note: Web platform doesn't have a \"photos\" permission concept.\n // Photos are captured from camera stream, so camera permission covers this.\n return {\n camera: cameraStatus,\n microphone: microphoneStatus,\n photos: cameraStatus, // Photos access follows camera permission on web\n };\n }\n async requestPermissions() {\n let cameraStatus = \"denied\";\n let microphoneStatus = \"denied\";\n try {\n const stream = await getMediaDevices().getUserMedia({\n video: true,\n audio: true,\n });\n stream.getTracks().forEach((track) => {\n track.stop();\n });\n cameraStatus = \"granted\";\n microphoneStatus = \"granted\";\n }\n catch {\n try {\n const videoStream = await getMediaDevices().getUserMedia({\n video: true,\n });\n videoStream.getTracks().forEach((track) => {\n track.stop();\n });\n cameraStatus = \"granted\";\n }\n catch {\n cameraStatus = \"denied\";\n }\n try {\n const audioStream = await getMediaDevices().getUserMedia({\n audio: true,\n });\n audioStream.getTracks().forEach((track) => {\n track.stop();\n });\n microphoneStatus = \"granted\";\n }\n catch {\n microphoneStatus = \"denied\";\n }\n }\n return {\n camera: cameraStatus,\n microphone: microphoneStatus,\n photos: cameraStatus, // Photos access follows camera permission on web\n };\n }\n async addListener(eventName, listenerFunc) {\n const entry = { eventName, callback: listenerFunc };\n this.pluginListeners.push(entry);\n return {\n remove: async () => {\n const i = this.pluginListeners.indexOf(entry);\n if (i >= 0)\n this.pluginListeners.splice(i, 1);\n },\n };\n }\n async removeAllListeners() {\n this.pluginListeners = [];\n }\n notifyListeners(eventName, data) {\n this.pluginListeners\n .filter((l) => l.eventName === eventName)\n .forEach((l) => {\n l.callback(data);\n });\n }\n}\n"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAEA,MAAM,OAAO,GAAG,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;AACxD,UAAC,MAAM,GAAGA,mBAAc,CAAC,aAAa,EAAE;IACpD,IAAI,GAAG,EAAE,OAAO;IAChB,CAAC;;ICJD,MAAM,gBAAgB,GAAG;IACzB,IAAI,4BAA4B;IAChC,IAAI,4BAA4B;IAChC,IAAI,YAAY;IAChB,IAAI,WAAW;IACf,CAAC;IACD,MAAM,oBAAoB,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI;IACzG,MAAM,eAAe,GAAG,MAAM;IAC9B,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,YAAY,EAAE;IAC/C,QAAQ,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC;IACpE,IAAI;IACJ,IAAI,OAAO,SAAS,CAAC,YAAY;IACjC,CAAC;IACD,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,I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J;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/capacitor-camera",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3-beta.2",
|
|
4
4
|
"description": "Captures photos, records video, and streams camera preview with manual controls.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camera",
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
16
|
"types": "./dist/esm/index.d.ts",
|
|
17
|
+
"bun": "./src/index.ts",
|
|
18
|
+
"development": "./src/index.ts",
|
|
17
19
|
"import": "./dist/esm/index.js",
|
|
18
20
|
"require": "./dist/plugin.cjs.js"
|
|
19
21
|
},
|
|
@@ -36,19 +38,20 @@
|
|
|
36
38
|
"url": "https://github.com/elizaOS/eliza"
|
|
37
39
|
},
|
|
38
40
|
"scripts": {
|
|
39
|
-
"build": "
|
|
40
|
-
"clean": "node
|
|
41
|
+
"build": "node ../../packages/scripts/with-package-build-lock.mjs plugins/plugin-native-camera -- bun run build:unlocked",
|
|
42
|
+
"clean": "node ../../packages/scripts/rm-path-recursive.mjs dist",
|
|
41
43
|
"prepublishOnly": "bun run build",
|
|
42
|
-
"
|
|
44
|
+
"test": "vitest run --config vitest.config.ts",
|
|
45
|
+
"watch": "tsc --watch",
|
|
46
|
+
"build:unlocked": "bun run clean && tsc && bunx rollup -c rollup.config.mjs"
|
|
43
47
|
},
|
|
44
48
|
"devDependencies": {
|
|
45
|
-
"@capacitor/android": "^8.0.0",
|
|
46
49
|
"@capacitor/core": "^8.3.1",
|
|
47
|
-
"@capacitor/ios": "^8.0.0",
|
|
48
50
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
49
|
-
"
|
|
51
|
+
"fast-check": "^4.8.0",
|
|
50
52
|
"rollup": "^4.60.2",
|
|
51
|
-
"typescript": "^6.0.3"
|
|
53
|
+
"typescript": "^6.0.3",
|
|
54
|
+
"vitest": "^4.0.18"
|
|
52
55
|
},
|
|
53
56
|
"peerDependencies": {
|
|
54
57
|
"@capacitor/core": "^8.3.1"
|
|
@@ -77,5 +80,6 @@
|
|
|
77
80
|
"ios": true,
|
|
78
81
|
"android": true
|
|
79
82
|
}
|
|
80
|
-
}
|
|
83
|
+
},
|
|
84
|
+
"gitHead": "82fe0f44215954c2417328203f5bd6510985c1fc"
|
|
81
85
|
}
|