@capacitor/camera 8.2.3 → 8.2.5
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/CapacitorCamera.podspec +1 -1
- package/Package.swift +1 -1
- package/android/src/main/java/com/capacitorjs/plugins/camera/CameraBottomSheetDialogFragment.java +1 -0
- package/android/src/main/java/com/capacitorjs/plugins/camera/CameraPlugin.kt +9 -34
- package/android/src/main/java/com/capacitorjs/plugins/camera/IonCameraFlow.kt +16 -24
- package/android/src/main/java/com/capacitorjs/plugins/camera/IonCameraUtils.kt +2 -2
- package/android/src/main/java/com/capacitorjs/plugins/camera/IonEditableMode.kt +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/package.json +1 -1
package/CapacitorCamera.podspec
CHANGED
|
@@ -13,6 +13,6 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}',
|
|
14
14
|
s.ios.deployment_target = '15.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency 'IONCameraLib', spec='~>
|
|
16
|
+
s.dependency 'IONCameraLib', spec='~> 2.0.0'
|
|
17
17
|
s.swift_version = '5.1'
|
|
18
18
|
end
|
package/Package.swift
CHANGED
|
@@ -11,7 +11,7 @@ let package = Package(
|
|
|
11
11
|
],
|
|
12
12
|
dependencies: [
|
|
13
13
|
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
|
|
14
|
-
.package(url: "https://github.com/ionic-team/ion-ios-camera.git", from: "
|
|
14
|
+
.package(url: "https://github.com/ionic-team/ion-ios-camera.git", .upToNextMinor(from: "2.0.0"))
|
|
15
15
|
],
|
|
16
16
|
targets: [
|
|
17
17
|
.target(
|
package/android/src/main/java/com/capacitorjs/plugins/camera/CameraBottomSheetDialogFragment.java
CHANGED
|
@@ -111,6 +111,7 @@ public class CameraBottomSheetDialogFragment extends BottomSheetDialogFragment {
|
|
|
111
111
|
dialog.setContentView(parentLayout.getRootView());
|
|
112
112
|
|
|
113
113
|
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) ((View) parentLayout.getParent()).getLayoutParams();
|
|
114
|
+
@SuppressWarnings("unchecked")
|
|
114
115
|
CoordinatorLayout.Behavior<View> behavior = params.getBehavior();
|
|
115
116
|
|
|
116
117
|
if (behavior instanceof BottomSheetBehavior) {
|
|
@@ -2,13 +2,9 @@ package com.capacitorjs.plugins.camera
|
|
|
2
2
|
|
|
3
3
|
import android.Manifest
|
|
4
4
|
import android.annotation.SuppressLint
|
|
5
|
-
import android.content.Intent
|
|
6
|
-
import android.content.pm.PackageManager
|
|
7
|
-
import android.content.pm.ResolveInfo
|
|
8
5
|
import android.os.Build
|
|
9
6
|
import android.os.Bundle
|
|
10
7
|
import androidx.activity.result.ActivityResult
|
|
11
|
-
import com.getcapacitor.Logger
|
|
12
8
|
import com.getcapacitor.PermissionState
|
|
13
9
|
import com.getcapacitor.Plugin
|
|
14
10
|
import com.getcapacitor.PluginCall
|
|
@@ -18,6 +14,7 @@ import com.getcapacitor.annotation.CapacitorPlugin
|
|
|
18
14
|
import com.getcapacitor.annotation.Permission
|
|
19
15
|
import com.getcapacitor.annotation.PermissionCallback
|
|
20
16
|
import org.json.JSONException
|
|
17
|
+
|
|
21
18
|
/**
|
|
22
19
|
* The Camera plugin makes it easy to take a photo or have the user select a photo
|
|
23
20
|
* from their albums.
|
|
@@ -74,11 +71,10 @@ class CameraPlugin : Plugin() {
|
|
|
74
71
|
activity,
|
|
75
72
|
bridge,
|
|
76
73
|
appId,
|
|
77
|
-
permissionHelper
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
)
|
|
74
|
+
permissionHelper
|
|
75
|
+
) { call, intent, callbackName ->
|
|
76
|
+
startActivityForResult(call, intent, callbackName)
|
|
77
|
+
}
|
|
82
78
|
|
|
83
79
|
ionFlow = IonCameraFlow(
|
|
84
80
|
context,
|
|
@@ -205,7 +201,7 @@ class CameraPlugin : Plugin() {
|
|
|
205
201
|
if (providedPerms != null) {
|
|
206
202
|
try {
|
|
207
203
|
permsList = providedPerms.toList<String?>()
|
|
208
|
-
} catch (
|
|
204
|
+
} catch (_: JSONException) {
|
|
209
205
|
}
|
|
210
206
|
}
|
|
211
207
|
|
|
@@ -228,45 +224,24 @@ class CameraPlugin : Plugin() {
|
|
|
228
224
|
|
|
229
225
|
// If Camera is not in the manifest and therefore not required, say the permission is granted
|
|
230
226
|
if (!isPermissionDeclared(CAMERA)) {
|
|
231
|
-
permissionStates
|
|
227
|
+
permissionStates[CAMERA] = PermissionState.GRANTED
|
|
232
228
|
}
|
|
233
229
|
|
|
234
230
|
if (permissionStates.containsKey(PHOTOS)) {
|
|
235
|
-
permissionStates
|
|
231
|
+
permissionStates[PHOTOS] = PermissionState.GRANTED
|
|
236
232
|
}
|
|
237
233
|
|
|
238
234
|
// If the SDK version is 30 or higher, update the SAVE_GALLERY state to match the READ_EXTERNAL_STORAGE state.
|
|
239
235
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
240
236
|
val alias: String = READ_EXTERNAL_STORAGE
|
|
241
237
|
if (permissionStates.containsKey(alias)) {
|
|
242
|
-
permissionStates
|
|
238
|
+
permissionStates[SAVE_GALLERY] = permissionStates[alias]
|
|
243
239
|
}
|
|
244
240
|
}
|
|
245
241
|
|
|
246
242
|
return permissionStates
|
|
247
243
|
}
|
|
248
244
|
|
|
249
|
-
private fun getResultType(resultType: String?): CameraResultType? {
|
|
250
|
-
if (resultType == null) {
|
|
251
|
-
return null
|
|
252
|
-
}
|
|
253
|
-
try {
|
|
254
|
-
return CameraResultType.valueOf(resultType.uppercase())
|
|
255
|
-
} catch (ex: java.lang.IllegalArgumentException) {
|
|
256
|
-
Logger.debug(
|
|
257
|
-
getLogTag(),
|
|
258
|
-
"Invalid result type \"" + resultType + "\", defaulting to base64"
|
|
259
|
-
)
|
|
260
|
-
return CameraResultType.BASE64
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
@Suppress("deprecation")
|
|
265
|
-
private fun legacyQueryIntentActivities(intent: Intent): MutableList<ResolveInfo> {
|
|
266
|
-
return getContext().getPackageManager()
|
|
267
|
-
.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY)
|
|
268
|
-
}
|
|
269
|
-
|
|
270
245
|
protected override fun saveInstanceState(): Bundle? {
|
|
271
246
|
val bundle = super.saveInstanceState()
|
|
272
247
|
legacyFlow.onSaveInstanceState(bundle)
|
|
@@ -15,8 +15,6 @@ import androidx.activity.result.ActivityResultLauncher
|
|
|
15
15
|
import androidx.activity.result.contract.ActivityResultContracts
|
|
16
16
|
import androidx.appcompat.app.AppCompatActivity
|
|
17
17
|
import androidx.core.content.FileProvider
|
|
18
|
-
import com.capacitorjs.plugins.camera.IonCameraSettings.Companion.DEFAULT_CORRECT_ORIENTATION
|
|
19
|
-
import com.capacitorjs.plugins.camera.IonCameraSettings.Companion.DEFAULT_QUALITY
|
|
20
18
|
import com.getcapacitor.Bridge
|
|
21
19
|
import com.getcapacitor.FileUtils
|
|
22
20
|
import com.getcapacitor.JSArray
|
|
@@ -202,10 +200,10 @@ class IonCameraFlow(
|
|
|
202
200
|
limit = call.getInt("limit") ?: 0,
|
|
203
201
|
includeMetadata = call.getBoolean("includeMetadata") ?: false,
|
|
204
202
|
editable = IonEditableMode.fromString(call.getString("editable")),
|
|
205
|
-
quality = call.getInt("quality") ?: DEFAULT_QUALITY,
|
|
203
|
+
quality = call.getInt("quality") ?: IonCameraSettings.DEFAULT_QUALITY,
|
|
206
204
|
width = call.getInt("targetWidth") ?: 0,
|
|
207
205
|
height = call.getInt("targetHeight") ?: 0,
|
|
208
|
-
correctOrientation = call.getBoolean("correctOrientation") ?:
|
|
206
|
+
correctOrientation = call.getBoolean("correctOrientation") ?: IonCameraSettings.DEFAULT_CORRECT_ORIENTATION
|
|
209
207
|
)
|
|
210
208
|
}
|
|
211
209
|
|
|
@@ -241,7 +239,7 @@ class IonCameraFlow(
|
|
|
241
239
|
|
|
242
240
|
|
|
243
241
|
private fun showCamera(call: PluginCall) {
|
|
244
|
-
if (!context.
|
|
242
|
+
if (!context.packageManager
|
|
245
243
|
.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY)
|
|
246
244
|
) {
|
|
247
245
|
sendError(IONCAMRError.NO_CAMERA_AVAILABLE_ERROR)
|
|
@@ -264,7 +262,7 @@ class IonCameraFlow(
|
|
|
264
262
|
}
|
|
265
263
|
currentCall = call
|
|
266
264
|
manager.takePhoto(activity, settings.encodingType, cameraLauncher)
|
|
267
|
-
} catch (
|
|
265
|
+
} catch (_: Exception) {
|
|
268
266
|
sendError(IONCAMRError.TAKE_PHOTO_ERROR)
|
|
269
267
|
}
|
|
270
268
|
}
|
|
@@ -290,7 +288,7 @@ class IonCameraFlow(
|
|
|
290
288
|
) {
|
|
291
289
|
sendError(it)
|
|
292
290
|
}
|
|
293
|
-
} catch (
|
|
291
|
+
} catch (_: Exception) {
|
|
294
292
|
sendError(IONCAMRError.CAPTURE_VIDEO_ERROR)
|
|
295
293
|
}
|
|
296
294
|
}
|
|
@@ -647,15 +645,14 @@ class IonCameraFlow(
|
|
|
647
645
|
editIntent.addFlags(flags)
|
|
648
646
|
editIntent.putExtra(MediaStore.EXTRA_OUTPUT, editUri)
|
|
649
647
|
|
|
650
|
-
val resInfoList: MutableList<ResolveInfo
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}
|
|
648
|
+
val resInfoList: MutableList<ResolveInfo> =
|
|
649
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
650
|
+
context
|
|
651
|
+
.packageManager
|
|
652
|
+
.queryIntentActivities(editIntent, PackageManager.ResolveInfoFlags.of(PackageManager.MATCH_DEFAULT_ONLY.toLong()))
|
|
653
|
+
} else {
|
|
654
|
+
legacyQueryIntentActivities(editIntent)
|
|
655
|
+
}
|
|
659
656
|
|
|
660
657
|
for (resolveInfo in resInfoList) {
|
|
661
658
|
val packageName = resolveInfo.activityInfo.packageName
|
|
@@ -663,12 +660,11 @@ class IonCameraFlow(
|
|
|
663
660
|
}
|
|
664
661
|
|
|
665
662
|
editIntent
|
|
666
|
-
} catch (
|
|
663
|
+
} catch (_: Exception) {
|
|
667
664
|
null
|
|
668
665
|
}
|
|
669
666
|
}
|
|
670
667
|
|
|
671
|
-
@Suppress("deprecation")
|
|
672
668
|
private fun legacyQueryIntentActivities(intent: Intent): MutableList<ResolveInfo> {
|
|
673
669
|
return context.packageManager
|
|
674
670
|
.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY)
|
|
@@ -861,10 +857,6 @@ class IonCameraFlow(
|
|
|
861
857
|
.getString(STORE, "")
|
|
862
858
|
fromPreferences.let { uri = Uri.parse(fromPreferences) }
|
|
863
859
|
}
|
|
864
|
-
if (activity == null) {
|
|
865
|
-
sendError(IONCAMRError.CAPTURE_VIDEO_ERROR)
|
|
866
|
-
return
|
|
867
|
-
}
|
|
868
860
|
val settings = videoParameters ?: run {
|
|
869
861
|
sendError(IONCAMRError.INVALID_ARGUMENT_ERROR)
|
|
870
862
|
return
|
|
@@ -1044,7 +1036,7 @@ class IonCameraFlow(
|
|
|
1044
1036
|
jsonResult.put("message", error.description)
|
|
1045
1037
|
currentCall?.reject(error.description, formatErrorCode(error.code))
|
|
1046
1038
|
currentCall = null
|
|
1047
|
-
} catch (
|
|
1039
|
+
} catch (_: Exception) {
|
|
1048
1040
|
currentCall?.reject("There was an error performing the operation.")
|
|
1049
1041
|
currentCall = null
|
|
1050
1042
|
} finally {
|
|
@@ -1053,7 +1045,7 @@ class IonCameraFlow(
|
|
|
1053
1045
|
}
|
|
1054
1046
|
|
|
1055
1047
|
private fun formatErrorCode(code: Int): String {
|
|
1056
|
-
val stringCode =
|
|
1048
|
+
val stringCode = code.toString()
|
|
1057
1049
|
return ERROR_FORMAT_PREFIX + "0000$stringCode".substring(stringCode.length)
|
|
1058
1050
|
}
|
|
1059
1051
|
|
|
@@ -17,7 +17,7 @@ object IonCameraUtils {
|
|
|
17
17
|
inputStream.use {
|
|
18
18
|
saveImage(context, uri, it)
|
|
19
19
|
}
|
|
20
|
-
} catch (
|
|
20
|
+
} catch (_: Exception) {
|
|
21
21
|
null
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -38,7 +38,7 @@ object IonCameraUtils {
|
|
|
38
38
|
inputStream.copyTo(output)
|
|
39
39
|
}
|
|
40
40
|
Uri.fromFile(tempFile)
|
|
41
|
-
} catch (
|
|
41
|
+
} catch (_: Exception) {
|
|
42
42
|
null
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -8,7 +8,7 @@ enum class IonEditableMode(val value: String) {
|
|
|
8
8
|
companion object {
|
|
9
9
|
fun fromString(value: String?): IonEditableMode {
|
|
10
10
|
if (value == null) return NO
|
|
11
|
-
return
|
|
11
|
+
return entries.find {
|
|
12
12
|
it.value.equals(value, ignoreCase = true)
|
|
13
13
|
} ?: NO
|
|
14
14
|
}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/web.js","esm/index.js"],"sourcesContent":["/**\n * @deprecated This enum is only meant to be used for deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraSource;\n(function (CameraSource) {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n CameraSource[\"Prompt\"] = \"PROMPT\";\n /**\n * Take a new photo using the camera.\n */\n CameraSource[\"Camera\"] = \"CAMERA\";\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n CameraSource[\"Photos\"] = \"PHOTOS\";\n})(CameraSource || (CameraSource = {}));\nexport var CameraDirection;\n(function (CameraDirection) {\n CameraDirection[\"Rear\"] = \"REAR\";\n CameraDirection[\"Front\"] = \"FRONT\";\n})(CameraDirection || (CameraDirection = {}));\n/**\n * @deprecated This enum is only meant to be used for `ImageOptions` in deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraResultType;\n(function (CameraResultType) {\n CameraResultType[\"Uri\"] = \"uri\";\n CameraResultType[\"Base64\"] = \"base64\";\n CameraResultType[\"DataUrl\"] = \"dataUrl\";\n})(CameraResultType || (CameraResultType = {}));\nexport var MediaType;\n(function (MediaType) {\n MediaType[MediaType[\"Photo\"] = 0] = \"Photo\";\n MediaType[MediaType[\"Video\"] = 1] = \"Video\";\n})(MediaType || (MediaType = {}));\nexport var MediaTypeSelection;\n(function (MediaTypeSelection) {\n MediaTypeSelection[MediaTypeSelection[\"Photo\"] = 0] = \"Photo\";\n MediaTypeSelection[MediaTypeSelection[\"Video\"] = 1] = \"Video\";\n MediaTypeSelection[MediaTypeSelection[\"All\"] = 2] = \"All\";\n})(MediaTypeSelection || (MediaTypeSelection = {}));\nexport var EncodingType;\n(function (EncodingType) {\n EncodingType[EncodingType[\"JPEG\"] = 0] = \"JPEG\";\n EncodingType[EncodingType[\"PNG\"] = 1] = \"PNG\";\n})(EncodingType || (EncodingType = {}));\n/**\n * Error codes returned by the Camera plugin.\n * These values match the `code` field on rejected promises.\n *\n * @since 8.2.0\n */\nexport var CameraErrorCode;\n(function (CameraErrorCode) {\n // Permissions\n /**\n * Camera access was denied by the user.\n */\n CameraErrorCode[\"CameraPermissionDenied\"] = \"OS-PLUG-CAMR-0003\";\n /**\n * Photo library / gallery access was denied by the user.\n */\n CameraErrorCode[\"GalleryPermissionDenied\"] = \"OS-PLUG-CAMR-0005\";\n /**\n * No camera hardware is available on the device.\n */\n CameraErrorCode[\"NoCameraAvailable\"] = \"OS-PLUG-CAMR-0007\";\n // Take Photo\n /**\n * The user cancelled the take photo action.\n */\n CameraErrorCode[\"TakePhotoCancelled\"] = \"OS-PLUG-CAMR-0006\";\n /**\n * Failed to take photo.\n */\n CameraErrorCode[\"TakePhotoFailed\"] = \"OS-PLUG-CAMR-0010\";\n /**\n * The take photo action received invalid arguments.\n * @platform ios\n */\n CameraErrorCode[\"TakePhotoInvalidArguments\"] = \"OS-PLUG-CAMR-0014\";\n // Edit Photo\n /**\n * The selected file contains invalid image data.\n * @platform ios\n */\n CameraErrorCode[\"InvalidImageData\"] = \"OS-PLUG-CAMR-0008\";\n /**\n * Failed to edit image.\n */\n CameraErrorCode[\"EditPhotoFailed\"] = \"OS-PLUG-CAMR-0009\";\n /**\n * The user cancelled the edit photo action.\n */\n CameraErrorCode[\"EditPhotoCancelled\"] = \"OS-PLUG-CAMR-0013\";\n /**\n * The URI parameter for editing is empty.\n * @platform android\n */\n CameraErrorCode[\"EditPhotoEmptyUri\"] = \"OS-PLUG-CAMR-0024\";\n // Choose from Gallery\n /**\n * Failed to retrieve an image from the gallery.\n */\n CameraErrorCode[\"ImageNotFound\"] = \"OS-PLUG-CAMR-0011\";\n /**\n * Failed to process the selected image.\n */\n CameraErrorCode[\"ProcessImageFailed\"] = \"OS-PLUG-CAMR-0012\";\n /**\n * Failed to choose media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaFailed\"] = \"OS-PLUG-CAMR-0018\";\n /**\n * The user cancelled choosing media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaCancelled\"] = \"OS-PLUG-CAMR-0020\";\n /**\n * Failed to retrieve the media file path.\n * @platform android\n */\n CameraErrorCode[\"MediaPathError\"] = \"OS-PLUG-CAMR-0021\";\n /**\n * Failed to retrieve an image from the provided URI.\n */\n CameraErrorCode[\"FetchImageFromUriFailed\"] = \"OS-PLUG-CAMR-0028\";\n // Record Video\n /**\n * Failed to record video.\n */\n CameraErrorCode[\"RecordVideoFailed\"] = \"OS-PLUG-CAMR-0016\";\n /**\n * The user cancelled the video recording.\n */\n CameraErrorCode[\"RecordVideoCancelled\"] = \"OS-PLUG-CAMR-0017\";\n /**\n * Failed to retrieve a video from the gallery.\n * @platform ios\n */\n CameraErrorCode[\"VideoNotFound\"] = \"OS-PLUG-CAMR-0025\";\n // Play Video\n /**\n * Failed to play video.\n */\n CameraErrorCode[\"PlayVideoFailed\"] = \"OS-PLUG-CAMR-0023\";\n // General\n /**\n * Failed to encode the media result.\n * @platform ios\n */\n CameraErrorCode[\"EncodeResultFailed\"] = \"OS-PLUG-CAMR-0019\";\n /**\n * The selected file does not exist.\n */\n CameraErrorCode[\"FileNotFound\"] = \"OS-PLUG-CAMR-0027\";\n /**\n * Invalid argument provided to a plugin method.\n * @platform android\n */\n CameraErrorCode[\"InvalidArgument\"] = \"OS-PLUG-CAMR-0031\";\n /**\n * A general plugin error occurred.\n * @platform ios\n */\n CameraErrorCode[\"GeneralError\"] = \"OS-PLUG-CAMR-0026\";\n})(CameraErrorCode || (CameraErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { WebPlugin, CapacitorException } from '@capacitor/core';\nimport { CameraSource, CameraDirection, MediaType, MediaTypeSelection } from './definitions';\nexport class CameraWeb extends WebPlugin {\n async takePhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput) {\n this.takePhotoCameraInputExperience(options, resolve, reject);\n }\n else {\n this.takePhotoCameraExperience(options, resolve, reject);\n }\n });\n }\n async recordVideo(_options) {\n throw this.unimplemented('recordVideo is not implemented on Web.');\n }\n async playVideo(_options) {\n throw this.unimplemented('playVideo is not implemented on Web.');\n }\n async chooseFromGallery(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.galleryInputExperience(options, resolve, reject);\n });\n }\n async editPhoto(_options) {\n throw this.unimplemented('editPhoto is not implemented on Web.');\n }\n async editURIPhoto(_options) {\n throw this.unimplemented('editURIPhoto is not implemented on Web.');\n }\n async getPhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput || options.source === CameraSource.Photos) {\n this.fileInputExperience(options, resolve, reject);\n }\n else if (options.source === CameraSource.Prompt) {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.promptLabelHeader || 'Photo';\n actionSheet.cancelable = false;\n actionSheet.options = [\n { title: options.promptLabelPhoto || 'From Photos' },\n { title: options.promptLabelPicture || 'Take Picture' },\n ];\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n if (selection === 0) {\n this.fileInputExperience(options, resolve, reject);\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n async pickImages(_options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.multipleFileInputExperience(resolve, reject);\n });\n }\n async cameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.direction, (photo) => this._getCameraPhoto(photo, options), () => this.fileInputExperience(options, resolve, reject), resolve, reject);\n }\n fileInputExperience(options, resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input';\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const file = input.files[0];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n if (options.resultType === 'dataUrl' || options.resultType === 'base64') {\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: reader.result,\n format,\n });\n }\n else if (options.resultType === 'base64') {\n const b64 = reader.result.split(',')[1];\n resolve({\n base64String: b64,\n format,\n });\n }\n cleanup();\n });\n reader.readAsDataURL(file);\n }\n else {\n resolve({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n cleanup();\n }\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.capture = true;\n if (options.source === CameraSource.Photos || options.source === CameraSource.Prompt) {\n input.removeAttribute('capture');\n }\n else if (options.direction === CameraDirection.Front) {\n input.capture = 'user';\n }\n else if (options.direction === CameraDirection.Rear) {\n input.capture = 'environment';\n }\n input.click();\n }\n multipleFileInputExperience(resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input-multiple');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input-multiple';\n input.type = 'file';\n input.hidden = true;\n input.multiple = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const photos = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n photos.push({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n }\n resolve({ photos });\n cleanup();\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.click();\n }\n _getCameraPhoto(photo, options) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n const format = this._getFileFormat(photo);\n if (options.resultType === 'uri') {\n resolve({\n webPath: URL.createObjectURL(photo),\n format,\n saved: false,\n });\n }\n else {\n reader.readAsDataURL(photo);\n reader.onloadend = () => {\n const r = reader.result;\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: r,\n format,\n saved: false,\n });\n }\n else {\n resolve({\n base64String: r.split(',')[1],\n format,\n saved: false,\n });\n }\n };\n reader.onerror = (e) => {\n reject(e);\n };\n }\n });\n }\n async takePhotoCameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.cameraDirection, (photo) => { var _a; return this._buildPhotoMediaResult(photo, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false); }, () => this.takePhotoCameraInputExperience(options, resolve, reject), resolve, reject);\n }\n takePhotoCameraInputExperience(options, resolve, reject) {\n const input = this._createFileInput('_capacitor-camera-input-takephoto');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const file = input.files[0];\n resolve(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n input.accept = 'image/*';\n if (options.cameraDirection === CameraDirection.Front) {\n input.capture = 'user';\n }\n else {\n // CameraDirection.Rear\n input.capture = 'environment';\n }\n input.click();\n }\n galleryInputExperience(options, resolve, reject) {\n var _a, _b;\n const input = this._createFileInput('_capacitor-camera-input-gallery');\n input.multiple = (_a = options.allowMultipleSelection) !== null && _a !== void 0 ? _a : false;\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const results = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n if (file.type.startsWith('image/')) {\n results.push(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n }\n else if (file.type.startsWith('video/')) {\n const format = this._getFileFormat(file);\n let thumbnail;\n let resolution;\n let duration;\n try {\n const videoInfo = await this._getVideoMetadata(file);\n thumbnail = videoInfo.thumbnail;\n if (options.includeMetadata) {\n resolution = videoInfo.resolution;\n duration = videoInfo.duration;\n }\n }\n catch (e) {\n console.warn('Failed to get video metadata:', e);\n }\n const result = {\n type: MediaType.Video,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (options.includeMetadata) {\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: new Date(file.lastModified).toISOString(),\n duration,\n };\n }\n results.push(result);\n }\n }\n resolve({ results });\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n // Set accept attribute based on mediaType\n const mediaType = (_b = options.mediaType) !== null && _b !== void 0 ? _b : MediaTypeSelection.Photo;\n if (mediaType === MediaTypeSelection.Photo) {\n input.accept = 'image/*';\n }\n else if (mediaType === MediaTypeSelection.Video) {\n input.accept = 'video/*';\n }\n else {\n // MediaTypeSelection.All\n input.accept = 'image/*,video/*';\n }\n input.click();\n }\n _getFileFormat(file) {\n if (file.type === 'image/png') {\n return 'png';\n }\n else if (file.type === 'image/gif') {\n return 'gif';\n }\n else if (file.type.startsWith('video/')) {\n return file.type.split('/')[1];\n }\n else if (file.type.startsWith('image/')) {\n return 'jpeg';\n }\n return file.type.split('/')[1] || 'jpeg';\n }\n async _buildPhotoMediaResult(file, includeMetadata) {\n const format = this._getFileFormat(file);\n const thumbnail = await this._getBase64FromFile(file);\n const result = {\n type: MediaType.Photo,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (includeMetadata) {\n const resolution = await this._getImageResolution(file);\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: 'lastModified' in file ? new Date(file.lastModified).toISOString() : new Date().toISOString(),\n };\n }\n return result;\n }\n _validateFileInput(input, reject, cleanup) {\n if (!input.files || input.files.length === 0) {\n const message = input.multiple ? 'No files selected' : 'No file selected';\n reject(new CapacitorException(message));\n cleanup();\n return false;\n }\n return true;\n }\n async _setupPWACameraModal(cameraDirection, onPhotoCallback, fallbackCallback, resolve, reject) {\n if (customElements.get('pwa-camera-modal')) {\n const cameraModal = document.createElement('pwa-camera-modal');\n cameraModal.facingMode = cameraDirection === CameraDirection.Front ? 'user' : 'environment';\n document.body.appendChild(cameraModal);\n try {\n await cameraModal.componentOnReady();\n cameraModal.addEventListener('onPhoto', async (e) => {\n const photo = e.detail;\n if (photo === null) {\n reject(new CapacitorException('User cancelled photos app'));\n }\n else if (photo instanceof Error) {\n reject(photo);\n }\n else {\n resolve(await onPhotoCallback(photo));\n }\n cameraModal.dismiss();\n document.body.removeChild(cameraModal);\n });\n cameraModal.present();\n }\n catch (e) {\n fallbackCallback();\n }\n }\n else {\n console.error(`Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements.`);\n fallbackCallback();\n }\n }\n _createFileInput(id) {\n let input = document.querySelector(`#${id}`);\n if (!input) {\n input = document.createElement('input');\n input.id = id;\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n }\n return input;\n }\n async _getImageResolution(image) {\n try {\n const bitmap = await createImageBitmap(image);\n const resolution = `${bitmap.width}x${bitmap.height}`;\n bitmap.close();\n return resolution;\n }\n catch (e) {\n console.warn('Failed to get image resolution:', e);\n return undefined;\n }\n }\n _getBase64FromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const dataUrl = reader.result;\n const base64 = dataUrl.split(',')[1];\n resolve(base64);\n };\n reader.onerror = (e) => {\n reject(e);\n };\n reader.readAsDataURL(file);\n });\n }\n _getVideoMetadata(videoFile) {\n return new Promise((resolve) => {\n const video = document.createElement('video');\n video.preload = 'metadata';\n video.muted = true;\n video.onloadedmetadata = () => {\n // Seek to 1 second or 10% of duration to capture thumbnail\n const seekTime = Math.min(1, video.duration * 0.1);\n video.currentTime = seekTime;\n };\n video.onseeked = () => {\n const result = {\n resolution: `${video.videoWidth}x${video.videoHeight}`,\n duration: video.duration,\n };\n try {\n const canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n const ctx = canvas.getContext('2d');\n if (ctx) {\n ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n result.thumbnail = canvas.toDataURL('image/jpeg', 0.8).split(',')[1];\n }\n }\n catch (e) {\n console.warn('Failed to generate video thumbnail:', e);\n }\n URL.revokeObjectURL(video.src);\n resolve(result);\n };\n video.onerror = () => {\n // Clean up and return defaults\n URL.revokeObjectURL(video.src);\n resolve({});\n };\n video.src = URL.createObjectURL(videoFile);\n });\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query\n // the specific permissions that are supported varies among browsers that implement the\n // permissions API, so we need a try/catch in case 'camera' is invalid\n const permission = await window.navigator.permissions.query({\n name: 'camera',\n });\n return {\n camera: permission.state,\n photos: 'granted',\n };\n }\n catch (_a) {\n throw this.unavailable('Camera permissions are not available in this browser');\n }\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async pickLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n async getLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n}\nconst Camera = new CameraWeb();\nexport { Camera };\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CameraWeb } from './web';\nconst Camera = registerPlugin('Camera', {\n web: () => new CameraWeb(),\n});\nexport * from './definitions';\nexport { Camera };\n//# sourceMappingURL=index.js.map"],"names":["CameraSource","CameraDirection","CameraResultType","MediaType","MediaTypeSelection","EncodingType","CameraErrorCode","WebPlugin","CapacitorException","registerPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACWA;AACX,CAAC,UAAU,YAAY,EAAE;AACzB;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,QA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AQ,EAAE;AACxC,IAAI,GAAG,EAAE,MAAM,IAAI,SAAS,EAAE;AAC9B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/web.js","esm/index.js"],"sourcesContent":["/**\n * @deprecated This enum is only meant to be used for deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraSource;\n(function (CameraSource) {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n CameraSource[\"Prompt\"] = \"PROMPT\";\n /**\n * Take a new photo using the camera.\n */\n CameraSource[\"Camera\"] = \"CAMERA\";\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n CameraSource[\"Photos\"] = \"PHOTOS\";\n})(CameraSource || (CameraSource = {}));\nexport var CameraDirection;\n(function (CameraDirection) {\n CameraDirection[\"Rear\"] = \"REAR\";\n CameraDirection[\"Front\"] = \"FRONT\";\n})(CameraDirection || (CameraDirection = {}));\n/**\n * @deprecated This enum is only meant to be used for `ImageOptions` in deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraResultType;\n(function (CameraResultType) {\n CameraResultType[\"Uri\"] = \"uri\";\n CameraResultType[\"Base64\"] = \"base64\";\n CameraResultType[\"DataUrl\"] = \"dataUrl\";\n})(CameraResultType || (CameraResultType = {}));\nexport var MediaType;\n(function (MediaType) {\n MediaType[MediaType[\"Photo\"] = 0] = \"Photo\";\n MediaType[MediaType[\"Video\"] = 1] = \"Video\";\n})(MediaType || (MediaType = {}));\nexport var MediaTypeSelection;\n(function (MediaTypeSelection) {\n MediaTypeSelection[MediaTypeSelection[\"Photo\"] = 0] = \"Photo\";\n MediaTypeSelection[MediaTypeSelection[\"Video\"] = 1] = \"Video\";\n MediaTypeSelection[MediaTypeSelection[\"All\"] = 2] = \"All\";\n})(MediaTypeSelection || (MediaTypeSelection = {}));\nexport var EncodingType;\n(function (EncodingType) {\n EncodingType[EncodingType[\"JPEG\"] = 0] = \"JPEG\";\n EncodingType[EncodingType[\"PNG\"] = 1] = \"PNG\";\n})(EncodingType || (EncodingType = {}));\n/**\n * Error codes returned by the Camera plugin.\n * These values match the `code` field on rejected promises.\n *\n * @since 8.2.0\n */\nexport var CameraErrorCode;\n(function (CameraErrorCode) {\n // Permissions\n /**\n * Camera access was denied by the user.\n */\n CameraErrorCode[\"CameraPermissionDenied\"] = \"OS-PLUG-CAMR-0003\";\n /**\n * Photo library / gallery access was denied by the user.\n */\n CameraErrorCode[\"GalleryPermissionDenied\"] = \"OS-PLUG-CAMR-0005\";\n /**\n * No camera hardware is available on the device.\n */\n CameraErrorCode[\"NoCameraAvailable\"] = \"OS-PLUG-CAMR-0007\";\n // Take Photo\n /**\n * The user cancelled the take photo action.\n */\n CameraErrorCode[\"TakePhotoCancelled\"] = \"OS-PLUG-CAMR-0006\";\n /**\n * Failed to take photo.\n */\n CameraErrorCode[\"TakePhotoFailed\"] = \"OS-PLUG-CAMR-0010\";\n /**\n * The take photo action received invalid arguments.\n * @platform ios\n */\n CameraErrorCode[\"TakePhotoInvalidArguments\"] = \"OS-PLUG-CAMR-0014\";\n // Edit Photo\n /**\n * The selected file contains invalid image data.\n * @platform ios\n */\n CameraErrorCode[\"InvalidImageData\"] = \"OS-PLUG-CAMR-0008\";\n /**\n * Failed to edit image.\n */\n CameraErrorCode[\"EditPhotoFailed\"] = \"OS-PLUG-CAMR-0009\";\n /**\n * The user cancelled the edit photo action.\n */\n CameraErrorCode[\"EditPhotoCancelled\"] = \"OS-PLUG-CAMR-0013\";\n /**\n * The URI parameter for editing is empty.\n * @platform android\n */\n CameraErrorCode[\"EditPhotoEmptyUri\"] = \"OS-PLUG-CAMR-0024\";\n // Choose from Gallery\n /**\n * Failed to retrieve an image from the gallery.\n */\n CameraErrorCode[\"ImageNotFound\"] = \"OS-PLUG-CAMR-0011\";\n /**\n * Failed to process the selected image.\n */\n CameraErrorCode[\"ProcessImageFailed\"] = \"OS-PLUG-CAMR-0012\";\n /**\n * Failed to choose media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaFailed\"] = \"OS-PLUG-CAMR-0018\";\n /**\n * The user cancelled choosing media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaCancelled\"] = \"OS-PLUG-CAMR-0020\";\n /**\n * Failed to retrieve the media file path.\n * @platform android\n */\n CameraErrorCode[\"MediaPathError\"] = \"OS-PLUG-CAMR-0021\";\n /**\n * Failed to retrieve an image from the provided URI.\n */\n CameraErrorCode[\"FetchImageFromUriFailed\"] = \"OS-PLUG-CAMR-0028\";\n // Record Video\n /**\n * Failed to record video.\n */\n CameraErrorCode[\"RecordVideoFailed\"] = \"OS-PLUG-CAMR-0016\";\n /**\n * The user cancelled the video recording.\n */\n CameraErrorCode[\"RecordVideoCancelled\"] = \"OS-PLUG-CAMR-0017\";\n /**\n * Failed to retrieve a video from the gallery.\n * @platform ios\n */\n CameraErrorCode[\"VideoNotFound\"] = \"OS-PLUG-CAMR-0025\";\n // Play Video\n /**\n * Failed to play video.\n */\n CameraErrorCode[\"PlayVideoFailed\"] = \"OS-PLUG-CAMR-0023\";\n // General\n /**\n * Failed to encode the media result.\n * @platform ios\n */\n CameraErrorCode[\"EncodeResultFailed\"] = \"OS-PLUG-CAMR-0019\";\n /**\n * The selected file does not exist.\n */\n CameraErrorCode[\"FileNotFound\"] = \"OS-PLUG-CAMR-0027\";\n /**\n * Invalid argument provided to a plugin method.\n * @platform android\n */\n CameraErrorCode[\"InvalidArgument\"] = \"OS-PLUG-CAMR-0031\";\n /**\n * A general plugin error occurred.\n * @platform ios\n */\n CameraErrorCode[\"GeneralError\"] = \"OS-PLUG-CAMR-0026\";\n})(CameraErrorCode || (CameraErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { WebPlugin, CapacitorException } from '@capacitor/core';\nimport { CameraSource, CameraDirection, MediaType, MediaTypeSelection } from './definitions';\nexport class CameraWeb extends WebPlugin {\n async takePhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput) {\n this.takePhotoCameraInputExperience(options, resolve, reject);\n }\n else {\n this.takePhotoCameraExperience(options, resolve, reject);\n }\n });\n }\n async recordVideo(_options) {\n throw this.unimplemented('recordVideo is not implemented on Web.');\n }\n async playVideo(_options) {\n throw this.unimplemented('playVideo is not implemented on Web.');\n }\n async chooseFromGallery(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.galleryInputExperience(options, resolve, reject);\n });\n }\n async editPhoto(_options) {\n throw this.unimplemented('editPhoto is not implemented on Web.');\n }\n async editURIPhoto(_options) {\n throw this.unimplemented('editURIPhoto is not implemented on Web.');\n }\n async getPhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput || options.source === CameraSource.Photos) {\n this.fileInputExperience(options, resolve, reject);\n }\n else if (options.source === CameraSource.Prompt) {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.promptLabelHeader || 'Photo';\n actionSheet.cancelable = false;\n actionSheet.options = [\n { title: options.promptLabelPhoto || 'From Photos' },\n { title: options.promptLabelPicture || 'Take Picture' },\n ];\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n if (selection === 0) {\n this.fileInputExperience(options, resolve, reject);\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n async pickImages(_options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.multipleFileInputExperience(resolve, reject);\n });\n }\n async cameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.direction, (photo) => this._getCameraPhoto(photo, options), () => this.fileInputExperience(options, resolve, reject), resolve, reject);\n }\n fileInputExperience(options, resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input';\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const file = input.files[0];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n if (options.resultType === 'dataUrl' || options.resultType === 'base64') {\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: reader.result,\n format,\n });\n }\n else if (options.resultType === 'base64') {\n const b64 = reader.result.split(',')[1];\n resolve({\n base64String: b64,\n format,\n });\n }\n cleanup();\n });\n reader.readAsDataURL(file);\n }\n else {\n resolve({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n cleanup();\n }\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.capture = true;\n if (options.source === CameraSource.Photos || options.source === CameraSource.Prompt) {\n input.removeAttribute('capture');\n }\n else if (options.direction === CameraDirection.Front) {\n input.capture = 'user';\n }\n else if (options.direction === CameraDirection.Rear) {\n input.capture = 'environment';\n }\n input.click();\n }\n multipleFileInputExperience(resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input-multiple');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input-multiple';\n input.type = 'file';\n input.hidden = true;\n input.multiple = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const photos = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n photos.push({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n }\n resolve({ photos });\n cleanup();\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.click();\n }\n _getCameraPhoto(photo, options) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n const format = this._getFileFormat(photo);\n if (options.resultType === 'uri') {\n resolve({\n webPath: URL.createObjectURL(photo),\n format,\n saved: false,\n });\n }\n else {\n reader.readAsDataURL(photo);\n reader.onloadend = () => {\n const r = reader.result;\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: r,\n format,\n saved: false,\n });\n }\n else {\n resolve({\n base64String: r.split(',')[1],\n format,\n saved: false,\n });\n }\n };\n reader.onerror = (e) => {\n reject(e);\n };\n }\n });\n }\n async takePhotoCameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.cameraDirection, (photo) => { var _a; return this._buildPhotoMediaResult(photo, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false); }, () => this.takePhotoCameraInputExperience(options, resolve, reject), resolve, reject);\n }\n takePhotoCameraInputExperience(options, resolve, reject) {\n const input = this._createFileInput('_capacitor-camera-input-takephoto');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const file = input.files[0];\n resolve(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n input.accept = 'image/*';\n if (options.cameraDirection === CameraDirection.Front) {\n input.capture = 'user';\n }\n else {\n // CameraDirection.Rear\n input.capture = 'environment';\n }\n input.click();\n }\n galleryInputExperience(options, resolve, reject) {\n var _a, _b;\n const input = this._createFileInput('_capacitor-camera-input-gallery');\n input.multiple = (_a = options.allowMultipleSelection) !== null && _a !== void 0 ? _a : false;\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const results = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n if (file.type.startsWith('image/')) {\n results.push(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n }\n else if (file.type.startsWith('video/')) {\n const format = this._getFileFormat(file);\n let thumbnail;\n let resolution;\n let duration;\n try {\n const videoInfo = await this._getVideoMetadata(file);\n thumbnail = videoInfo.thumbnail;\n if (options.includeMetadata) {\n resolution = videoInfo.resolution;\n duration = videoInfo.duration;\n }\n }\n catch (e) {\n console.warn('Failed to get video metadata:', e);\n }\n const result = {\n type: MediaType.Video,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (options.includeMetadata) {\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: new Date(file.lastModified).toISOString(),\n duration,\n };\n }\n results.push(result);\n }\n }\n resolve({ results });\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n // Set accept attribute based on mediaType\n const mediaType = (_b = options.mediaType) !== null && _b !== void 0 ? _b : MediaTypeSelection.Photo;\n if (mediaType === MediaTypeSelection.Photo) {\n input.accept = 'image/*';\n }\n else if (mediaType === MediaTypeSelection.Video) {\n input.accept = 'video/*';\n }\n else {\n // MediaTypeSelection.All\n input.accept = 'image/*,video/*';\n }\n input.click();\n }\n _getFileFormat(file) {\n if (file.type === 'image/png') {\n return 'png';\n }\n else if (file.type === 'image/gif') {\n return 'gif';\n }\n else if (file.type.startsWith('video/')) {\n return file.type.split('/')[1];\n }\n else if (file.type.startsWith('image/')) {\n return 'jpeg';\n }\n return file.type.split('/')[1] || 'jpeg';\n }\n async _buildPhotoMediaResult(file, includeMetadata) {\n const format = this._getFileFormat(file);\n const thumbnail = await this._getBase64FromFile(file);\n const result = {\n type: MediaType.Photo,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (includeMetadata) {\n const resolution = await this._getImageResolution(file);\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: 'lastModified' in file ? new Date(file.lastModified).toISOString() : new Date().toISOString(),\n };\n }\n return result;\n }\n _validateFileInput(input, reject, cleanup) {\n if (!input.files || input.files.length === 0) {\n const message = input.multiple ? 'No files selected' : 'No file selected';\n reject(new CapacitorException(message));\n cleanup();\n return false;\n }\n return true;\n }\n async _setupPWACameraModal(cameraDirection, onPhotoCallback, fallbackCallback, resolve, reject) {\n if (customElements.get('pwa-camera-modal')) {\n const cameraModal = document.createElement('pwa-camera-modal');\n cameraModal.facingMode = cameraDirection === CameraDirection.Front ? 'user' : 'environment';\n document.body.appendChild(cameraModal);\n try {\n await cameraModal.componentOnReady();\n cameraModal.addEventListener('onPhoto', async (e) => {\n const photo = e.detail;\n if (photo === null) {\n reject(new CapacitorException('User cancelled photos app'));\n }\n else if (photo instanceof Error) {\n reject(photo);\n }\n else {\n resolve(await onPhotoCallback(photo));\n }\n cameraModal.dismiss();\n document.body.removeChild(cameraModal);\n });\n cameraModal.present();\n }\n catch (e) {\n fallbackCallback();\n }\n }\n else {\n console.error(`Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements.`);\n fallbackCallback();\n }\n }\n _createFileInput(id) {\n let input = document.querySelector(`#${id}`);\n if (!input) {\n input = document.createElement('input');\n input.id = id;\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n }\n return input;\n }\n async _getImageResolution(image) {\n try {\n const bitmap = await createImageBitmap(image);\n const resolution = `${bitmap.width}x${bitmap.height}`;\n bitmap.close();\n return resolution;\n }\n catch (e) {\n console.warn('Failed to get image resolution:', e);\n return undefined;\n }\n }\n _getBase64FromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const dataUrl = reader.result;\n const base64 = dataUrl.split(',')[1];\n resolve(base64);\n };\n reader.onerror = (e) => {\n reject(e);\n };\n reader.readAsDataURL(file);\n });\n }\n _getVideoMetadata(videoFile) {\n return new Promise((resolve) => {\n const video = document.createElement('video');\n video.preload = 'metadata';\n video.muted = true;\n video.onloadedmetadata = () => {\n // Seek to 1 second or 10% of duration to capture thumbnail\n const seekTime = Math.min(1, video.duration * 0.1);\n video.currentTime = seekTime;\n };\n video.onseeked = () => {\n const result = {\n resolution: `${video.videoWidth}x${video.videoHeight}`,\n duration: video.duration,\n };\n try {\n const canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n const ctx = canvas.getContext('2d');\n if (ctx) {\n ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n result.thumbnail = canvas.toDataURL('image/jpeg', 0.8).split(',')[1];\n }\n }\n catch (e) {\n console.warn('Failed to generate video thumbnail:', e);\n }\n URL.revokeObjectURL(video.src);\n resolve(result);\n };\n video.onerror = () => {\n // Clean up and return defaults\n URL.revokeObjectURL(video.src);\n resolve({});\n };\n video.src = URL.createObjectURL(videoFile);\n });\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query\n // the specific permissions that are supported varies among browsers that implement the\n // permissions API, so we need a try/catch in case 'camera' is invalid\n const permission = await window.navigator.permissions.query({\n name: 'camera',\n });\n return {\n camera: permission.state,\n photos: 'granted',\n };\n }\n catch (_a) {\n throw this.unavailable('Camera permissions are not available in this browser');\n }\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async pickLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n async getLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n}\nconst Camera = new CameraWeb();\nexport { Camera };\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CameraWeb } from './web';\nconst Camera = registerPlugin('Camera', {\n web: () => new CameraWeb(),\n});\nexport * from './definitions';\nexport { Camera };\n//# sourceMappingURL=index.js.map"],"names":["CameraSource","CameraDirection","CameraResultType","MediaType","MediaTypeSelection","EncodingType","CameraErrorCode","WebPlugin","CapacitorException","registerPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACWA;AACX,CAAC,UAAU,YAAY,EAAE;AACzB;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC;AACA;AACA;AACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACrC,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;AACX,CAAC,UAAU,eAAe,EAAE;AAC5B,IAAI,eAAe,CAAC,MAAM,CAAC,GAAG,MAAM;AACpC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,OAAO;AACtC,CAAC,EAAEA,uBAAe,KAAKA,uBAAe,GAAG,EAAE,CAAC,CAAC;AAC7C;AACA;AACA;AACA;AACWC;AACX,CAAC,UAAU,gBAAgB,EAAE;AAC7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,GAAG,KAAK;AACnC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACzC,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC3C,CAAC,EAAEA,wBAAgB,KAAKA,wBAAgB,GAAG,EAAE,CAAC,CAAC;AACpCC;AACX,CAAC,UAAU,SAAS,EAAE;AACtB,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;AAC/C,I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BAAgB,MAAM,EAAE,SAAS;AACjC,aAAa;AACb,QAAQ;AACR,QAAQ,OAAO,EAAE,EAAE;AACnB,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,sDAAsD,CAAC;AAC1F,QAAQ;AACR,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,wBAAwB,GAAG;AACrC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,uBAAuB,GAAG;AACpC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC;AACzD,IAAI;AACJ;AACe,IAAI,SAAS;;ACzfvB,MAAC,MAAM,GAAGC,mBAAc,CAAC,QAAQ,EAAE;AACxC,IAAI,GAAG,EAAE,MAAM,IAAI,SAAS,EAAE;AAC9B,CAAC;;"}
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/web.js","esm/index.js"],"sourcesContent":["/**\n * @deprecated This enum is only meant to be used for deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraSource;\n(function (CameraSource) {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n CameraSource[\"Prompt\"] = \"PROMPT\";\n /**\n * Take a new photo using the camera.\n */\n CameraSource[\"Camera\"] = \"CAMERA\";\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n CameraSource[\"Photos\"] = \"PHOTOS\";\n})(CameraSource || (CameraSource = {}));\nexport var CameraDirection;\n(function (CameraDirection) {\n CameraDirection[\"Rear\"] = \"REAR\";\n CameraDirection[\"Front\"] = \"FRONT\";\n})(CameraDirection || (CameraDirection = {}));\n/**\n * @deprecated This enum is only meant to be used for `ImageOptions` in deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraResultType;\n(function (CameraResultType) {\n CameraResultType[\"Uri\"] = \"uri\";\n CameraResultType[\"Base64\"] = \"base64\";\n CameraResultType[\"DataUrl\"] = \"dataUrl\";\n})(CameraResultType || (CameraResultType = {}));\nexport var MediaType;\n(function (MediaType) {\n MediaType[MediaType[\"Photo\"] = 0] = \"Photo\";\n MediaType[MediaType[\"Video\"] = 1] = \"Video\";\n})(MediaType || (MediaType = {}));\nexport var MediaTypeSelection;\n(function (MediaTypeSelection) {\n MediaTypeSelection[MediaTypeSelection[\"Photo\"] = 0] = \"Photo\";\n MediaTypeSelection[MediaTypeSelection[\"Video\"] = 1] = \"Video\";\n MediaTypeSelection[MediaTypeSelection[\"All\"] = 2] = \"All\";\n})(MediaTypeSelection || (MediaTypeSelection = {}));\nexport var EncodingType;\n(function (EncodingType) {\n EncodingType[EncodingType[\"JPEG\"] = 0] = \"JPEG\";\n EncodingType[EncodingType[\"PNG\"] = 1] = \"PNG\";\n})(EncodingType || (EncodingType = {}));\n/**\n * Error codes returned by the Camera plugin.\n * These values match the `code` field on rejected promises.\n *\n * @since 8.2.0\n */\nexport var CameraErrorCode;\n(function (CameraErrorCode) {\n // Permissions\n /**\n * Camera access was denied by the user.\n */\n CameraErrorCode[\"CameraPermissionDenied\"] = \"OS-PLUG-CAMR-0003\";\n /**\n * Photo library / gallery access was denied by the user.\n */\n CameraErrorCode[\"GalleryPermissionDenied\"] = \"OS-PLUG-CAMR-0005\";\n /**\n * No camera hardware is available on the device.\n */\n CameraErrorCode[\"NoCameraAvailable\"] = \"OS-PLUG-CAMR-0007\";\n // Take Photo\n /**\n * The user cancelled the take photo action.\n */\n CameraErrorCode[\"TakePhotoCancelled\"] = \"OS-PLUG-CAMR-0006\";\n /**\n * Failed to take photo.\n */\n CameraErrorCode[\"TakePhotoFailed\"] = \"OS-PLUG-CAMR-0010\";\n /**\n * The take photo action received invalid arguments.\n * @platform ios\n */\n CameraErrorCode[\"TakePhotoInvalidArguments\"] = \"OS-PLUG-CAMR-0014\";\n // Edit Photo\n /**\n * The selected file contains invalid image data.\n * @platform ios\n */\n CameraErrorCode[\"InvalidImageData\"] = \"OS-PLUG-CAMR-0008\";\n /**\n * Failed to edit image.\n */\n CameraErrorCode[\"EditPhotoFailed\"] = \"OS-PLUG-CAMR-0009\";\n /**\n * The user cancelled the edit photo action.\n */\n CameraErrorCode[\"EditPhotoCancelled\"] = \"OS-PLUG-CAMR-0013\";\n /**\n * The URI parameter for editing is empty.\n * @platform android\n */\n CameraErrorCode[\"EditPhotoEmptyUri\"] = \"OS-PLUG-CAMR-0024\";\n // Choose from Gallery\n /**\n * Failed to retrieve an image from the gallery.\n */\n CameraErrorCode[\"ImageNotFound\"] = \"OS-PLUG-CAMR-0011\";\n /**\n * Failed to process the selected image.\n */\n CameraErrorCode[\"ProcessImageFailed\"] = \"OS-PLUG-CAMR-0012\";\n /**\n * Failed to choose media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaFailed\"] = \"OS-PLUG-CAMR-0018\";\n /**\n * The user cancelled choosing media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaCancelled\"] = \"OS-PLUG-CAMR-0020\";\n /**\n * Failed to retrieve the media file path.\n * @platform android\n */\n CameraErrorCode[\"MediaPathError\"] = \"OS-PLUG-CAMR-0021\";\n /**\n * Failed to retrieve an image from the provided URI.\n */\n CameraErrorCode[\"FetchImageFromUriFailed\"] = \"OS-PLUG-CAMR-0028\";\n // Record Video\n /**\n * Failed to record video.\n */\n CameraErrorCode[\"RecordVideoFailed\"] = \"OS-PLUG-CAMR-0016\";\n /**\n * The user cancelled the video recording.\n */\n CameraErrorCode[\"RecordVideoCancelled\"] = \"OS-PLUG-CAMR-0017\";\n /**\n * Failed to retrieve a video from the gallery.\n * @platform ios\n */\n CameraErrorCode[\"VideoNotFound\"] = \"OS-PLUG-CAMR-0025\";\n // Play Video\n /**\n * Failed to play video.\n */\n CameraErrorCode[\"PlayVideoFailed\"] = \"OS-PLUG-CAMR-0023\";\n // General\n /**\n * Failed to encode the media result.\n * @platform ios\n */\n CameraErrorCode[\"EncodeResultFailed\"] = \"OS-PLUG-CAMR-0019\";\n /**\n * The selected file does not exist.\n */\n CameraErrorCode[\"FileNotFound\"] = \"OS-PLUG-CAMR-0027\";\n /**\n * Invalid argument provided to a plugin method.\n * @platform android\n */\n CameraErrorCode[\"InvalidArgument\"] = \"OS-PLUG-CAMR-0031\";\n /**\n * A general plugin error occurred.\n * @platform ios\n */\n CameraErrorCode[\"GeneralError\"] = \"OS-PLUG-CAMR-0026\";\n})(CameraErrorCode || (CameraErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { WebPlugin, CapacitorException } from '@capacitor/core';\nimport { CameraSource, CameraDirection, MediaType, MediaTypeSelection } from './definitions';\nexport class CameraWeb extends WebPlugin {\n async takePhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput) {\n this.takePhotoCameraInputExperience(options, resolve, reject);\n }\n else {\n this.takePhotoCameraExperience(options, resolve, reject);\n }\n });\n }\n async recordVideo(_options) {\n throw this.unimplemented('recordVideo is not implemented on Web.');\n }\n async playVideo(_options) {\n throw this.unimplemented('playVideo is not implemented on Web.');\n }\n async chooseFromGallery(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.galleryInputExperience(options, resolve, reject);\n });\n }\n async editPhoto(_options) {\n throw this.unimplemented('editPhoto is not implemented on Web.');\n }\n async editURIPhoto(_options) {\n throw this.unimplemented('editURIPhoto is not implemented on Web.');\n }\n async getPhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput || options.source === CameraSource.Photos) {\n this.fileInputExperience(options, resolve, reject);\n }\n else if (options.source === CameraSource.Prompt) {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.promptLabelHeader || 'Photo';\n actionSheet.cancelable = false;\n actionSheet.options = [\n { title: options.promptLabelPhoto || 'From Photos' },\n { title: options.promptLabelPicture || 'Take Picture' },\n ];\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n if (selection === 0) {\n this.fileInputExperience(options, resolve, reject);\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n async pickImages(_options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.multipleFileInputExperience(resolve, reject);\n });\n }\n async cameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.direction, (photo) => this._getCameraPhoto(photo, options), () => this.fileInputExperience(options, resolve, reject), resolve, reject);\n }\n fileInputExperience(options, resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input';\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const file = input.files[0];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n if (options.resultType === 'dataUrl' || options.resultType === 'base64') {\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: reader.result,\n format,\n });\n }\n else if (options.resultType === 'base64') {\n const b64 = reader.result.split(',')[1];\n resolve({\n base64String: b64,\n format,\n });\n }\n cleanup();\n });\n reader.readAsDataURL(file);\n }\n else {\n resolve({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n cleanup();\n }\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.capture = true;\n if (options.source === CameraSource.Photos || options.source === CameraSource.Prompt) {\n input.removeAttribute('capture');\n }\n else if (options.direction === CameraDirection.Front) {\n input.capture = 'user';\n }\n else if (options.direction === CameraDirection.Rear) {\n input.capture = 'environment';\n }\n input.click();\n }\n multipleFileInputExperience(resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input-multiple');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input-multiple';\n input.type = 'file';\n input.hidden = true;\n input.multiple = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const photos = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n photos.push({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n }\n resolve({ photos });\n cleanup();\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.click();\n }\n _getCameraPhoto(photo, options) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n const format = this._getFileFormat(photo);\n if (options.resultType === 'uri') {\n resolve({\n webPath: URL.createObjectURL(photo),\n format,\n saved: false,\n });\n }\n else {\n reader.readAsDataURL(photo);\n reader.onloadend = () => {\n const r = reader.result;\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: r,\n format,\n saved: false,\n });\n }\n else {\n resolve({\n base64String: r.split(',')[1],\n format,\n saved: false,\n });\n }\n };\n reader.onerror = (e) => {\n reject(e);\n };\n }\n });\n }\n async takePhotoCameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.cameraDirection, (photo) => { var _a; return this._buildPhotoMediaResult(photo, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false); }, () => this.takePhotoCameraInputExperience(options, resolve, reject), resolve, reject);\n }\n takePhotoCameraInputExperience(options, resolve, reject) {\n const input = this._createFileInput('_capacitor-camera-input-takephoto');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const file = input.files[0];\n resolve(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n input.accept = 'image/*';\n if (options.cameraDirection === CameraDirection.Front) {\n input.capture = 'user';\n }\n else {\n // CameraDirection.Rear\n input.capture = 'environment';\n }\n input.click();\n }\n galleryInputExperience(options, resolve, reject) {\n var _a, _b;\n const input = this._createFileInput('_capacitor-camera-input-gallery');\n input.multiple = (_a = options.allowMultipleSelection) !== null && _a !== void 0 ? _a : false;\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const results = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n if (file.type.startsWith('image/')) {\n results.push(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n }\n else if (file.type.startsWith('video/')) {\n const format = this._getFileFormat(file);\n let thumbnail;\n let resolution;\n let duration;\n try {\n const videoInfo = await this._getVideoMetadata(file);\n thumbnail = videoInfo.thumbnail;\n if (options.includeMetadata) {\n resolution = videoInfo.resolution;\n duration = videoInfo.duration;\n }\n }\n catch (e) {\n console.warn('Failed to get video metadata:', e);\n }\n const result = {\n type: MediaType.Video,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (options.includeMetadata) {\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: new Date(file.lastModified).toISOString(),\n duration,\n };\n }\n results.push(result);\n }\n }\n resolve({ results });\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n // Set accept attribute based on mediaType\n const mediaType = (_b = options.mediaType) !== null && _b !== void 0 ? _b : MediaTypeSelection.Photo;\n if (mediaType === MediaTypeSelection.Photo) {\n input.accept = 'image/*';\n }\n else if (mediaType === MediaTypeSelection.Video) {\n input.accept = 'video/*';\n }\n else {\n // MediaTypeSelection.All\n input.accept = 'image/*,video/*';\n }\n input.click();\n }\n _getFileFormat(file) {\n if (file.type === 'image/png') {\n return 'png';\n }\n else if (file.type === 'image/gif') {\n return 'gif';\n }\n else if (file.type.startsWith('video/')) {\n return file.type.split('/')[1];\n }\n else if (file.type.startsWith('image/')) {\n return 'jpeg';\n }\n return file.type.split('/')[1] || 'jpeg';\n }\n async _buildPhotoMediaResult(file, includeMetadata) {\n const format = this._getFileFormat(file);\n const thumbnail = await this._getBase64FromFile(file);\n const result = {\n type: MediaType.Photo,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (includeMetadata) {\n const resolution = await this._getImageResolution(file);\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: 'lastModified' in file ? new Date(file.lastModified).toISOString() : new Date().toISOString(),\n };\n }\n return result;\n }\n _validateFileInput(input, reject, cleanup) {\n if (!input.files || input.files.length === 0) {\n const message = input.multiple ? 'No files selected' : 'No file selected';\n reject(new CapacitorException(message));\n cleanup();\n return false;\n }\n return true;\n }\n async _setupPWACameraModal(cameraDirection, onPhotoCallback, fallbackCallback, resolve, reject) {\n if (customElements.get('pwa-camera-modal')) {\n const cameraModal = document.createElement('pwa-camera-modal');\n cameraModal.facingMode = cameraDirection === CameraDirection.Front ? 'user' : 'environment';\n document.body.appendChild(cameraModal);\n try {\n await cameraModal.componentOnReady();\n cameraModal.addEventListener('onPhoto', async (e) => {\n const photo = e.detail;\n if (photo === null) {\n reject(new CapacitorException('User cancelled photos app'));\n }\n else if (photo instanceof Error) {\n reject(photo);\n }\n else {\n resolve(await onPhotoCallback(photo));\n }\n cameraModal.dismiss();\n document.body.removeChild(cameraModal);\n });\n cameraModal.present();\n }\n catch (e) {\n fallbackCallback();\n }\n }\n else {\n console.error(`Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements.`);\n fallbackCallback();\n }\n }\n _createFileInput(id) {\n let input = document.querySelector(`#${id}`);\n if (!input) {\n input = document.createElement('input');\n input.id = id;\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n }\n return input;\n }\n async _getImageResolution(image) {\n try {\n const bitmap = await createImageBitmap(image);\n const resolution = `${bitmap.width}x${bitmap.height}`;\n bitmap.close();\n return resolution;\n }\n catch (e) {\n console.warn('Failed to get image resolution:', e);\n return undefined;\n }\n }\n _getBase64FromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const dataUrl = reader.result;\n const base64 = dataUrl.split(',')[1];\n resolve(base64);\n };\n reader.onerror = (e) => {\n reject(e);\n };\n reader.readAsDataURL(file);\n });\n }\n _getVideoMetadata(videoFile) {\n return new Promise((resolve) => {\n const video = document.createElement('video');\n video.preload = 'metadata';\n video.muted = true;\n video.onloadedmetadata = () => {\n // Seek to 1 second or 10% of duration to capture thumbnail\n const seekTime = Math.min(1, video.duration * 0.1);\n video.currentTime = seekTime;\n };\n video.onseeked = () => {\n const result = {\n resolution: `${video.videoWidth}x${video.videoHeight}`,\n duration: video.duration,\n };\n try {\n const canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n const ctx = canvas.getContext('2d');\n if (ctx) {\n ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n result.thumbnail = canvas.toDataURL('image/jpeg', 0.8).split(',')[1];\n }\n }\n catch (e) {\n console.warn('Failed to generate video thumbnail:', e);\n }\n URL.revokeObjectURL(video.src);\n resolve(result);\n };\n video.onerror = () => {\n // Clean up and return defaults\n URL.revokeObjectURL(video.src);\n resolve({});\n };\n video.src = URL.createObjectURL(videoFile);\n });\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query\n // the specific permissions that are supported varies among browsers that implement the\n // permissions API, so we need a try/catch in case 'camera' is invalid\n const permission = await window.navigator.permissions.query({\n name: 'camera',\n });\n return {\n camera: permission.state,\n photos: 'granted',\n };\n }\n catch (_a) {\n throw this.unavailable('Camera permissions are not available in this browser');\n }\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async pickLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n async getLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n}\nconst Camera = new CameraWeb();\nexport { Camera };\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CameraWeb } from './web';\nconst Camera = registerPlugin('Camera', {\n web: () => new CameraWeb(),\n});\nexport * from './definitions';\nexport { Camera };\n//# sourceMappingURL=index.js.map"],"names":["CameraSource","CameraDirection","CameraResultType","MediaType","MediaTypeSelection","EncodingType","CameraErrorCode","WebPlugin","CapacitorException","registerPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;AACWA;IACX,CAAC,UAAU,YAAY,EAAE;IACzB;IACA;IACA;IACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACrC;IACA;IACA;IACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACrC;IACA;IACA;IACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACrC,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;IACX,CAAC,UAAU,eAAe,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":["esm/definitions.js","esm/web.js","esm/index.js"],"sourcesContent":["/**\n * @deprecated This enum is only meant to be used for deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraSource;\n(function (CameraSource) {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n CameraSource[\"Prompt\"] = \"PROMPT\";\n /**\n * Take a new photo using the camera.\n */\n CameraSource[\"Camera\"] = \"CAMERA\";\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n CameraSource[\"Photos\"] = \"PHOTOS\";\n})(CameraSource || (CameraSource = {}));\nexport var CameraDirection;\n(function (CameraDirection) {\n CameraDirection[\"Rear\"] = \"REAR\";\n CameraDirection[\"Front\"] = \"FRONT\";\n})(CameraDirection || (CameraDirection = {}));\n/**\n * @deprecated This enum is only meant to be used for `ImageOptions` in deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport var CameraResultType;\n(function (CameraResultType) {\n CameraResultType[\"Uri\"] = \"uri\";\n CameraResultType[\"Base64\"] = \"base64\";\n CameraResultType[\"DataUrl\"] = \"dataUrl\";\n})(CameraResultType || (CameraResultType = {}));\nexport var MediaType;\n(function (MediaType) {\n MediaType[MediaType[\"Photo\"] = 0] = \"Photo\";\n MediaType[MediaType[\"Video\"] = 1] = \"Video\";\n})(MediaType || (MediaType = {}));\nexport var MediaTypeSelection;\n(function (MediaTypeSelection) {\n MediaTypeSelection[MediaTypeSelection[\"Photo\"] = 0] = \"Photo\";\n MediaTypeSelection[MediaTypeSelection[\"Video\"] = 1] = \"Video\";\n MediaTypeSelection[MediaTypeSelection[\"All\"] = 2] = \"All\";\n})(MediaTypeSelection || (MediaTypeSelection = {}));\nexport var EncodingType;\n(function (EncodingType) {\n EncodingType[EncodingType[\"JPEG\"] = 0] = \"JPEG\";\n EncodingType[EncodingType[\"PNG\"] = 1] = \"PNG\";\n})(EncodingType || (EncodingType = {}));\n/**\n * Error codes returned by the Camera plugin.\n * These values match the `code` field on rejected promises.\n *\n * @since 8.2.0\n */\nexport var CameraErrorCode;\n(function (CameraErrorCode) {\n // Permissions\n /**\n * Camera access was denied by the user.\n */\n CameraErrorCode[\"CameraPermissionDenied\"] = \"OS-PLUG-CAMR-0003\";\n /**\n * Photo library / gallery access was denied by the user.\n */\n CameraErrorCode[\"GalleryPermissionDenied\"] = \"OS-PLUG-CAMR-0005\";\n /**\n * No camera hardware is available on the device.\n */\n CameraErrorCode[\"NoCameraAvailable\"] = \"OS-PLUG-CAMR-0007\";\n // Take Photo\n /**\n * The user cancelled the take photo action.\n */\n CameraErrorCode[\"TakePhotoCancelled\"] = \"OS-PLUG-CAMR-0006\";\n /**\n * Failed to take photo.\n */\n CameraErrorCode[\"TakePhotoFailed\"] = \"OS-PLUG-CAMR-0010\";\n /**\n * The take photo action received invalid arguments.\n * @platform ios\n */\n CameraErrorCode[\"TakePhotoInvalidArguments\"] = \"OS-PLUG-CAMR-0014\";\n // Edit Photo\n /**\n * The selected file contains invalid image data.\n * @platform ios\n */\n CameraErrorCode[\"InvalidImageData\"] = \"OS-PLUG-CAMR-0008\";\n /**\n * Failed to edit image.\n */\n CameraErrorCode[\"EditPhotoFailed\"] = \"OS-PLUG-CAMR-0009\";\n /**\n * The user cancelled the edit photo action.\n */\n CameraErrorCode[\"EditPhotoCancelled\"] = \"OS-PLUG-CAMR-0013\";\n /**\n * The URI parameter for editing is empty.\n * @platform android\n */\n CameraErrorCode[\"EditPhotoEmptyUri\"] = \"OS-PLUG-CAMR-0024\";\n // Choose from Gallery\n /**\n * Failed to retrieve an image from the gallery.\n */\n CameraErrorCode[\"ImageNotFound\"] = \"OS-PLUG-CAMR-0011\";\n /**\n * Failed to process the selected image.\n */\n CameraErrorCode[\"ProcessImageFailed\"] = \"OS-PLUG-CAMR-0012\";\n /**\n * Failed to choose media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaFailed\"] = \"OS-PLUG-CAMR-0018\";\n /**\n * The user cancelled choosing media from the gallery.\n */\n CameraErrorCode[\"ChooseMediaCancelled\"] = \"OS-PLUG-CAMR-0020\";\n /**\n * Failed to retrieve the media file path.\n * @platform android\n */\n CameraErrorCode[\"MediaPathError\"] = \"OS-PLUG-CAMR-0021\";\n /**\n * Failed to retrieve an image from the provided URI.\n */\n CameraErrorCode[\"FetchImageFromUriFailed\"] = \"OS-PLUG-CAMR-0028\";\n // Record Video\n /**\n * Failed to record video.\n */\n CameraErrorCode[\"RecordVideoFailed\"] = \"OS-PLUG-CAMR-0016\";\n /**\n * The user cancelled the video recording.\n */\n CameraErrorCode[\"RecordVideoCancelled\"] = \"OS-PLUG-CAMR-0017\";\n /**\n * Failed to retrieve a video from the gallery.\n * @platform ios\n */\n CameraErrorCode[\"VideoNotFound\"] = \"OS-PLUG-CAMR-0025\";\n // Play Video\n /**\n * Failed to play video.\n */\n CameraErrorCode[\"PlayVideoFailed\"] = \"OS-PLUG-CAMR-0023\";\n // General\n /**\n * Failed to encode the media result.\n * @platform ios\n */\n CameraErrorCode[\"EncodeResultFailed\"] = \"OS-PLUG-CAMR-0019\";\n /**\n * The selected file does not exist.\n */\n CameraErrorCode[\"FileNotFound\"] = \"OS-PLUG-CAMR-0027\";\n /**\n * Invalid argument provided to a plugin method.\n * @platform android\n */\n CameraErrorCode[\"InvalidArgument\"] = \"OS-PLUG-CAMR-0031\";\n /**\n * A general plugin error occurred.\n * @platform ios\n */\n CameraErrorCode[\"GeneralError\"] = \"OS-PLUG-CAMR-0026\";\n})(CameraErrorCode || (CameraErrorCode = {}));\n//# sourceMappingURL=definitions.js.map","import { WebPlugin, CapacitorException } from '@capacitor/core';\nimport { CameraSource, CameraDirection, MediaType, MediaTypeSelection } from './definitions';\nexport class CameraWeb extends WebPlugin {\n async takePhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput) {\n this.takePhotoCameraInputExperience(options, resolve, reject);\n }\n else {\n this.takePhotoCameraExperience(options, resolve, reject);\n }\n });\n }\n async recordVideo(_options) {\n throw this.unimplemented('recordVideo is not implemented on Web.');\n }\n async playVideo(_options) {\n throw this.unimplemented('playVideo is not implemented on Web.');\n }\n async chooseFromGallery(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.galleryInputExperience(options, resolve, reject);\n });\n }\n async editPhoto(_options) {\n throw this.unimplemented('editPhoto is not implemented on Web.');\n }\n async editURIPhoto(_options) {\n throw this.unimplemented('editURIPhoto is not implemented on Web.');\n }\n async getPhoto(options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n if (options.webUseInput || options.source === CameraSource.Photos) {\n this.fileInputExperience(options, resolve, reject);\n }\n else if (options.source === CameraSource.Prompt) {\n let actionSheet = document.querySelector('pwa-action-sheet');\n if (!actionSheet) {\n actionSheet = document.createElement('pwa-action-sheet');\n document.body.appendChild(actionSheet);\n }\n actionSheet.header = options.promptLabelHeader || 'Photo';\n actionSheet.cancelable = false;\n actionSheet.options = [\n { title: options.promptLabelPhoto || 'From Photos' },\n { title: options.promptLabelPicture || 'Take Picture' },\n ];\n actionSheet.addEventListener('onSelection', async (e) => {\n const selection = e.detail;\n if (selection === 0) {\n this.fileInputExperience(options, resolve, reject);\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n else {\n this.cameraExperience(options, resolve, reject);\n }\n });\n }\n async pickImages(_options) {\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.multipleFileInputExperience(resolve, reject);\n });\n }\n async cameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.direction, (photo) => this._getCameraPhoto(photo, options), () => this.fileInputExperience(options, resolve, reject), resolve, reject);\n }\n fileInputExperience(options, resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input';\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const file = input.files[0];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n if (options.resultType === 'dataUrl' || options.resultType === 'base64') {\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: reader.result,\n format,\n });\n }\n else if (options.resultType === 'base64') {\n const b64 = reader.result.split(',')[1];\n resolve({\n base64String: b64,\n format,\n });\n }\n cleanup();\n });\n reader.readAsDataURL(file);\n }\n else {\n resolve({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n cleanup();\n }\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.capture = true;\n if (options.source === CameraSource.Photos || options.source === CameraSource.Prompt) {\n input.removeAttribute('capture');\n }\n else if (options.direction === CameraDirection.Front) {\n input.capture = 'user';\n }\n else if (options.direction === CameraDirection.Rear) {\n input.capture = 'environment';\n }\n input.click();\n }\n multipleFileInputExperience(resolve, reject) {\n let input = document.querySelector('#_capacitor-camera-input-multiple');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n if (!input) {\n input = document.createElement('input');\n input.id = '_capacitor-camera-input-multiple';\n input.type = 'file';\n input.hidden = true;\n input.multiple = true;\n document.body.appendChild(input);\n input.addEventListener('change', (_e) => {\n const photos = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n let format = 'jpeg';\n if (file.type === 'image/png') {\n format = 'png';\n }\n else if (file.type === 'image/gif') {\n format = 'gif';\n }\n photos.push({\n webPath: URL.createObjectURL(file),\n format: format,\n });\n }\n resolve({ photos });\n cleanup();\n });\n input.addEventListener('cancel', (_e) => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n });\n }\n input.accept = 'image/*';\n input.click();\n }\n _getCameraPhoto(photo, options) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n const format = this._getFileFormat(photo);\n if (options.resultType === 'uri') {\n resolve({\n webPath: URL.createObjectURL(photo),\n format,\n saved: false,\n });\n }\n else {\n reader.readAsDataURL(photo);\n reader.onloadend = () => {\n const r = reader.result;\n if (options.resultType === 'dataUrl') {\n resolve({\n dataUrl: r,\n format,\n saved: false,\n });\n }\n else {\n resolve({\n base64String: r.split(',')[1],\n format,\n saved: false,\n });\n }\n };\n reader.onerror = (e) => {\n reject(e);\n };\n }\n });\n }\n async takePhotoCameraExperience(options, resolve, reject) {\n await this._setupPWACameraModal(options.cameraDirection, (photo) => { var _a; return this._buildPhotoMediaResult(photo, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false); }, () => this.takePhotoCameraInputExperience(options, resolve, reject), resolve, reject);\n }\n takePhotoCameraInputExperience(options, resolve, reject) {\n const input = this._createFileInput('_capacitor-camera-input-takephoto');\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const file = input.files[0];\n resolve(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n input.accept = 'image/*';\n if (options.cameraDirection === CameraDirection.Front) {\n input.capture = 'user';\n }\n else {\n // CameraDirection.Rear\n input.capture = 'environment';\n }\n input.click();\n }\n galleryInputExperience(options, resolve, reject) {\n var _a, _b;\n const input = this._createFileInput('_capacitor-camera-input-gallery');\n input.multiple = (_a = options.allowMultipleSelection) !== null && _a !== void 0 ? _a : false;\n const cleanup = () => {\n var _a;\n (_a = input.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(input);\n };\n input.onchange = async (_e) => {\n var _a;\n if (!this._validateFileInput(input, reject, cleanup)) {\n return;\n }\n const results = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.files.length; i++) {\n const file = input.files[i];\n if (file.type.startsWith('image/')) {\n results.push(await this._buildPhotoMediaResult(file, (_a = options.includeMetadata) !== null && _a !== void 0 ? _a : false));\n }\n else if (file.type.startsWith('video/')) {\n const format = this._getFileFormat(file);\n let thumbnail;\n let resolution;\n let duration;\n try {\n const videoInfo = await this._getVideoMetadata(file);\n thumbnail = videoInfo.thumbnail;\n if (options.includeMetadata) {\n resolution = videoInfo.resolution;\n duration = videoInfo.duration;\n }\n }\n catch (e) {\n console.warn('Failed to get video metadata:', e);\n }\n const result = {\n type: MediaType.Video,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (options.includeMetadata) {\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: new Date(file.lastModified).toISOString(),\n duration,\n };\n }\n results.push(result);\n }\n }\n resolve({ results });\n cleanup();\n };\n input.oncancel = () => {\n reject(new CapacitorException('User cancelled photos app'));\n cleanup();\n };\n // Set accept attribute based on mediaType\n const mediaType = (_b = options.mediaType) !== null && _b !== void 0 ? _b : MediaTypeSelection.Photo;\n if (mediaType === MediaTypeSelection.Photo) {\n input.accept = 'image/*';\n }\n else if (mediaType === MediaTypeSelection.Video) {\n input.accept = 'video/*';\n }\n else {\n // MediaTypeSelection.All\n input.accept = 'image/*,video/*';\n }\n input.click();\n }\n _getFileFormat(file) {\n if (file.type === 'image/png') {\n return 'png';\n }\n else if (file.type === 'image/gif') {\n return 'gif';\n }\n else if (file.type.startsWith('video/')) {\n return file.type.split('/')[1];\n }\n else if (file.type.startsWith('image/')) {\n return 'jpeg';\n }\n return file.type.split('/')[1] || 'jpeg';\n }\n async _buildPhotoMediaResult(file, includeMetadata) {\n const format = this._getFileFormat(file);\n const thumbnail = await this._getBase64FromFile(file);\n const result = {\n type: MediaType.Photo,\n thumbnail,\n webPath: URL.createObjectURL(file),\n saved: false,\n };\n if (includeMetadata) {\n const resolution = await this._getImageResolution(file);\n result.metadata = {\n format,\n resolution,\n size: file.size,\n creationDate: 'lastModified' in file ? new Date(file.lastModified).toISOString() : new Date().toISOString(),\n };\n }\n return result;\n }\n _validateFileInput(input, reject, cleanup) {\n if (!input.files || input.files.length === 0) {\n const message = input.multiple ? 'No files selected' : 'No file selected';\n reject(new CapacitorException(message));\n cleanup();\n return false;\n }\n return true;\n }\n async _setupPWACameraModal(cameraDirection, onPhotoCallback, fallbackCallback, resolve, reject) {\n if (customElements.get('pwa-camera-modal')) {\n const cameraModal = document.createElement('pwa-camera-modal');\n cameraModal.facingMode = cameraDirection === CameraDirection.Front ? 'user' : 'environment';\n document.body.appendChild(cameraModal);\n try {\n await cameraModal.componentOnReady();\n cameraModal.addEventListener('onPhoto', async (e) => {\n const photo = e.detail;\n if (photo === null) {\n reject(new CapacitorException('User cancelled photos app'));\n }\n else if (photo instanceof Error) {\n reject(photo);\n }\n else {\n resolve(await onPhotoCallback(photo));\n }\n cameraModal.dismiss();\n document.body.removeChild(cameraModal);\n });\n cameraModal.present();\n }\n catch (e) {\n fallbackCallback();\n }\n }\n else {\n console.error(`Unable to load PWA Element 'pwa-camera-modal'. See the docs: https://capacitorjs.com/docs/web/pwa-elements.`);\n fallbackCallback();\n }\n }\n _createFileInput(id) {\n let input = document.querySelector(`#${id}`);\n if (!input) {\n input = document.createElement('input');\n input.id = id;\n input.type = 'file';\n input.hidden = true;\n document.body.appendChild(input);\n }\n return input;\n }\n async _getImageResolution(image) {\n try {\n const bitmap = await createImageBitmap(image);\n const resolution = `${bitmap.width}x${bitmap.height}`;\n bitmap.close();\n return resolution;\n }\n catch (e) {\n console.warn('Failed to get image resolution:', e);\n return undefined;\n }\n }\n _getBase64FromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const dataUrl = reader.result;\n const base64 = dataUrl.split(',')[1];\n resolve(base64);\n };\n reader.onerror = (e) => {\n reject(e);\n };\n reader.readAsDataURL(file);\n });\n }\n _getVideoMetadata(videoFile) {\n return new Promise((resolve) => {\n const video = document.createElement('video');\n video.preload = 'metadata';\n video.muted = true;\n video.onloadedmetadata = () => {\n // Seek to 1 second or 10% of duration to capture thumbnail\n const seekTime = Math.min(1, video.duration * 0.1);\n video.currentTime = seekTime;\n };\n video.onseeked = () => {\n const result = {\n resolution: `${video.videoWidth}x${video.videoHeight}`,\n duration: video.duration,\n };\n try {\n const canvas = document.createElement('canvas');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n const ctx = canvas.getContext('2d');\n if (ctx) {\n ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n result.thumbnail = canvas.toDataURL('image/jpeg', 0.8).split(',')[1];\n }\n }\n catch (e) {\n console.warn('Failed to generate video thumbnail:', e);\n }\n URL.revokeObjectURL(video.src);\n resolve(result);\n };\n video.onerror = () => {\n // Clean up and return defaults\n URL.revokeObjectURL(video.src);\n resolve({});\n };\n video.src = URL.createObjectURL(videoFile);\n });\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query\n // the specific permissions that are supported varies among browsers that implement the\n // permissions API, so we need a try/catch in case 'camera' is invalid\n const permission = await window.navigator.permissions.query({\n name: 'camera',\n });\n return {\n camera: permission.state,\n photos: 'granted',\n };\n }\n catch (_a) {\n throw this.unavailable('Camera permissions are not available in this browser');\n }\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async pickLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n async getLimitedLibraryPhotos() {\n throw this.unavailable('Not implemented on web.');\n }\n}\nconst Camera = new CameraWeb();\nexport { Camera };\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CameraWeb } from './web';\nconst Camera = registerPlugin('Camera', {\n web: () => new CameraWeb(),\n});\nexport * from './definitions';\nexport { Camera };\n//# sourceMappingURL=index.js.map"],"names":["CameraSource","CameraDirection","CameraResultType","MediaType","MediaTypeSelection","EncodingType","CameraErrorCode","WebPlugin","CapacitorException","registerPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;AACWA;IACX,CAAC,UAAU,YAAY,EAAE;IACzB;IACA;IACA;IACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACrC;IACA;IACA;IACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACrC;IACA;IACA;IACA,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACrC,CAAC,EAAEA,oBAAY,KAAKA,oBAAY,GAAG,EAAE,CAAC,CAAC;AAC5BC;IACX,CAAC,UAAU,eAAe,EAAE;IAC5B,IAAI,eAAe,CAAC,MAAM,CAAC,GAAG,MAAM;IACpC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,OAAO;IACtC,CAAC,EAAEA,uBAAe,KAAKA,uBAAe,GAAG,EAAE,CAAC,CAAC;IAC7C;IACA;IACA;IACA;AACWC;IACX,CAAC,UAAU,gBAAgB,EAAE;IAC7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,GAAG,KAAK;IACnC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACzC,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC3C,CAAC,EAAEA,wBAAgB,KAAKA,wBAAgB,GAAG,EAAE,CAAC,CAAC;AACpCC;IACX,CAAC,UAAU,SAAS,EAAE;IACtB,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;IAC/C,IAAI,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO;IAC/C,CAAC,EAAEA,iBAAS,KAAKA,iBAAS,GAAG,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C,sDAAsD,CAAC;IAC1F,QAAQ;IACR,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,wBAAwB,GAAG;IACrC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,uBAAuB,GAAG;IACpC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC;IACzD,IAAI;IACJ;IACe,IAAI,SAAS;;ACzfvB,UAAC,MAAM,GAAGC,mBAAc,CAAC,QAAQ,EAAE;IACxC,IAAI,GAAG,EAAE,MAAM,IAAI,SAAS,EAAE;IAC9B,CAAC;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/camera",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.5",
|
|
4
4
|
"description": "The Camera API provides the ability to take a photo with the camera or choose an existing one from the photo album.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|