capacitor-camera-view 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapacitorCameraView.podspec +17 -0
- package/LICENSE +201 -0
- package/Package.swift +28 -0
- package/README.md +654 -0
- package/android/build.gradle +79 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/michaelwolz/capacitorcameraview/CameraView.kt +555 -0
- package/android/src/main/java/com/michaelwolz/capacitorcameraview/CameraViewPlugin.kt +227 -0
- package/android/src/main/java/com/michaelwolz/capacitorcameraview/model/BarcodeDetectionResult.kt +11 -0
- package/android/src/main/java/com/michaelwolz/capacitorcameraview/model/CameraDevice.kt +14 -0
- package/android/src/main/java/com/michaelwolz/capacitorcameraview/model/CameraSessionConfiguration.kt +10 -0
- package/android/src/main/java/com/michaelwolz/capacitorcameraview/model/WebBoundingRect.kt +16 -0
- package/android/src/main/java/com/michaelwolz/capacitorcameraview/model/ZoomFactors.kt +14 -0
- package/android/src/main/java/com/michaelwolz/capacitorcameraview/utils.kt +86 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +968 -0
- package/dist/esm/definitions.d.ts +378 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/utils.d.ts +45 -0
- package/dist/esm/utils.js +108 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/esm/web.d.ts +108 -0
- package/dist/esm/web.js +406 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +530 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +533 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/CameraViewPlugin/CameraError.swift +39 -0
- package/ios/Sources/CameraViewPlugin/CameraSessionConfiguration.swift +32 -0
- package/ios/Sources/CameraViewPlugin/CameraViewManager+BarcodeScan.swift +91 -0
- package/ios/Sources/CameraViewPlugin/CameraViewManager+PhotoCapture.swift +52 -0
- package/ios/Sources/CameraViewPlugin/CameraViewManager+VideoDataOutput.swift +78 -0
- package/ios/Sources/CameraViewPlugin/CameraViewManager.swift +633 -0
- package/ios/Sources/CameraViewPlugin/CameraViewPlugin.swift +295 -0
- package/ios/Sources/CameraViewPlugin/Utils.swift +56 -0
- package/ios/Tests/CameraViewPluginTests/CameraViewPluginTests.swift +15 -0
- package/package.json +94 -0
package/dist/docs.json
ADDED
|
@@ -0,0 +1,968 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "CameraViewPlugin",
|
|
4
|
+
"slug": "cameraviewplugin",
|
|
5
|
+
"docs": "Main plugin interface for Capacitor Camera View functionality.",
|
|
6
|
+
"tags": [
|
|
7
|
+
{
|
|
8
|
+
"text": "1.0.0",
|
|
9
|
+
"name": "since"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"methods": [
|
|
13
|
+
{
|
|
14
|
+
"name": "start",
|
|
15
|
+
"signature": "(options?: CameraSessionConfiguration | undefined) => Promise<void>",
|
|
16
|
+
"parameters": [
|
|
17
|
+
{
|
|
18
|
+
"name": "options",
|
|
19
|
+
"docs": "- Configuration options for the camera session",
|
|
20
|
+
"type": "CameraSessionConfiguration | undefined"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"returns": "Promise<void>",
|
|
24
|
+
"tags": [
|
|
25
|
+
{
|
|
26
|
+
"name": "param",
|
|
27
|
+
"text": "options - Configuration options for the camera session"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "returns",
|
|
31
|
+
"text": "A promise that resolves when the camera has started"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "since",
|
|
35
|
+
"text": "1.0.0"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"docs": "Start the camera view with optional configuration.",
|
|
39
|
+
"complexTypes": [
|
|
40
|
+
"CameraSessionConfiguration"
|
|
41
|
+
],
|
|
42
|
+
"slug": "start"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "stop",
|
|
46
|
+
"signature": "() => Promise<void>",
|
|
47
|
+
"parameters": [],
|
|
48
|
+
"returns": "Promise<void>",
|
|
49
|
+
"tags": [
|
|
50
|
+
{
|
|
51
|
+
"name": "returns",
|
|
52
|
+
"text": "A promise that resolves when the camera has stopped"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "since",
|
|
56
|
+
"text": "1.0.0"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"docs": "Stop the camera view and release resources.",
|
|
60
|
+
"complexTypes": [],
|
|
61
|
+
"slug": "stop"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "isRunning",
|
|
65
|
+
"signature": "() => Promise<IsRunningResponse>",
|
|
66
|
+
"parameters": [],
|
|
67
|
+
"returns": "Promise<IsRunningResponse>",
|
|
68
|
+
"tags": [
|
|
69
|
+
{
|
|
70
|
+
"name": "returns",
|
|
71
|
+
"text": "A promise that resolves with an object containing the running state of the camera"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "since",
|
|
75
|
+
"text": "1.0.0"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"docs": "Check if the camera view is currently running.",
|
|
79
|
+
"complexTypes": [
|
|
80
|
+
"IsRunningResponse"
|
|
81
|
+
],
|
|
82
|
+
"slug": "isrunning"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "capture",
|
|
86
|
+
"signature": "(options: { quality: number; }) => Promise<CaptureResponse>",
|
|
87
|
+
"parameters": [
|
|
88
|
+
{
|
|
89
|
+
"name": "options",
|
|
90
|
+
"docs": "- Capture configuration options",
|
|
91
|
+
"type": "{ quality: number; }"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"returns": "Promise<CaptureResponse>",
|
|
95
|
+
"tags": [
|
|
96
|
+
{
|
|
97
|
+
"name": "param",
|
|
98
|
+
"text": "options - Capture configuration options"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "param",
|
|
102
|
+
"text": "options.quality - The JPEG quality of the captured photo on a scale of 0-100"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "returns",
|
|
106
|
+
"text": "A promise that resolves with an object containing a base64 encoded string of the captured photo"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "since",
|
|
110
|
+
"text": "1.0.0"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"docs": "Capture a photo using the current camera configuration.",
|
|
114
|
+
"complexTypes": [
|
|
115
|
+
"CaptureResponse"
|
|
116
|
+
],
|
|
117
|
+
"slug": "capture"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "captureSample",
|
|
121
|
+
"signature": "(options: { quality: number; }) => Promise<CaptureResponse>",
|
|
122
|
+
"parameters": [
|
|
123
|
+
{
|
|
124
|
+
"name": "options",
|
|
125
|
+
"docs": "- Capture configuration options",
|
|
126
|
+
"type": "{ quality: number; }"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"returns": "Promise<CaptureResponse>",
|
|
130
|
+
"tags": [
|
|
131
|
+
{
|
|
132
|
+
"name": "param",
|
|
133
|
+
"text": "options - Capture configuration options"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "param",
|
|
137
|
+
"text": "options.quality - The JPEG quality of the captured sample on a scale of 0-100"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "returns",
|
|
141
|
+
"text": "A promise that resolves with an object containing a base64 encoded string of the captured sample"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "since",
|
|
145
|
+
"text": "1.0.0"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"docs": "Captures a frame from the current camera preview without using the full camera capture pipeline.\n\nUnlike `capture()` which may trigger hardware-level photo capture on native platforms,\nthis method quickly samples the current video stream. This is suitable computer vision or\nsimple snapshots where high fidelity is not required.\n\nOn web this method does exactly the same as `capture()` as it only captures a frame from the video stream\nbecause unfortunately [ImageCapture API](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture) is\nnot yet well supported on the web.",
|
|
149
|
+
"complexTypes": [
|
|
150
|
+
"CaptureResponse"
|
|
151
|
+
],
|
|
152
|
+
"slug": "capturesample"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "flipCamera",
|
|
156
|
+
"signature": "() => Promise<void>",
|
|
157
|
+
"parameters": [],
|
|
158
|
+
"returns": "Promise<void>",
|
|
159
|
+
"tags": [
|
|
160
|
+
{
|
|
161
|
+
"name": "returns",
|
|
162
|
+
"text": "A promise that resolves when the camera has been flipped"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "since",
|
|
166
|
+
"text": "1.0.0"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"docs": "Switch between front and back camera.",
|
|
170
|
+
"complexTypes": [],
|
|
171
|
+
"slug": "flipcamera"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "getAvailableDevices",
|
|
175
|
+
"signature": "() => Promise<GetAvailableDevicesResponse>",
|
|
176
|
+
"parameters": [],
|
|
177
|
+
"returns": "Promise<GetAvailableDevicesResponse>",
|
|
178
|
+
"tags": [
|
|
179
|
+
{
|
|
180
|
+
"name": "returns",
|
|
181
|
+
"text": "A promise that resolves with an object containing an array of available capture devices"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "since",
|
|
185
|
+
"text": "1.0.0"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"docs": "Get available camera devices for capturing photos.",
|
|
189
|
+
"complexTypes": [
|
|
190
|
+
"GetAvailableDevicesResponse"
|
|
191
|
+
],
|
|
192
|
+
"slug": "getavailabledevices"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"name": "getZoom",
|
|
196
|
+
"signature": "() => Promise<GetZoomResponse>",
|
|
197
|
+
"parameters": [],
|
|
198
|
+
"returns": "Promise<GetZoomResponse>",
|
|
199
|
+
"tags": [
|
|
200
|
+
{
|
|
201
|
+
"name": "remarks",
|
|
202
|
+
"text": "Make sure the camera is properly initialized before calling this method. Otherwise, this might\nlead to returning default values on android."
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "returns",
|
|
206
|
+
"text": "A promise that resolves with an object containing min, max and current zoom levels"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "since",
|
|
210
|
+
"text": "1.0.0"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"docs": "Get current zoom level information and available range.",
|
|
214
|
+
"complexTypes": [
|
|
215
|
+
"GetZoomResponse"
|
|
216
|
+
],
|
|
217
|
+
"slug": "getzoom"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "setZoom",
|
|
221
|
+
"signature": "(options: { level: number; ramp?: boolean; }) => Promise<void>",
|
|
222
|
+
"parameters": [
|
|
223
|
+
{
|
|
224
|
+
"name": "options",
|
|
225
|
+
"docs": "- Zoom configuration options",
|
|
226
|
+
"type": "{ level: number; ramp?: boolean | undefined; }"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"returns": "Promise<void>",
|
|
230
|
+
"tags": [
|
|
231
|
+
{
|
|
232
|
+
"name": "param",
|
|
233
|
+
"text": "options - Zoom configuration options"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "param",
|
|
237
|
+
"text": "options.level - The zoom level to set"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "param",
|
|
241
|
+
"text": "options.ramp - Whether to animate the zoom level change, defaults to false (iOS only)"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "returns",
|
|
245
|
+
"text": "A promise that resolves when the zoom level has been set"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"name": "remarks",
|
|
249
|
+
"text": "On web platforms, zoom functionality may be limited by browser support.\nWhen native zoom is not available, a CSS-based zoom simulation is applied."
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "since",
|
|
253
|
+
"text": "1.0.0"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"docs": "Set the camera zoom level.",
|
|
257
|
+
"complexTypes": [],
|
|
258
|
+
"slug": "setzoom"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "getFlashMode",
|
|
262
|
+
"signature": "() => Promise<GetFlashModeResponse>",
|
|
263
|
+
"parameters": [],
|
|
264
|
+
"returns": "Promise<GetFlashModeResponse>",
|
|
265
|
+
"tags": [
|
|
266
|
+
{
|
|
267
|
+
"name": "returns",
|
|
268
|
+
"text": "A promise that resolves with an object containing the current flash mode"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "since",
|
|
272
|
+
"text": "1.0.0"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"docs": "Get current flash mode setting.",
|
|
276
|
+
"complexTypes": [
|
|
277
|
+
"GetFlashModeResponse"
|
|
278
|
+
],
|
|
279
|
+
"slug": "getflashmode"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "getSupportedFlashModes",
|
|
283
|
+
"signature": "() => Promise<GetSupportedFlashModesResponse>",
|
|
284
|
+
"parameters": [],
|
|
285
|
+
"returns": "Promise<GetSupportedFlashModesResponse>",
|
|
286
|
+
"tags": [
|
|
287
|
+
{
|
|
288
|
+
"name": "returns",
|
|
289
|
+
"text": "A promise that resolves with an object containing an array of supported flash modes"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "since",
|
|
293
|
+
"text": "1.0.0"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"docs": "Get supported flash modes for the current camera.",
|
|
297
|
+
"complexTypes": [
|
|
298
|
+
"GetSupportedFlashModesResponse"
|
|
299
|
+
],
|
|
300
|
+
"slug": "getsupportedflashmodes"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "setFlashMode",
|
|
304
|
+
"signature": "(options: { mode: FlashMode; }) => Promise<void>",
|
|
305
|
+
"parameters": [
|
|
306
|
+
{
|
|
307
|
+
"name": "options",
|
|
308
|
+
"docs": "- Flash mode configuration options",
|
|
309
|
+
"type": "{ mode: FlashMode; }"
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"returns": "Promise<void>",
|
|
313
|
+
"tags": [
|
|
314
|
+
{
|
|
315
|
+
"name": "param",
|
|
316
|
+
"text": "options - Flash mode configuration options"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "param",
|
|
320
|
+
"text": "options.mode - The flash mode to set"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"name": "returns",
|
|
324
|
+
"text": "A promise that resolves when the flash mode has been set"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "since",
|
|
328
|
+
"text": "1.0.0"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"docs": "Set the camera flash mode.",
|
|
332
|
+
"complexTypes": [
|
|
333
|
+
"FlashMode"
|
|
334
|
+
],
|
|
335
|
+
"slug": "setflashmode"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "checkPermissions",
|
|
339
|
+
"signature": "() => Promise<PermissionStatus>",
|
|
340
|
+
"parameters": [],
|
|
341
|
+
"returns": "Promise<PermissionStatus>",
|
|
342
|
+
"tags": [
|
|
343
|
+
{
|
|
344
|
+
"name": "returns",
|
|
345
|
+
"text": "A promise that resolves with an object containing the camera permission status"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "since",
|
|
349
|
+
"text": "1.0.0"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"docs": "Check camera permission status without requesting permissions.",
|
|
353
|
+
"complexTypes": [
|
|
354
|
+
"PermissionStatus"
|
|
355
|
+
],
|
|
356
|
+
"slug": "checkpermissions"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "requestPermissions",
|
|
360
|
+
"signature": "() => Promise<PermissionStatus>",
|
|
361
|
+
"parameters": [],
|
|
362
|
+
"returns": "Promise<PermissionStatus>",
|
|
363
|
+
"tags": [
|
|
364
|
+
{
|
|
365
|
+
"name": "returns",
|
|
366
|
+
"text": "A promise that resolves with an object containing the camera permission status"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "since",
|
|
370
|
+
"text": "1.0.0"
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"docs": "Request camera permission from the user.",
|
|
374
|
+
"complexTypes": [
|
|
375
|
+
"PermissionStatus"
|
|
376
|
+
],
|
|
377
|
+
"slug": "requestpermissions"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "addListener",
|
|
381
|
+
"signature": "(eventName: 'barcodeDetected', listenerFunc: (data: BarcodeDetectionData) => void) => Promise<PluginListenerHandle>",
|
|
382
|
+
"parameters": [
|
|
383
|
+
{
|
|
384
|
+
"name": "eventName",
|
|
385
|
+
"docs": "- The name of the event to listen for ('barcodeDetected')",
|
|
386
|
+
"type": "'barcodeDetected'"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "listenerFunc",
|
|
390
|
+
"docs": "- The callback function to execute when a barcode is detected",
|
|
391
|
+
"type": "(data: BarcodeDetectionData) => void"
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
"returns": "Promise<PluginListenerHandle>",
|
|
395
|
+
"tags": [
|
|
396
|
+
{
|
|
397
|
+
"name": "param",
|
|
398
|
+
"text": "eventName - The name of the event to listen for ('barcodeDetected')"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "param",
|
|
402
|
+
"text": "listenerFunc - The callback function to execute when a barcode is detected"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"name": "returns",
|
|
406
|
+
"text": "A promise that resolves with an event subscription"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"name": "since",
|
|
410
|
+
"text": "1.0.0"
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"docs": "Listen for barcode detection events.\nThis event is emitted when a barcode is detected in the camera preview.",
|
|
414
|
+
"complexTypes": [
|
|
415
|
+
"PluginListenerHandle",
|
|
416
|
+
"BarcodeDetectionData"
|
|
417
|
+
],
|
|
418
|
+
"slug": "addlistenerbarcodedetected-"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"name": "removeAllListeners",
|
|
422
|
+
"signature": "(eventName?: string | undefined) => Promise<void>",
|
|
423
|
+
"parameters": [
|
|
424
|
+
{
|
|
425
|
+
"name": "eventName",
|
|
426
|
+
"docs": "- Optional event name to remove listeners for",
|
|
427
|
+
"type": "string | undefined"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"returns": "Promise<void>",
|
|
431
|
+
"tags": [
|
|
432
|
+
{
|
|
433
|
+
"name": "param",
|
|
434
|
+
"text": "eventName - Optional event name to remove listeners for"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "returns",
|
|
438
|
+
"text": "A promise that resolves when the listeners are removed"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "since",
|
|
442
|
+
"text": "1.0.0"
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"docs": "Remove all listeners for this plugin.",
|
|
446
|
+
"complexTypes": [],
|
|
447
|
+
"slug": "removealllisteners"
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"properties": []
|
|
451
|
+
},
|
|
452
|
+
"interfaces": [
|
|
453
|
+
{
|
|
454
|
+
"name": "CameraSessionConfiguration",
|
|
455
|
+
"slug": "camerasessionconfiguration",
|
|
456
|
+
"docs": "Configuration options for starting a camera session.",
|
|
457
|
+
"tags": [
|
|
458
|
+
{
|
|
459
|
+
"text": "1.0.0",
|
|
460
|
+
"name": "since"
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"methods": [],
|
|
464
|
+
"properties": [
|
|
465
|
+
{
|
|
466
|
+
"name": "enableBarcodeDetection",
|
|
467
|
+
"tags": [
|
|
468
|
+
{
|
|
469
|
+
"text": "false",
|
|
470
|
+
"name": "default"
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"docs": "Enables the barcode detection functionality",
|
|
474
|
+
"complexTypes": [],
|
|
475
|
+
"type": "boolean | undefined"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"name": "position",
|
|
479
|
+
"tags": [
|
|
480
|
+
{
|
|
481
|
+
"text": "'back'",
|
|
482
|
+
"name": "default"
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
"docs": "Position of the camera to use",
|
|
486
|
+
"complexTypes": [
|
|
487
|
+
"CameraPosition"
|
|
488
|
+
],
|
|
489
|
+
"type": "CameraPosition"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"name": "deviceId",
|
|
493
|
+
"tags": [],
|
|
494
|
+
"docs": "Specific device ID of the camera to use\nIf provided, takes precedence over position",
|
|
495
|
+
"complexTypes": [],
|
|
496
|
+
"type": "string | undefined"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "useTripleCameraIfAvailable",
|
|
500
|
+
"tags": [
|
|
501
|
+
{
|
|
502
|
+
"text": "false",
|
|
503
|
+
"name": "default"
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
"docs": "Whether to use the triple camera if available (iPhone Pro models only)",
|
|
507
|
+
"complexTypes": [],
|
|
508
|
+
"type": "boolean | undefined"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "preferredCameraDeviceTypes",
|
|
512
|
+
"tags": [
|
|
513
|
+
{
|
|
514
|
+
"text": "[CameraDeviceType.WideAngle, CameraDeviceType.UltraWide, CameraDeviceType.Telephoto]",
|
|
515
|
+
"name": "example"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"text": "undefined - system will decide based on position/deviceId",
|
|
519
|
+
"name": "default"
|
|
520
|
+
}
|
|
521
|
+
],
|
|
522
|
+
"docs": "Ordered list of preferred camera device types to use (iOS only).\nThe system will attempt to use the first available camera type in the list.\nIf position is also provided, the system will use the first available camera type\nthat matches the position and is in the list.\n\nThis will fallback to the default camera type if none of the preferred types are available.",
|
|
523
|
+
"complexTypes": [
|
|
524
|
+
"CameraDeviceType"
|
|
525
|
+
],
|
|
526
|
+
"type": "CameraDeviceType[] | undefined"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "zoomFactor",
|
|
530
|
+
"tags": [
|
|
531
|
+
{
|
|
532
|
+
"text": "1.0",
|
|
533
|
+
"name": "default"
|
|
534
|
+
}
|
|
535
|
+
],
|
|
536
|
+
"docs": "The initial zoom factor to use",
|
|
537
|
+
"complexTypes": [],
|
|
538
|
+
"type": "number | undefined"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "containerElementId",
|
|
542
|
+
"tags": [
|
|
543
|
+
{
|
|
544
|
+
"text": "'cameraContainer'",
|
|
545
|
+
"name": "example"
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
"docs": "Optional HTML ID of the container element where the camera view should be rendered.\nIf not provided, the camera view will be appended to the document body. Web only.",
|
|
549
|
+
"complexTypes": [],
|
|
550
|
+
"type": "string | undefined"
|
|
551
|
+
}
|
|
552
|
+
]
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"name": "IsRunningResponse",
|
|
556
|
+
"slug": "isrunningresponse",
|
|
557
|
+
"docs": "Response for checking if the camera view is running.",
|
|
558
|
+
"tags": [
|
|
559
|
+
{
|
|
560
|
+
"text": "1.0.0",
|
|
561
|
+
"name": "since"
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
"methods": [],
|
|
565
|
+
"properties": [
|
|
566
|
+
{
|
|
567
|
+
"name": "isRunning",
|
|
568
|
+
"tags": [],
|
|
569
|
+
"docs": "Indicates if the camera view is currently active and running",
|
|
570
|
+
"complexTypes": [],
|
|
571
|
+
"type": "boolean"
|
|
572
|
+
}
|
|
573
|
+
]
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"name": "CaptureResponse",
|
|
577
|
+
"slug": "captureresponse",
|
|
578
|
+
"docs": "Response for capturing a photo.",
|
|
579
|
+
"tags": [
|
|
580
|
+
{
|
|
581
|
+
"text": "1.0.0",
|
|
582
|
+
"name": "since"
|
|
583
|
+
}
|
|
584
|
+
],
|
|
585
|
+
"methods": [],
|
|
586
|
+
"properties": [
|
|
587
|
+
{
|
|
588
|
+
"name": "photo",
|
|
589
|
+
"tags": [],
|
|
590
|
+
"docs": "The base64 encoded string of the captured photo",
|
|
591
|
+
"complexTypes": [],
|
|
592
|
+
"type": "string"
|
|
593
|
+
}
|
|
594
|
+
]
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "GetAvailableDevicesResponse",
|
|
598
|
+
"slug": "getavailabledevicesresponse",
|
|
599
|
+
"docs": "Response for getting available camera devices.",
|
|
600
|
+
"tags": [
|
|
601
|
+
{
|
|
602
|
+
"text": "1.0.0",
|
|
603
|
+
"name": "since"
|
|
604
|
+
}
|
|
605
|
+
],
|
|
606
|
+
"methods": [],
|
|
607
|
+
"properties": [
|
|
608
|
+
{
|
|
609
|
+
"name": "devices",
|
|
610
|
+
"tags": [],
|
|
611
|
+
"docs": "An array of available camera devices",
|
|
612
|
+
"complexTypes": [
|
|
613
|
+
"CameraDevice"
|
|
614
|
+
],
|
|
615
|
+
"type": "CameraDevice[]"
|
|
616
|
+
}
|
|
617
|
+
]
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"name": "CameraDevice",
|
|
621
|
+
"slug": "cameradevice",
|
|
622
|
+
"docs": "Represents a physical camera device on the device.",
|
|
623
|
+
"tags": [
|
|
624
|
+
{
|
|
625
|
+
"text": "1.0.0",
|
|
626
|
+
"name": "since"
|
|
627
|
+
}
|
|
628
|
+
],
|
|
629
|
+
"methods": [],
|
|
630
|
+
"properties": [
|
|
631
|
+
{
|
|
632
|
+
"name": "id",
|
|
633
|
+
"tags": [],
|
|
634
|
+
"docs": "The unique identifier of the camera device",
|
|
635
|
+
"complexTypes": [],
|
|
636
|
+
"type": "string"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "name",
|
|
640
|
+
"tags": [],
|
|
641
|
+
"docs": "The human-readable name of the camera device",
|
|
642
|
+
"complexTypes": [],
|
|
643
|
+
"type": "string"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"name": "position",
|
|
647
|
+
"tags": [],
|
|
648
|
+
"docs": "The position of the camera device (front or back)",
|
|
649
|
+
"complexTypes": [
|
|
650
|
+
"CameraPosition"
|
|
651
|
+
],
|
|
652
|
+
"type": "CameraPosition"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"name": "deviceType",
|
|
656
|
+
"tags": [],
|
|
657
|
+
"docs": "The type of the camera device (e.g., wide, ultra-wide, telephoto) - iOS only",
|
|
658
|
+
"complexTypes": [
|
|
659
|
+
"CameraDeviceType"
|
|
660
|
+
],
|
|
661
|
+
"type": "CameraDeviceType"
|
|
662
|
+
}
|
|
663
|
+
]
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"name": "GetZoomResponse",
|
|
667
|
+
"slug": "getzoomresponse",
|
|
668
|
+
"docs": "Response for getting zoom level information.",
|
|
669
|
+
"tags": [
|
|
670
|
+
{
|
|
671
|
+
"text": "1.0.0",
|
|
672
|
+
"name": "since"
|
|
673
|
+
}
|
|
674
|
+
],
|
|
675
|
+
"methods": [],
|
|
676
|
+
"properties": [
|
|
677
|
+
{
|
|
678
|
+
"name": "min",
|
|
679
|
+
"tags": [],
|
|
680
|
+
"docs": "The minimum zoom level supported",
|
|
681
|
+
"complexTypes": [],
|
|
682
|
+
"type": "number"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"name": "max",
|
|
686
|
+
"tags": [],
|
|
687
|
+
"docs": "The maximum zoom level supported",
|
|
688
|
+
"complexTypes": [],
|
|
689
|
+
"type": "number"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"name": "current",
|
|
693
|
+
"tags": [],
|
|
694
|
+
"docs": "The current zoom level",
|
|
695
|
+
"complexTypes": [],
|
|
696
|
+
"type": "number"
|
|
697
|
+
}
|
|
698
|
+
]
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"name": "GetFlashModeResponse",
|
|
702
|
+
"slug": "getflashmoderesponse",
|
|
703
|
+
"docs": "Response for getting the current flash mode.",
|
|
704
|
+
"tags": [
|
|
705
|
+
{
|
|
706
|
+
"text": "1.0.0",
|
|
707
|
+
"name": "since"
|
|
708
|
+
}
|
|
709
|
+
],
|
|
710
|
+
"methods": [],
|
|
711
|
+
"properties": [
|
|
712
|
+
{
|
|
713
|
+
"name": "flashMode",
|
|
714
|
+
"tags": [],
|
|
715
|
+
"docs": "The current flash mode setting",
|
|
716
|
+
"complexTypes": [
|
|
717
|
+
"FlashMode"
|
|
718
|
+
],
|
|
719
|
+
"type": "FlashMode"
|
|
720
|
+
}
|
|
721
|
+
]
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
"name": "GetSupportedFlashModesResponse",
|
|
725
|
+
"slug": "getsupportedflashmodesresponse",
|
|
726
|
+
"docs": "Response for getting supported flash modes.",
|
|
727
|
+
"tags": [
|
|
728
|
+
{
|
|
729
|
+
"text": "1.0.0",
|
|
730
|
+
"name": "since"
|
|
731
|
+
}
|
|
732
|
+
],
|
|
733
|
+
"methods": [],
|
|
734
|
+
"properties": [
|
|
735
|
+
{
|
|
736
|
+
"name": "flashModes",
|
|
737
|
+
"tags": [],
|
|
738
|
+
"docs": "An array of flash modes supported by the current camera",
|
|
739
|
+
"complexTypes": [
|
|
740
|
+
"FlashMode"
|
|
741
|
+
],
|
|
742
|
+
"type": "FlashMode[]"
|
|
743
|
+
}
|
|
744
|
+
]
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"name": "PermissionStatus",
|
|
748
|
+
"slug": "permissionstatus",
|
|
749
|
+
"docs": "Response for the camera permission status.",
|
|
750
|
+
"tags": [
|
|
751
|
+
{
|
|
752
|
+
"text": "1.0.0",
|
|
753
|
+
"name": "since"
|
|
754
|
+
}
|
|
755
|
+
],
|
|
756
|
+
"methods": [],
|
|
757
|
+
"properties": [
|
|
758
|
+
{
|
|
759
|
+
"name": "camera",
|
|
760
|
+
"tags": [],
|
|
761
|
+
"docs": "The state of the camera permission",
|
|
762
|
+
"complexTypes": [
|
|
763
|
+
"PermissionState"
|
|
764
|
+
],
|
|
765
|
+
"type": "PermissionState"
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "PluginListenerHandle",
|
|
771
|
+
"slug": "pluginlistenerhandle",
|
|
772
|
+
"docs": "",
|
|
773
|
+
"tags": [],
|
|
774
|
+
"methods": [],
|
|
775
|
+
"properties": [
|
|
776
|
+
{
|
|
777
|
+
"name": "remove",
|
|
778
|
+
"tags": [],
|
|
779
|
+
"docs": "",
|
|
780
|
+
"complexTypes": [],
|
|
781
|
+
"type": "() => Promise<void>"
|
|
782
|
+
}
|
|
783
|
+
]
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"name": "BarcodeDetectionData",
|
|
787
|
+
"slug": "barcodedetectiondata",
|
|
788
|
+
"docs": "Data for a detected barcode.",
|
|
789
|
+
"tags": [
|
|
790
|
+
{
|
|
791
|
+
"text": "1.0.0",
|
|
792
|
+
"name": "since"
|
|
793
|
+
}
|
|
794
|
+
],
|
|
795
|
+
"methods": [],
|
|
796
|
+
"properties": [
|
|
797
|
+
{
|
|
798
|
+
"name": "value",
|
|
799
|
+
"tags": [],
|
|
800
|
+
"docs": "The decoded string value of the barcode",
|
|
801
|
+
"complexTypes": [],
|
|
802
|
+
"type": "string"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"name": "displayValue",
|
|
806
|
+
"tags": [],
|
|
807
|
+
"docs": "The display value of the barcode (may differ from the raw value)",
|
|
808
|
+
"complexTypes": [],
|
|
809
|
+
"type": "string | undefined"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"name": "type",
|
|
813
|
+
"tags": [],
|
|
814
|
+
"docs": "The type/format of the barcode (e.g., 'qr', 'code128', etc.)",
|
|
815
|
+
"complexTypes": [],
|
|
816
|
+
"type": "string"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "boundingRect",
|
|
820
|
+
"tags": [],
|
|
821
|
+
"docs": "The bounding rectangle of the barcode in the camera frame.",
|
|
822
|
+
"complexTypes": [
|
|
823
|
+
"BoundingRect"
|
|
824
|
+
],
|
|
825
|
+
"type": "BoundingRect"
|
|
826
|
+
}
|
|
827
|
+
]
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "BoundingRect",
|
|
831
|
+
"slug": "boundingrect",
|
|
832
|
+
"docs": "Rectangle defining the boundary of the barcode in the camera frame.\nCoordinates are normalized between 0 and 1 relative to the camera frame.",
|
|
833
|
+
"tags": [
|
|
834
|
+
{
|
|
835
|
+
"text": "1.0.0",
|
|
836
|
+
"name": "since"
|
|
837
|
+
}
|
|
838
|
+
],
|
|
839
|
+
"methods": [],
|
|
840
|
+
"properties": [
|
|
841
|
+
{
|
|
842
|
+
"name": "x",
|
|
843
|
+
"tags": [],
|
|
844
|
+
"docs": "X-coordinate of the top-left corner",
|
|
845
|
+
"complexTypes": [],
|
|
846
|
+
"type": "number"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"name": "y",
|
|
850
|
+
"tags": [],
|
|
851
|
+
"docs": "Y-coordinate of the top-left corner",
|
|
852
|
+
"complexTypes": [],
|
|
853
|
+
"type": "number"
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"name": "width",
|
|
857
|
+
"tags": [],
|
|
858
|
+
"docs": "Width of the bounding rectangle (should match the actual width of the barcode)",
|
|
859
|
+
"complexTypes": [],
|
|
860
|
+
"type": "number"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"name": "height",
|
|
864
|
+
"tags": [],
|
|
865
|
+
"docs": "Height of the bounding rectangle (should match the actual height of the barcode)",
|
|
866
|
+
"complexTypes": [],
|
|
867
|
+
"type": "number"
|
|
868
|
+
}
|
|
869
|
+
]
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
"enums": [],
|
|
873
|
+
"typeAliases": [
|
|
874
|
+
{
|
|
875
|
+
"name": "CameraPosition",
|
|
876
|
+
"slug": "cameraposition",
|
|
877
|
+
"docs": "Position options for the camera.\n- 'front': Front-facing camera\n- 'back': Rear-facing camera",
|
|
878
|
+
"types": [
|
|
879
|
+
{
|
|
880
|
+
"text": "'front'",
|
|
881
|
+
"complexTypes": []
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"text": "'back'",
|
|
885
|
+
"complexTypes": []
|
|
886
|
+
}
|
|
887
|
+
]
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"name": "CameraDeviceType",
|
|
891
|
+
"slug": "cameradevicetype",
|
|
892
|
+
"docs": "Available camera device types for iOS.\nMaps to AVCaptureDevice DeviceTypes in iOS.",
|
|
893
|
+
"types": [
|
|
894
|
+
{
|
|
895
|
+
"text": "'wideAngle'",
|
|
896
|
+
"complexTypes": []
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"text": "'ultraWide'",
|
|
900
|
+
"complexTypes": []
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"text": "'telephoto'",
|
|
904
|
+
"complexTypes": []
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"text": "'dual'",
|
|
908
|
+
"complexTypes": []
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"text": "'dualWide'",
|
|
912
|
+
"complexTypes": []
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"text": "'triple'",
|
|
916
|
+
"complexTypes": []
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"text": "'trueDepth'",
|
|
920
|
+
"complexTypes": []
|
|
921
|
+
}
|
|
922
|
+
]
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"name": "FlashMode",
|
|
926
|
+
"slug": "flashmode",
|
|
927
|
+
"docs": "Flash mode options for the camera.\n- 'off': Flash disabled\n- 'on': Flash always on\n- 'auto': Flash automatically enabled in low-light conditions",
|
|
928
|
+
"types": [
|
|
929
|
+
{
|
|
930
|
+
"text": "'off'",
|
|
931
|
+
"complexTypes": []
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"text": "'on'",
|
|
935
|
+
"complexTypes": []
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"text": "'auto'",
|
|
939
|
+
"complexTypes": []
|
|
940
|
+
}
|
|
941
|
+
]
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "PermissionState",
|
|
945
|
+
"slug": "permissionstate",
|
|
946
|
+
"docs": "",
|
|
947
|
+
"types": [
|
|
948
|
+
{
|
|
949
|
+
"text": "'prompt'",
|
|
950
|
+
"complexTypes": []
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"text": "'prompt-with-rationale'",
|
|
954
|
+
"complexTypes": []
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"text": "'granted'",
|
|
958
|
+
"complexTypes": []
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"text": "'denied'",
|
|
962
|
+
"complexTypes": []
|
|
963
|
+
}
|
|
964
|
+
]
|
|
965
|
+
}
|
|
966
|
+
],
|
|
967
|
+
"pluginConfigs": []
|
|
968
|
+
}
|