@capacitor/camera 8.1.0 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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='~> 1.0.0'
16
+ s.dependency 'IONCameraLib', spec='~> 1.0.4'
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: "1.0.0")
14
+ .package(url: "https://github.com/ionic-team/ion-ios-camera.git", from: "1.0.4")
15
15
  ],
16
16
  targets: [
17
17
  .target(
package/README.md CHANGED
@@ -690,7 +690,7 @@ Allows the user to pick multiple pictures from the photo gallery.
690
690
  | **`format`** | <code>string</code> | The format of the image, ex: jpeg, png, mp4. Android and iOS may return 'jpg' instead of 'jpeg'. The format is the same, just with a different name. Please compare against both 'jpeg' and 'jpg' when checking if the format of the returned media is JPEG. Web supports jpeg, png and gif, but the exact availability may vary depending on the browser. gif is only supported for `chooseFromGallery` on Web. | 8.1.0 |
691
691
  | **`resolution`** | <code>string</code> | The resolution of the media, in `&lt;width&gt;x&lt;height&gt;` format. Example: '1920x1080'. | 8.1.0 |
692
692
  | **`creationDate`** | <code>string</code> | The date and time the media was created, in ISO 8601 format. If creation date is not available (e.g. Android 7 and below), the last modified date is returned. For Web, the last modified date is always returned. | 8.1.0 |
693
- | **`exif`** | <code>string</code> | Exif data, if any, retreived from the media item. Only available for <a href="#mediatype">`MediaType.Photo`</a>. Not available on Web. | 8.1.0 |
693
+ | **`exif`** | <code>string</code> | Exif data, if any, retrieved from the media item. Only available for <a href="#mediatype">`MediaType.Photo`</a>. Not available on Web. | 8.1.0 |
694
694
 
695
695
 
696
696
  #### TakePhotoOptions
@@ -75,7 +75,7 @@ repositories {
75
75
  dependencies {
76
76
  implementation fileTree(dir: 'libs', include: ['*.jar'])
77
77
 
78
- implementation 'io.ionic.libs:ioncamera-android:1.0.0'
78
+ implementation 'io.ionic.libs:ioncamera-android:1.0.1'
79
79
 
80
80
  if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
81
81
  implementation "com.capacitorjs:core:$capacitorVersion"
package/dist/docs.json CHANGED
@@ -443,7 +443,7 @@
443
443
  "name": "since"
444
444
  }
445
445
  ],
446
- "docs": "Exif data, if any, retreived from the media item.\nOnly available for `MediaType.Photo`.\nNot available on Web.",
446
+ "docs": "Exif data, if any, retrieved from the media item.\nOnly available for `MediaType.Photo`.\nNot available on Web.",
447
447
  "complexTypes": [],
448
448
  "type": "string | undefined"
449
449
  }
@@ -445,7 +445,7 @@ export interface MediaMetadata {
445
445
  */
446
446
  creationDate?: string;
447
447
  /**
448
- * Exif data, if any, retreived from the media item.
448
+ * Exif data, if any, retrieved from the media item.
449
449
  * Only available for `MediaType.Photo`.
450
450
  * Not available on Web.
451
451
  *
@@ -784,3 +784,115 @@ export type CameraPhoto = Photo;
784
784
  * @since 1.0.0
785
785
  */
786
786
  export type CameraOptions = ImageOptions;
787
+ /**
788
+ * Error codes returned by the Camera plugin.
789
+ * These values match the `code` field on rejected promises.
790
+ *
791
+ * @since 8.2.0
792
+ */
793
+ export declare enum CameraErrorCode {
794
+ /**
795
+ * Camera access was denied by the user.
796
+ */
797
+ CameraPermissionDenied = "OS-PLUG-CAMR-0003",
798
+ /**
799
+ * Photo library / gallery access was denied by the user.
800
+ */
801
+ GalleryPermissionDenied = "OS-PLUG-CAMR-0005",
802
+ /**
803
+ * No camera hardware is available on the device.
804
+ */
805
+ NoCameraAvailable = "OS-PLUG-CAMR-0007",
806
+ /**
807
+ * The user cancelled the take photo action.
808
+ */
809
+ TakePhotoCancelled = "OS-PLUG-CAMR-0006",
810
+ /**
811
+ * Failed to take photo.
812
+ */
813
+ TakePhotoFailed = "OS-PLUG-CAMR-0010",
814
+ /**
815
+ * The take photo action received invalid arguments.
816
+ * @platform ios
817
+ */
818
+ TakePhotoInvalidArguments = "OS-PLUG-CAMR-0014",
819
+ /**
820
+ * The selected file contains invalid image data.
821
+ * @platform ios
822
+ */
823
+ InvalidImageData = "OS-PLUG-CAMR-0008",
824
+ /**
825
+ * Failed to edit image.
826
+ */
827
+ EditPhotoFailed = "OS-PLUG-CAMR-0009",
828
+ /**
829
+ * The user cancelled the edit photo action.
830
+ */
831
+ EditPhotoCancelled = "OS-PLUG-CAMR-0013",
832
+ /**
833
+ * The URI parameter for editing is empty.
834
+ * @platform android
835
+ */
836
+ EditPhotoEmptyUri = "OS-PLUG-CAMR-0024",
837
+ /**
838
+ * Failed to retrieve an image from the gallery.
839
+ */
840
+ ImageNotFound = "OS-PLUG-CAMR-0011",
841
+ /**
842
+ * Failed to process the selected image.
843
+ */
844
+ ProcessImageFailed = "OS-PLUG-CAMR-0012",
845
+ /**
846
+ * Failed to choose media from the gallery.
847
+ */
848
+ ChooseMediaFailed = "OS-PLUG-CAMR-0018",
849
+ /**
850
+ * The user cancelled choosing media from the gallery.
851
+ */
852
+ ChooseMediaCancelled = "OS-PLUG-CAMR-0020",
853
+ /**
854
+ * Failed to retrieve the media file path.
855
+ * @platform android
856
+ */
857
+ MediaPathError = "OS-PLUG-CAMR-0021",
858
+ /**
859
+ * Failed to retrieve an image from the provided URI.
860
+ */
861
+ FetchImageFromUriFailed = "OS-PLUG-CAMR-0028",
862
+ /**
863
+ * Failed to record video.
864
+ */
865
+ RecordVideoFailed = "OS-PLUG-CAMR-0016",
866
+ /**
867
+ * The user cancelled the video recording.
868
+ */
869
+ RecordVideoCancelled = "OS-PLUG-CAMR-0017",
870
+ /**
871
+ * Failed to retrieve a video from the gallery.
872
+ * @platform ios
873
+ */
874
+ VideoNotFound = "OS-PLUG-CAMR-0025",
875
+ /**
876
+ * Failed to play video.
877
+ */
878
+ PlayVideoFailed = "OS-PLUG-CAMR-0023",
879
+ /**
880
+ * Failed to encode the media result.
881
+ * @platform ios
882
+ */
883
+ EncodeResultFailed = "OS-PLUG-CAMR-0019",
884
+ /**
885
+ * The selected file does not exist.
886
+ */
887
+ FileNotFound = "OS-PLUG-CAMR-0027",
888
+ /**
889
+ * Invalid argument provided to a plugin method.
890
+ * @platform android
891
+ */
892
+ InvalidArgument = "OS-PLUG-CAMR-0031",
893
+ /**
894
+ * A general plugin error occurred.
895
+ * @platform ios
896
+ */
897
+ GeneralError = "OS-PLUG-CAMR-0026"
898
+ }
@@ -48,4 +48,124 @@ export var EncodingType;
48
48
  EncodingType[EncodingType["JPEG"] = 0] = "JPEG";
49
49
  EncodingType[EncodingType["PNG"] = 1] = "PNG";
50
50
  })(EncodingType || (EncodingType = {}));
51
+ /**
52
+ * Error codes returned by the Camera plugin.
53
+ * These values match the `code` field on rejected promises.
54
+ *
55
+ * @since 8.2.0
56
+ */
57
+ export var CameraErrorCode;
58
+ (function (CameraErrorCode) {
59
+ // Permissions
60
+ /**
61
+ * Camera access was denied by the user.
62
+ */
63
+ CameraErrorCode["CameraPermissionDenied"] = "OS-PLUG-CAMR-0003";
64
+ /**
65
+ * Photo library / gallery access was denied by the user.
66
+ */
67
+ CameraErrorCode["GalleryPermissionDenied"] = "OS-PLUG-CAMR-0005";
68
+ /**
69
+ * No camera hardware is available on the device.
70
+ */
71
+ CameraErrorCode["NoCameraAvailable"] = "OS-PLUG-CAMR-0007";
72
+ // Take Photo
73
+ /**
74
+ * The user cancelled the take photo action.
75
+ */
76
+ CameraErrorCode["TakePhotoCancelled"] = "OS-PLUG-CAMR-0006";
77
+ /**
78
+ * Failed to take photo.
79
+ */
80
+ CameraErrorCode["TakePhotoFailed"] = "OS-PLUG-CAMR-0010";
81
+ /**
82
+ * The take photo action received invalid arguments.
83
+ * @platform ios
84
+ */
85
+ CameraErrorCode["TakePhotoInvalidArguments"] = "OS-PLUG-CAMR-0014";
86
+ // Edit Photo
87
+ /**
88
+ * The selected file contains invalid image data.
89
+ * @platform ios
90
+ */
91
+ CameraErrorCode["InvalidImageData"] = "OS-PLUG-CAMR-0008";
92
+ /**
93
+ * Failed to edit image.
94
+ */
95
+ CameraErrorCode["EditPhotoFailed"] = "OS-PLUG-CAMR-0009";
96
+ /**
97
+ * The user cancelled the edit photo action.
98
+ */
99
+ CameraErrorCode["EditPhotoCancelled"] = "OS-PLUG-CAMR-0013";
100
+ /**
101
+ * The URI parameter for editing is empty.
102
+ * @platform android
103
+ */
104
+ CameraErrorCode["EditPhotoEmptyUri"] = "OS-PLUG-CAMR-0024";
105
+ // Choose from Gallery
106
+ /**
107
+ * Failed to retrieve an image from the gallery.
108
+ */
109
+ CameraErrorCode["ImageNotFound"] = "OS-PLUG-CAMR-0011";
110
+ /**
111
+ * Failed to process the selected image.
112
+ */
113
+ CameraErrorCode["ProcessImageFailed"] = "OS-PLUG-CAMR-0012";
114
+ /**
115
+ * Failed to choose media from the gallery.
116
+ */
117
+ CameraErrorCode["ChooseMediaFailed"] = "OS-PLUG-CAMR-0018";
118
+ /**
119
+ * The user cancelled choosing media from the gallery.
120
+ */
121
+ CameraErrorCode["ChooseMediaCancelled"] = "OS-PLUG-CAMR-0020";
122
+ /**
123
+ * Failed to retrieve the media file path.
124
+ * @platform android
125
+ */
126
+ CameraErrorCode["MediaPathError"] = "OS-PLUG-CAMR-0021";
127
+ /**
128
+ * Failed to retrieve an image from the provided URI.
129
+ */
130
+ CameraErrorCode["FetchImageFromUriFailed"] = "OS-PLUG-CAMR-0028";
131
+ // Record Video
132
+ /**
133
+ * Failed to record video.
134
+ */
135
+ CameraErrorCode["RecordVideoFailed"] = "OS-PLUG-CAMR-0016";
136
+ /**
137
+ * The user cancelled the video recording.
138
+ */
139
+ CameraErrorCode["RecordVideoCancelled"] = "OS-PLUG-CAMR-0017";
140
+ /**
141
+ * Failed to retrieve a video from the gallery.
142
+ * @platform ios
143
+ */
144
+ CameraErrorCode["VideoNotFound"] = "OS-PLUG-CAMR-0025";
145
+ // Play Video
146
+ /**
147
+ * Failed to play video.
148
+ */
149
+ CameraErrorCode["PlayVideoFailed"] = "OS-PLUG-CAMR-0023";
150
+ // General
151
+ /**
152
+ * Failed to encode the media result.
153
+ * @platform ios
154
+ */
155
+ CameraErrorCode["EncodeResultFailed"] = "OS-PLUG-CAMR-0019";
156
+ /**
157
+ * The selected file does not exist.
158
+ */
159
+ CameraErrorCode["FileNotFound"] = "OS-PLUG-CAMR-0027";
160
+ /**
161
+ * Invalid argument provided to a plugin method.
162
+ * @platform android
163
+ */
164
+ CameraErrorCode["InvalidArgument"] = "OS-PLUG-CAMR-0031";
165
+ /**
166
+ * A general plugin error occurred.
167
+ * @platform ios
168
+ */
169
+ CameraErrorCode["GeneralError"] = "OS-PLUG-CAMR-0026";
170
+ })(CameraErrorCode || (CameraErrorCode = {}));
51
171
  //# sourceMappingURL=definitions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAsyBA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;AACnB,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,kCAAe,CAAA;AACjB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;AACrB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,2CAAS,CAAA;IACT,2CAAS,CAAA;AACX,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,6DAAS,CAAA;IACT,6DAAS,CAAA;IACT,yDAAO,CAAA;AACT,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+CAAQ,CAAA;IACR,6CAAO,CAAA;AACT,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\nexport type CameraPermissionState = PermissionState | 'limited';\n\nexport type CameraPermissionType = 'camera' | 'photos';\n\nexport interface PermissionStatus {\n camera: CameraPermissionState;\n photos: CameraPermissionState;\n}\n\nexport interface CameraPluginPermissions {\n permissions: CameraPermissionType[];\n}\n\nexport interface CameraPlugin {\n /**\n * Open the device's camera and allow the user to take a photo.\n *\n * @since 8.1.0\n */\n takePhoto(options: TakePhotoOptions): Promise<MediaResult>;\n\n /**\n * Open the device's camera and allow the user to record a video.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n recordVideo(options: RecordVideoOptions): Promise<MediaResult>;\n\n /**\n * Open a native video player.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n playVideo(options: PlayVideoOptions): Promise<void>;\n\n /**\n * Allow users to choose pictures, videos, or both, directly from their gallery.\n *\n * @since 8.1.0\n */\n chooseFromGallery(options: ChooseFromGalleryOptions): Promise<MediaResults>;\n\n /**\n * Open an in-app screen to edit a given photo using the provided base64 string.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n editPhoto(options: EditPhotoOptions): Promise<EditPhotoResult>;\n\n /**\n * Open an in-app screen to edit a photo using the provided URI.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n editURIPhoto(options: EditURIPhotoOptions): Promise<MediaResult>;\n\n /**\n * Allows the user to update their limited photo library selection.\n * Returns all the limited photos after the picker dismissal.\n * If instead the user gave full access to the photos it returns an empty array.\n *\n * @since 4.1.0\n */\n pickLimitedLibraryPhotos(): Promise<GalleryPhotos>;\n /**\n * Return an array of photos selected from the limited photo library.\n *\n * @since 4.1.0\n */\n getLimitedLibraryPhotos(): Promise<GalleryPhotos>;\n\n /**\n * Check camera and photo album permissions\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request camera and photo album permissions\n *\n * @since 1.0.0\n */\n requestPermissions(permissions?: CameraPluginPermissions): Promise<PermissionStatus>;\n\n /**\n * Prompt the user to pick a photo from an album, or take a new photo\n * with the camera.\n *\n * @since 1.0.0\n * @deprecated Use `takePhoto` for a camera photo, or `chooseFromGallery` to select from the gallery. For creating a prompt for the user to select which source, use `@capacitor/action-sheet` or any UI component of your choosing. Refer to the Camera API documentation for more information on migrating.\n */\n getPhoto(options: ImageOptions): Promise<Photo>;\n\n /**\n * Allows the user to pick multiple pictures from the photo gallery.\n *\n * @since 1.2.0\n * @deprecated Use `chooseFromGallery` instead. Refer to the Camera API documentation for more information on migrating.\n */\n pickImages(options: GalleryImageOptions): Promise<GalleryPhotos>;\n}\n\nexport interface TakePhotoOptions {\n /**\n * The quality of image to return, from 0-100.\n * Only applicable for `EncodingType.JPEG`.\n * Note: This option is only supported on Android and iOS.\n *\n * @default 100\n * @since 8.1.0\n */\n quality?: number;\n\n /**\n * The target width of photos to apply.\n * Must be a positive number, and used along `targetHeight`.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 8.1.0\n */\n targetWidth?: number;\n\n /**\n * The target width of photos to apply.\n * Must be a positive number, and used along `targetWidth`.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 8.1.0\n */\n targetHeight?: number;\n\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode.\n * Note: This option is only supported on Android and iOS\n * @default true\n *\n * @since 8.1.0\n */\n correctOrientation?: boolean;\n\n /**\n * The encoding type for the captured photo - JPEG or PNG.\n * Note: This option is only supported on Android and iOS.\n * @default EncodingType.JPEG\n *\n * @since 8.1.0\n */\n encodingType?: EncodingType;\n\n /**\n * Whether to save the photo to the gallery.\n * Note: This option is only supported on Android and iOS.\n * @default false\n *\n * @since 8.1.0\n */\n saveToGallery?: boolean;\n\n /**\n * iOS and Web only: The camera direction.\n * @default CameraDirection.Rear\n *\n * @since 8.1.0\n */\n cameraDirection?: CameraDirection;\n\n /**\n * Determines if and how the user can edit the photo.\n * - 'in-app': Use an in-app editor for photo edition.\n * - 'external': Open a separate (platform-specific) native app to handle photo edition, falling back to the in-app editor if none is available. Note: iOS does not support external editing and will use 'in-app' instead.\n * - 'no': No editing allowed.\n * Not available on Web.\n * @default 'no'\n *\n * @since 8.1.0\n */\n editable?: 'in-app' | 'external' | 'no';\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default 'fullscreen'\n *\n * @since 8.1.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Web only: Whether to use the PWA Element experience or file input. The\n * default is to use PWA Elements if installed and fall back to file input.\n * To always use file input, set this to `true`.\n *\n * Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements\n *\n * @since 8.1.0\n */\n webUseInput?: boolean;\n\n /**\n * Whether or not MediaResult should include its metadata.\n * If an error occurs when obtaining the metadata, it will return empty.\n * @default false\n *\n * @since 8.1.0\n */\n includeMetadata?: boolean;\n}\n\nexport interface RecordVideoOptions {\n /**\n * Whether to save the video to the gallery.\n * @default false\n *\n * @since 8.1.0\n */\n saveToGallery?: boolean;\n\n /**\n * Whether or not MediaResult should include its metadata.\n * If an error occurs when obtaining the metadata, it will return empty.\n * @default false\n *\n * @since 8.1.0\n */\n includeMetadata?: boolean;\n\n /**\n * Whether the to store the video in persistent app storage or in temporary cache.\n * If you plan to use the returned `MediaResult#URI` across app launches, you may want to set to true.\n * Otherwise, you can set to false.\n * @default true\n *\n * @since 8.1.0\n */\n isPersistent?: boolean;\n}\n\nexport interface PlayVideoOptions {\n /**\n * The URI of the video to play.\n * You may use the `MediaResult#URI` returned from `recordVideo` or `chooseFromGallery` directly.\n *\n * @since 8.1.0\n */\n uri: string;\n}\n\nexport interface ChooseFromGalleryOptions {\n /**\n * The type of media to select. Can be pictures, videos, or both.\n * @default MediaTypeSelection.Photo\n *\n * @since 8.1.0\n */\n mediaType?: MediaTypeSelection;\n\n /**\n * Whether or not to allow selecting multiple media files from the gallery.\n * @default false\n *\n * @since 8.1.0\n */\n allowMultipleSelection?: boolean;\n\n /**\n * The maximum number of media files that the user can choose.\n * Only applicable if `allowMultipleSelection` is `true`.\n * Any non-positive number will be treated as unlimited.\n * Note: This option is only supported on Android 13+ and iOS.\n * @default 0\n *\n * @since 8.1.0\n */\n limit?: number;\n\n /**\n * Whether or not MediaResult should include its metadata.\n * If an error occurs when obtaining the metadata, it will return empty.\n * @default false\n *\n * @since 8.1.0\n */\n includeMetadata?: boolean;\n\n /**\n * Determines if and how the user can edit the photo.\n * - 'in-app': Use an in-app editor for photo edition.\n * - 'external': Open a separate (platform-specific) native app to handle photo edition, falling back to the in-app editor if none is available. Note: iOS does not support external editing and will use 'in-app' instead.\n * - 'no': No editing allowed.\n * Only applicable for `MediaTypeSelection.Photo` and `allowMultipleSelection` set to `false`.\n * Not available on Web.\n * @default 'no'\n *\n * @since 8.1.0\n */\n editable?: 'in-app' | 'external' | 'no';\n\n /**\n * iOS only: The presentation style of media picker.\n * @default 'fullscreen'\n *\n * @since 8.1.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * The quality of images to return, from 0-100.\n * Only applicable for `MediaType.Photo` and JPEG format.\n * Note: This option is only supported on Android and iOS.\n *\n * @default 100\n * @since 8.1.0\n */\n quality?: number;\n\n /**\n * The target width of photos to apply.\n * Must be a positive number, and used along `targetHeight`.\n * Not applicable when videos are selected.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.0.0\n */\n targetWidth?: number;\n\n /**\n * The target width of photos to apply.\n * Must be a positive number, and used along `targetWidth`.\n * Not applicable when videos are selected.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 8.1.0\n */\n targetHeight?: number;\n\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode.\n * Not applicable when videos are selected.\n * Note: This option is only supported on Android and iOS\n * @default true\n *\n * @since 8.1.0\n */\n correctOrientation?: boolean;\n\n /**\n * Web only: Whether to use the PWA Element experience or file input. The\n * default is to use PWA Elements if installed and fall back to file input.\n * To always use file input, set this to `true`.\n *\n * Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements\n *\n * @since 8.1.0\n */\n webUseInput?: boolean;\n}\n\nexport interface EditURIPhotoOptions {\n /**\n * The URI that contains the photo to edit.\n *\n * @since 8.1.0\n */\n uri: string;\n\n /**\n * Whether to save the edited photo to the gallery.\n * @default false\n *\n * @since 8.1.0\n */\n\n saveToGallery?: boolean;\n\n /**\n * Whether or not MediaResult should include its metadata.\n * If an error occurs when obtaining the metadata, it will return empty.\n * @default false\n *\n * @since 8.1.0\n */\n includeMetadata?: boolean;\n}\n\nexport interface EditPhotoOptions {\n /**\n * The base64 encoded image to edit.\n *\n * @since 8.1.0\n */\n inputImage: string;\n}\n\nexport interface EditPhotoResult {\n /**\n * The edited image, base64 encoded.\n *\n * @since 8.1.0\n */\n outputImage: string;\n}\n\nexport interface MediaResult {\n /**\n * The type of media result. Either `Photo` or `Video`.\n *\n * @since 8.1.0\n */\n type: MediaType;\n\n /**\n * The URI pointing to the media file.\n * Not available on Web. Use `webPath` instead for Web.\n *\n * @since 8.1.0\n */\n uri?: string;\n\n /**\n * Returns the thumbnail of the media, base64 encoded.\n * On Web, for `MediaType.Photo`, the full image is returned here, also base64 encoded.\n * On Web, for `MediaType.Video`, a full-resolution JPEG frame captured from the video is returned, base64 encoded at 80% quality.\n *\n * @since 8.1.0\n */\n thumbnail?: string;\n\n /**\n * Whether if the media was saved to the gallery successfully or not.\n * Only applicable if `saveToGallery` was set to `true` in input options.\n * Otherwise, `false` is always returned for `save`.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n saved: boolean;\n\n /**\n * webPath returns a path that can be used to set the src attribute of a media item for efficient\n * loading and rendering.\n *\n * @since 8.1.0\n */\n webPath?: string;\n\n /**\n * Metadata associated to the media result.\n * Only included if `includeMetadata` was set to `true` in input options.\n *\n * @since 8.1.0\n */\n metadata?: MediaMetadata;\n}\n\nexport interface MediaMetadata {\n /**\n * File size of the media, in bytes.\n *\n * @since 8.1.0\n */\n size?: number;\n\n /**\n * Only applicable for `MediaType.Video` - the duration of the media, in seconds.\n *\n * @since 8.1.0\n */\n duration?: number;\n\n /**\n * The format of the image, ex: jpeg, png, mp4.\n *\n * Android and iOS may return 'jpg' instead of 'jpeg'. The format is the same, just with a different name.\n * Please compare against both 'jpeg' and 'jpg' when checking if the format of the returned media is JPEG.\n * Web supports jpeg, png and gif, but the exact availability may vary depending on the browser.\n * gif is only supported for `chooseFromGallery` on Web.\n *\n * @since 8.1.0\n */\n format: string;\n\n /**\n * The resolution of the media, in `<width>x<height>` format. Example: '1920x1080'.\n *\n * @since 8.1.0\n */\n resolution?: string;\n\n /**\n * The date and time the media was created, in ISO 8601 format.\n * If creation date is not available (e.g. Android 7 and below), the last modified date is returned.\n * For Web, the last modified date is always returned.\n *\n * @since 8.1.0\n */\n creationDate?: string;\n\n /**\n * Exif data, if any, retreived from the media item.\n * Only available for `MediaType.Photo`.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n exif?: string;\n}\n\nexport interface MediaResults {\n /**\n * The list of media results.\n *\n * @since 8.1.0\n */\n results: MediaResult[];\n}\n\n/**\n * @deprecated This interface 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 interface ImageOptions {\n /**\n * The quality of image to return as JPEG, from 0-100\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.0.0\n */\n quality?: number;\n /**\n * Whether to allow the user to crop or make small edits (platform specific).\n * Note: This option is only supported on Android and iOS.\n * On iOS it's only supported for CameraSource.Camera, but not for CameraSource.Photos.\n *\n * @since 1.0.0\n */\n allowEditing?: boolean;\n /**\n * How the data should be returned. Currently, only 'Base64', 'DataUrl' or 'Uri' is supported\n *\n * @since 1.0.0\n */\n resultType: CameraResultType;\n /**\n * Whether to save the photo to the gallery.\n * If the photo was picked from the gallery, it will only be saved if edited.\n * Note: This option is only supported on Android and iOS.\n * @default false\n *\n * @since 1.0.0\n */\n saveToGallery?: boolean;\n /**\n * The desired maximum width of the saved image. The aspect ratio is respected.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.0.0\n */\n width?: number;\n /**\n * The desired maximum height of the saved image. The aspect ratio is respected.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.0.0\n */\n height?: number;\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode.\n * Note: This option is only supported on Android and iOS.\n * @default true\n *\n * @since 1.0.0\n */\n correctOrientation?: boolean;\n /**\n * The source to get the photo from. By default this prompts the user to select\n * either the photo album or take a photo.\n * @default CameraSource.Prompt\n *\n * @since 1.0.0\n */\n source?: CameraSource;\n /**\n * iOS and Web only: The camera direction.\n * @default CameraDirection.Rear\n *\n * @since 1.0.0\n */\n direction?: CameraDirection;\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default 'fullscreen'\n *\n * @since 1.0.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Web only: Whether to use the PWA Element experience or file input. The\n * default is to use PWA Elements if installed and fall back to file input.\n * To always use file input, set this to `true`.\n *\n * Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements\n *\n * @since 1.0.0\n */\n webUseInput?: boolean;\n\n /**\n * Text value to use when displaying the prompt.\n * @default 'Photo'\n *\n * @since 1.0.0\n *\n */\n promptLabelHeader?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * iOS only: The label of the 'cancel' button.\n * @default 'Cancel'\n *\n * @since 1.0.0\n */\n promptLabelCancel?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * The label of the button to select a saved image.\n * @default 'From Photos'\n *\n * @since 1.0.0\n */\n promptLabelPhoto?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * The label of the button to open the camera.\n * @default 'Take Picture'\n *\n * @since 1.0.0\n */\n promptLabelPicture?: string;\n}\n\n/**\n * @deprecated This interface is only meant to be used for received the result of deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport interface Photo {\n /**\n * The base64 encoded string representation of the image, if using CameraResultType.Base64.\n *\n * @since 1.0.0\n */\n base64String?: string;\n /**\n * The url starting with 'data:image/jpeg;base64,' and the base64 encoded string representation of the image, if using CameraResultType.DataUrl.\n *\n * Note: On web, the file format could change depending on the browser.\n * @since 1.0.0\n */\n dataUrl?: string;\n /**\n * If using CameraResultType.Uri, the path will contain a full,\n * platform-specific file URL that can be read later using the Filesystem API.\n *\n * @since 1.0.0\n */\n path?: string;\n /**\n * webPath returns a path that can be used to set the src attribute of an image for efficient\n * loading and rendering.\n *\n * @since 1.0.0\n */\n webPath?: string;\n /**\n * Exif data, if any, retrieved from the image\n *\n * @since 1.0.0\n */\n exif?: any;\n /**\n * The format of the image, ex: jpeg, png, gif.\n *\n * iOS and Android only support jpeg.\n * Web supports jpeg, png and gif, but the exact availability may vary depending on the browser.\n * gif is only supported if `webUseInput` is set to `true` or if `source` is set to `Photos`.\n *\n * @since 1.0.0\n */\n format: string;\n /**\n * Whether if the image was saved to the gallery or not.\n *\n * On Android and iOS, saving to the gallery can fail if the user didn't\n * grant the required permissions.\n * On Web there is no gallery, so always returns false.\n *\n * @since 1.1.0\n */\n saved: boolean;\n}\n\nexport interface GalleryPhotos {\n /**\n * Array of all the picked photos.\n *\n * @since 1.2.0\n */\n photos: GalleryPhoto[];\n}\n\nexport interface GalleryPhoto {\n /**\n * Full, platform-specific file URL that can be read later using the Filesystem API.\n *\n * @since 1.2.0\n */\n path?: string;\n /**\n * webPath returns a path that can be used to set the src attribute of an image for efficient\n * loading and rendering.\n *\n * @since 1.2.0\n */\n webPath: string;\n /**\n * Exif data, if any, retrieved from the image\n *\n * @since 1.2.0\n */\n exif?: any;\n /**\n * The format of the image, ex: jpeg, png, gif.\n *\n * iOS and Android only support jpeg.\n * Web supports jpeg, png and gif.\n *\n * @since 1.2.0\n */\n format: string;\n}\n\n/**\n * @deprecated This interface is only meant to be used for deprecated `pickImages` method.\n * It will be removed in a future major version of the plugin, along with `pickImages`.\n */\nexport interface GalleryImageOptions {\n /**\n * The quality of image to return as JPEG, from 0-100\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.2.0\n */\n quality?: number;\n /**\n * The desired maximum width of the saved image. The aspect ratio is respected.\n *\n * @since 1.2.0\n */\n width?: number;\n /**\n * The desired maximum height of the saved image. The aspect ratio is respected.\n *\n * @since 1.2.0\n */\n height?: number;\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode\n * @default true\n *\n * @since 1.2.0\n */\n correctOrientation?: boolean;\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default 'fullscreen'\n *\n * @since 1.2.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Maximum number of pictures the user will be able to choose.\n * Note: This option is only supported on Android 13+ and iOS.\n *\n * @default 0 (unlimited)\n *\n * @since 1.2.0\n */\n limit?: number;\n}\n\n/**\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 enum CameraSource {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n Prompt = 'PROMPT',\n /**\n * Take a new photo using the camera.\n */\n Camera = 'CAMERA',\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n Photos = 'PHOTOS',\n}\n\nexport enum CameraDirection {\n Rear = 'REAR',\n Front = 'FRONT',\n}\n\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 enum CameraResultType {\n Uri = 'uri',\n Base64 = 'base64',\n DataUrl = 'dataUrl',\n}\n\nexport enum MediaType {\n Photo = 0,\n Video = 1,\n}\n\nexport enum MediaTypeSelection {\n Photo = 0,\n Video = 1,\n All = 2,\n}\n\nexport enum EncodingType {\n JPEG = 0,\n PNG = 1,\n}\n\n/**\n * @deprecated Use `Photo`.\n * @since 1.0.0\n */\nexport type CameraPhoto = Photo;\n\n/**\n * @deprecated Use `ImageOptions`.\n * @since 1.0.0\n */\nexport type CameraOptions = ImageOptions;\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAsyBA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;AACnB,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,kCAAe,CAAA;AACjB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;AACrB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,2CAAS,CAAA;IACT,2CAAS,CAAA;AACX,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,6DAAS,CAAA;IACT,6DAAS,CAAA;IACT,yDAAO,CAAA;AACT,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+CAAQ,CAAA;IACR,6CAAO,CAAA;AACT,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAcD;;;;;GAKG;AACH,MAAM,CAAN,IAAY,eAuIX;AAvID,WAAY,eAAe;IACzB,cAAc;IACd;;OAEG;IACH,+DAA4C,CAAA;IAE5C;;OAEG;IACH,gEAA6C,CAAA;IAE7C;;OAEG;IACH,0DAAuC,CAAA;IAEvC,aAAa;IACb;;OAEG;IACH,2DAAwC,CAAA;IAExC;;OAEG;IACH,wDAAqC,CAAA;IAErC;;;OAGG;IACH,kEAA+C,CAAA;IAE/C,aAAa;IACb;;;OAGG;IACH,yDAAsC,CAAA;IAEtC;;OAEG;IACH,wDAAqC,CAAA;IAErC;;OAEG;IACH,2DAAwC,CAAA;IAExC;;;OAGG;IACH,0DAAuC,CAAA;IAEvC,sBAAsB;IACtB;;OAEG;IACH,sDAAmC,CAAA;IAEnC;;OAEG;IACH,2DAAwC,CAAA;IAExC;;OAEG;IACH,0DAAuC,CAAA;IAEvC;;OAEG;IACH,6DAA0C,CAAA;IAE1C;;;OAGG;IACH,uDAAoC,CAAA;IAEpC;;OAEG;IACH,gEAA6C,CAAA;IAE7C,eAAe;IACf;;OAEG;IACH,0DAAuC,CAAA;IAEvC;;OAEG;IACH,6DAA0C,CAAA;IAE1C;;;OAGG;IACH,sDAAmC,CAAA;IAEnC,aAAa;IACb;;OAEG;IACH,wDAAqC,CAAA;IAErC,UAAU;IACV;;;OAGG;IACH,2DAAwC,CAAA;IAExC;;OAEG;IACH,qDAAkC,CAAA;IAElC;;;OAGG;IACH,wDAAqC,CAAA;IAErC;;;OAGG;IACH,qDAAkC,CAAA;AACpC,CAAC,EAvIW,eAAe,KAAf,eAAe,QAuI1B","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\nexport type CameraPermissionState = PermissionState | 'limited';\n\nexport type CameraPermissionType = 'camera' | 'photos';\n\nexport interface PermissionStatus {\n camera: CameraPermissionState;\n photos: CameraPermissionState;\n}\n\nexport interface CameraPluginPermissions {\n permissions: CameraPermissionType[];\n}\n\nexport interface CameraPlugin {\n /**\n * Open the device's camera and allow the user to take a photo.\n *\n * @since 8.1.0\n */\n takePhoto(options: TakePhotoOptions): Promise<MediaResult>;\n\n /**\n * Open the device's camera and allow the user to record a video.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n recordVideo(options: RecordVideoOptions): Promise<MediaResult>;\n\n /**\n * Open a native video player.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n playVideo(options: PlayVideoOptions): Promise<void>;\n\n /**\n * Allow users to choose pictures, videos, or both, directly from their gallery.\n *\n * @since 8.1.0\n */\n chooseFromGallery(options: ChooseFromGalleryOptions): Promise<MediaResults>;\n\n /**\n * Open an in-app screen to edit a given photo using the provided base64 string.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n editPhoto(options: EditPhotoOptions): Promise<EditPhotoResult>;\n\n /**\n * Open an in-app screen to edit a photo using the provided URI.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n editURIPhoto(options: EditURIPhotoOptions): Promise<MediaResult>;\n\n /**\n * Allows the user to update their limited photo library selection.\n * Returns all the limited photos after the picker dismissal.\n * If instead the user gave full access to the photos it returns an empty array.\n *\n * @since 4.1.0\n */\n pickLimitedLibraryPhotos(): Promise<GalleryPhotos>;\n /**\n * Return an array of photos selected from the limited photo library.\n *\n * @since 4.1.0\n */\n getLimitedLibraryPhotos(): Promise<GalleryPhotos>;\n\n /**\n * Check camera and photo album permissions\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request camera and photo album permissions\n *\n * @since 1.0.0\n */\n requestPermissions(permissions?: CameraPluginPermissions): Promise<PermissionStatus>;\n\n /**\n * Prompt the user to pick a photo from an album, or take a new photo\n * with the camera.\n *\n * @since 1.0.0\n * @deprecated Use `takePhoto` for a camera photo, or `chooseFromGallery` to select from the gallery. For creating a prompt for the user to select which source, use `@capacitor/action-sheet` or any UI component of your choosing. Refer to the Camera API documentation for more information on migrating.\n */\n getPhoto(options: ImageOptions): Promise<Photo>;\n\n /**\n * Allows the user to pick multiple pictures from the photo gallery.\n *\n * @since 1.2.0\n * @deprecated Use `chooseFromGallery` instead. Refer to the Camera API documentation for more information on migrating.\n */\n pickImages(options: GalleryImageOptions): Promise<GalleryPhotos>;\n}\n\nexport interface TakePhotoOptions {\n /**\n * The quality of image to return, from 0-100.\n * Only applicable for `EncodingType.JPEG`.\n * Note: This option is only supported on Android and iOS.\n *\n * @default 100\n * @since 8.1.0\n */\n quality?: number;\n\n /**\n * The target width of photos to apply.\n * Must be a positive number, and used along `targetHeight`.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 8.1.0\n */\n targetWidth?: number;\n\n /**\n * The target width of photos to apply.\n * Must be a positive number, and used along `targetWidth`.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 8.1.0\n */\n targetHeight?: number;\n\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode.\n * Note: This option is only supported on Android and iOS\n * @default true\n *\n * @since 8.1.0\n */\n correctOrientation?: boolean;\n\n /**\n * The encoding type for the captured photo - JPEG or PNG.\n * Note: This option is only supported on Android and iOS.\n * @default EncodingType.JPEG\n *\n * @since 8.1.0\n */\n encodingType?: EncodingType;\n\n /**\n * Whether to save the photo to the gallery.\n * Note: This option is only supported on Android and iOS.\n * @default false\n *\n * @since 8.1.0\n */\n saveToGallery?: boolean;\n\n /**\n * iOS and Web only: The camera direction.\n * @default CameraDirection.Rear\n *\n * @since 8.1.0\n */\n cameraDirection?: CameraDirection;\n\n /**\n * Determines if and how the user can edit the photo.\n * - 'in-app': Use an in-app editor for photo edition.\n * - 'external': Open a separate (platform-specific) native app to handle photo edition, falling back to the in-app editor if none is available. Note: iOS does not support external editing and will use 'in-app' instead.\n * - 'no': No editing allowed.\n * Not available on Web.\n * @default 'no'\n *\n * @since 8.1.0\n */\n editable?: 'in-app' | 'external' | 'no';\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default 'fullscreen'\n *\n * @since 8.1.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Web only: Whether to use the PWA Element experience or file input. The\n * default is to use PWA Elements if installed and fall back to file input.\n * To always use file input, set this to `true`.\n *\n * Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements\n *\n * @since 8.1.0\n */\n webUseInput?: boolean;\n\n /**\n * Whether or not MediaResult should include its metadata.\n * If an error occurs when obtaining the metadata, it will return empty.\n * @default false\n *\n * @since 8.1.0\n */\n includeMetadata?: boolean;\n}\n\nexport interface RecordVideoOptions {\n /**\n * Whether to save the video to the gallery.\n * @default false\n *\n * @since 8.1.0\n */\n saveToGallery?: boolean;\n\n /**\n * Whether or not MediaResult should include its metadata.\n * If an error occurs when obtaining the metadata, it will return empty.\n * @default false\n *\n * @since 8.1.0\n */\n includeMetadata?: boolean;\n\n /**\n * Whether the to store the video in persistent app storage or in temporary cache.\n * If you plan to use the returned `MediaResult#URI` across app launches, you may want to set to true.\n * Otherwise, you can set to false.\n * @default true\n *\n * @since 8.1.0\n */\n isPersistent?: boolean;\n}\n\nexport interface PlayVideoOptions {\n /**\n * The URI of the video to play.\n * You may use the `MediaResult#URI` returned from `recordVideo` or `chooseFromGallery` directly.\n *\n * @since 8.1.0\n */\n uri: string;\n}\n\nexport interface ChooseFromGalleryOptions {\n /**\n * The type of media to select. Can be pictures, videos, or both.\n * @default MediaTypeSelection.Photo\n *\n * @since 8.1.0\n */\n mediaType?: MediaTypeSelection;\n\n /**\n * Whether or not to allow selecting multiple media files from the gallery.\n * @default false\n *\n * @since 8.1.0\n */\n allowMultipleSelection?: boolean;\n\n /**\n * The maximum number of media files that the user can choose.\n * Only applicable if `allowMultipleSelection` is `true`.\n * Any non-positive number will be treated as unlimited.\n * Note: This option is only supported on Android 13+ and iOS.\n * @default 0\n *\n * @since 8.1.0\n */\n limit?: number;\n\n /**\n * Whether or not MediaResult should include its metadata.\n * If an error occurs when obtaining the metadata, it will return empty.\n * @default false\n *\n * @since 8.1.0\n */\n includeMetadata?: boolean;\n\n /**\n * Determines if and how the user can edit the photo.\n * - 'in-app': Use an in-app editor for photo edition.\n * - 'external': Open a separate (platform-specific) native app to handle photo edition, falling back to the in-app editor if none is available. Note: iOS does not support external editing and will use 'in-app' instead.\n * - 'no': No editing allowed.\n * Only applicable for `MediaTypeSelection.Photo` and `allowMultipleSelection` set to `false`.\n * Not available on Web.\n * @default 'no'\n *\n * @since 8.1.0\n */\n editable?: 'in-app' | 'external' | 'no';\n\n /**\n * iOS only: The presentation style of media picker.\n * @default 'fullscreen'\n *\n * @since 8.1.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * The quality of images to return, from 0-100.\n * Only applicable for `MediaType.Photo` and JPEG format.\n * Note: This option is only supported on Android and iOS.\n *\n * @default 100\n * @since 8.1.0\n */\n quality?: number;\n\n /**\n * The target width of photos to apply.\n * Must be a positive number, and used along `targetHeight`.\n * Not applicable when videos are selected.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.0.0\n */\n targetWidth?: number;\n\n /**\n * The target width of photos to apply.\n * Must be a positive number, and used along `targetWidth`.\n * Not applicable when videos are selected.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 8.1.0\n */\n targetHeight?: number;\n\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode.\n * Not applicable when videos are selected.\n * Note: This option is only supported on Android and iOS\n * @default true\n *\n * @since 8.1.0\n */\n correctOrientation?: boolean;\n\n /**\n * Web only: Whether to use the PWA Element experience or file input. The\n * default is to use PWA Elements if installed and fall back to file input.\n * To always use file input, set this to `true`.\n *\n * Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements\n *\n * @since 8.1.0\n */\n webUseInput?: boolean;\n}\n\nexport interface EditURIPhotoOptions {\n /**\n * The URI that contains the photo to edit.\n *\n * @since 8.1.0\n */\n uri: string;\n\n /**\n * Whether to save the edited photo to the gallery.\n * @default false\n *\n * @since 8.1.0\n */\n\n saveToGallery?: boolean;\n\n /**\n * Whether or not MediaResult should include its metadata.\n * If an error occurs when obtaining the metadata, it will return empty.\n * @default false\n *\n * @since 8.1.0\n */\n includeMetadata?: boolean;\n}\n\nexport interface EditPhotoOptions {\n /**\n * The base64 encoded image to edit.\n *\n * @since 8.1.0\n */\n inputImage: string;\n}\n\nexport interface EditPhotoResult {\n /**\n * The edited image, base64 encoded.\n *\n * @since 8.1.0\n */\n outputImage: string;\n}\n\nexport interface MediaResult {\n /**\n * The type of media result. Either `Photo` or `Video`.\n *\n * @since 8.1.0\n */\n type: MediaType;\n\n /**\n * The URI pointing to the media file.\n * Not available on Web. Use `webPath` instead for Web.\n *\n * @since 8.1.0\n */\n uri?: string;\n\n /**\n * Returns the thumbnail of the media, base64 encoded.\n * On Web, for `MediaType.Photo`, the full image is returned here, also base64 encoded.\n * On Web, for `MediaType.Video`, a full-resolution JPEG frame captured from the video is returned, base64 encoded at 80% quality.\n *\n * @since 8.1.0\n */\n thumbnail?: string;\n\n /**\n * Whether if the media was saved to the gallery successfully or not.\n * Only applicable if `saveToGallery` was set to `true` in input options.\n * Otherwise, `false` is always returned for `save`.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n saved: boolean;\n\n /**\n * webPath returns a path that can be used to set the src attribute of a media item for efficient\n * loading and rendering.\n *\n * @since 8.1.0\n */\n webPath?: string;\n\n /**\n * Metadata associated to the media result.\n * Only included if `includeMetadata` was set to `true` in input options.\n *\n * @since 8.1.0\n */\n metadata?: MediaMetadata;\n}\n\nexport interface MediaMetadata {\n /**\n * File size of the media, in bytes.\n *\n * @since 8.1.0\n */\n size?: number;\n\n /**\n * Only applicable for `MediaType.Video` - the duration of the media, in seconds.\n *\n * @since 8.1.0\n */\n duration?: number;\n\n /**\n * The format of the image, ex: jpeg, png, mp4.\n *\n * Android and iOS may return 'jpg' instead of 'jpeg'. The format is the same, just with a different name.\n * Please compare against both 'jpeg' and 'jpg' when checking if the format of the returned media is JPEG.\n * Web supports jpeg, png and gif, but the exact availability may vary depending on the browser.\n * gif is only supported for `chooseFromGallery` on Web.\n *\n * @since 8.1.0\n */\n format: string;\n\n /**\n * The resolution of the media, in `<width>x<height>` format. Example: '1920x1080'.\n *\n * @since 8.1.0\n */\n resolution?: string;\n\n /**\n * The date and time the media was created, in ISO 8601 format.\n * If creation date is not available (e.g. Android 7 and below), the last modified date is returned.\n * For Web, the last modified date is always returned.\n *\n * @since 8.1.0\n */\n creationDate?: string;\n\n /**\n * Exif data, if any, retrieved from the media item.\n * Only available for `MediaType.Photo`.\n * Not available on Web.\n *\n * @since 8.1.0\n */\n exif?: string;\n}\n\nexport interface MediaResults {\n /**\n * The list of media results.\n *\n * @since 8.1.0\n */\n results: MediaResult[];\n}\n\n/**\n * @deprecated This interface 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 interface ImageOptions {\n /**\n * The quality of image to return as JPEG, from 0-100\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.0.0\n */\n quality?: number;\n /**\n * Whether to allow the user to crop or make small edits (platform specific).\n * Note: This option is only supported on Android and iOS.\n * On iOS it's only supported for CameraSource.Camera, but not for CameraSource.Photos.\n *\n * @since 1.0.0\n */\n allowEditing?: boolean;\n /**\n * How the data should be returned. Currently, only 'Base64', 'DataUrl' or 'Uri' is supported\n *\n * @since 1.0.0\n */\n resultType: CameraResultType;\n /**\n * Whether to save the photo to the gallery.\n * If the photo was picked from the gallery, it will only be saved if edited.\n * Note: This option is only supported on Android and iOS.\n * @default false\n *\n * @since 1.0.0\n */\n saveToGallery?: boolean;\n /**\n * The desired maximum width of the saved image. The aspect ratio is respected.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.0.0\n */\n width?: number;\n /**\n * The desired maximum height of the saved image. The aspect ratio is respected.\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.0.0\n */\n height?: number;\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode.\n * Note: This option is only supported on Android and iOS.\n * @default true\n *\n * @since 1.0.0\n */\n correctOrientation?: boolean;\n /**\n * The source to get the photo from. By default this prompts the user to select\n * either the photo album or take a photo.\n * @default CameraSource.Prompt\n *\n * @since 1.0.0\n */\n source?: CameraSource;\n /**\n * iOS and Web only: The camera direction.\n * @default CameraDirection.Rear\n *\n * @since 1.0.0\n */\n direction?: CameraDirection;\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default 'fullscreen'\n *\n * @since 1.0.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Web only: Whether to use the PWA Element experience or file input. The\n * default is to use PWA Elements if installed and fall back to file input.\n * To always use file input, set this to `true`.\n *\n * Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements\n *\n * @since 1.0.0\n */\n webUseInput?: boolean;\n\n /**\n * Text value to use when displaying the prompt.\n * @default 'Photo'\n *\n * @since 1.0.0\n *\n */\n promptLabelHeader?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * iOS only: The label of the 'cancel' button.\n * @default 'Cancel'\n *\n * @since 1.0.0\n */\n promptLabelCancel?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * The label of the button to select a saved image.\n * @default 'From Photos'\n *\n * @since 1.0.0\n */\n promptLabelPhoto?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * The label of the button to open the camera.\n * @default 'Take Picture'\n *\n * @since 1.0.0\n */\n promptLabelPicture?: string;\n}\n\n/**\n * @deprecated This interface is only meant to be used for received the result of deprecated `getPhoto` method.\n * It will be removed in a future major version of the plugin, along with `getPhoto`.\n */\nexport interface Photo {\n /**\n * The base64 encoded string representation of the image, if using CameraResultType.Base64.\n *\n * @since 1.0.0\n */\n base64String?: string;\n /**\n * The url starting with 'data:image/jpeg;base64,' and the base64 encoded string representation of the image, if using CameraResultType.DataUrl.\n *\n * Note: On web, the file format could change depending on the browser.\n * @since 1.0.0\n */\n dataUrl?: string;\n /**\n * If using CameraResultType.Uri, the path will contain a full,\n * platform-specific file URL that can be read later using the Filesystem API.\n *\n * @since 1.0.0\n */\n path?: string;\n /**\n * webPath returns a path that can be used to set the src attribute of an image for efficient\n * loading and rendering.\n *\n * @since 1.0.0\n */\n webPath?: string;\n /**\n * Exif data, if any, retrieved from the image\n *\n * @since 1.0.0\n */\n exif?: any;\n /**\n * The format of the image, ex: jpeg, png, gif.\n *\n * iOS and Android only support jpeg.\n * Web supports jpeg, png and gif, but the exact availability may vary depending on the browser.\n * gif is only supported if `webUseInput` is set to `true` or if `source` is set to `Photos`.\n *\n * @since 1.0.0\n */\n format: string;\n /**\n * Whether if the image was saved to the gallery or not.\n *\n * On Android and iOS, saving to the gallery can fail if the user didn't\n * grant the required permissions.\n * On Web there is no gallery, so always returns false.\n *\n * @since 1.1.0\n */\n saved: boolean;\n}\n\nexport interface GalleryPhotos {\n /**\n * Array of all the picked photos.\n *\n * @since 1.2.0\n */\n photos: GalleryPhoto[];\n}\n\nexport interface GalleryPhoto {\n /**\n * Full, platform-specific file URL that can be read later using the Filesystem API.\n *\n * @since 1.2.0\n */\n path?: string;\n /**\n * webPath returns a path that can be used to set the src attribute of an image for efficient\n * loading and rendering.\n *\n * @since 1.2.0\n */\n webPath: string;\n /**\n * Exif data, if any, retrieved from the image\n *\n * @since 1.2.0\n */\n exif?: any;\n /**\n * The format of the image, ex: jpeg, png, gif.\n *\n * iOS and Android only support jpeg.\n * Web supports jpeg, png and gif.\n *\n * @since 1.2.0\n */\n format: string;\n}\n\n/**\n * @deprecated This interface is only meant to be used for deprecated `pickImages` method.\n * It will be removed in a future major version of the plugin, along with `pickImages`.\n */\nexport interface GalleryImageOptions {\n /**\n * The quality of image to return as JPEG, from 0-100\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.2.0\n */\n quality?: number;\n /**\n * The desired maximum width of the saved image. The aspect ratio is respected.\n *\n * @since 1.2.0\n */\n width?: number;\n /**\n * The desired maximum height of the saved image. The aspect ratio is respected.\n *\n * @since 1.2.0\n */\n height?: number;\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode\n * @default true\n *\n * @since 1.2.0\n */\n correctOrientation?: boolean;\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default 'fullscreen'\n *\n * @since 1.2.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Maximum number of pictures the user will be able to choose.\n * Note: This option is only supported on Android 13+ and iOS.\n *\n * @default 0 (unlimited)\n *\n * @since 1.2.0\n */\n limit?: number;\n}\n\n/**\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 enum CameraSource {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n Prompt = 'PROMPT',\n /**\n * Take a new photo using the camera.\n */\n Camera = 'CAMERA',\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n Photos = 'PHOTOS',\n}\n\nexport enum CameraDirection {\n Rear = 'REAR',\n Front = 'FRONT',\n}\n\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 enum CameraResultType {\n Uri = 'uri',\n Base64 = 'base64',\n DataUrl = 'dataUrl',\n}\n\nexport enum MediaType {\n Photo = 0,\n Video = 1,\n}\n\nexport enum MediaTypeSelection {\n Photo = 0,\n Video = 1,\n All = 2,\n}\n\nexport enum EncodingType {\n JPEG = 0,\n PNG = 1,\n}\n\n/**\n * @deprecated Use `Photo`.\n * @since 1.0.0\n */\nexport type CameraPhoto = Photo;\n\n/**\n * @deprecated Use `ImageOptions`.\n * @since 1.0.0\n */\nexport type CameraOptions = ImageOptions;\n\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 enum CameraErrorCode {\n // Permissions\n /**\n * Camera access was denied by the user.\n */\n CameraPermissionDenied = 'OS-PLUG-CAMR-0003',\n\n /**\n * Photo library / gallery access was denied by the user.\n */\n GalleryPermissionDenied = 'OS-PLUG-CAMR-0005',\n\n /**\n * No camera hardware is available on the device.\n */\n NoCameraAvailable = 'OS-PLUG-CAMR-0007',\n\n // Take Photo\n /**\n * The user cancelled the take photo action.\n */\n TakePhotoCancelled = 'OS-PLUG-CAMR-0006',\n\n /**\n * Failed to take photo.\n */\n TakePhotoFailed = 'OS-PLUG-CAMR-0010',\n\n /**\n * The take photo action received invalid arguments.\n * @platform ios\n */\n TakePhotoInvalidArguments = 'OS-PLUG-CAMR-0014',\n\n // Edit Photo\n /**\n * The selected file contains invalid image data.\n * @platform ios\n */\n InvalidImageData = 'OS-PLUG-CAMR-0008',\n\n /**\n * Failed to edit image.\n */\n EditPhotoFailed = 'OS-PLUG-CAMR-0009',\n\n /**\n * The user cancelled the edit photo action.\n */\n EditPhotoCancelled = 'OS-PLUG-CAMR-0013',\n\n /**\n * The URI parameter for editing is empty.\n * @platform android\n */\n EditPhotoEmptyUri = 'OS-PLUG-CAMR-0024',\n\n // Choose from Gallery\n /**\n * Failed to retrieve an image from the gallery.\n */\n ImageNotFound = 'OS-PLUG-CAMR-0011',\n\n /**\n * Failed to process the selected image.\n */\n ProcessImageFailed = 'OS-PLUG-CAMR-0012',\n\n /**\n * Failed to choose media from the gallery.\n */\n ChooseMediaFailed = 'OS-PLUG-CAMR-0018',\n\n /**\n * The user cancelled choosing media from the gallery.\n */\n ChooseMediaCancelled = 'OS-PLUG-CAMR-0020',\n\n /**\n * Failed to retrieve the media file path.\n * @platform android\n */\n MediaPathError = 'OS-PLUG-CAMR-0021',\n\n /**\n * Failed to retrieve an image from the provided URI.\n */\n FetchImageFromUriFailed = 'OS-PLUG-CAMR-0028',\n\n // Record Video\n /**\n * Failed to record video.\n */\n RecordVideoFailed = 'OS-PLUG-CAMR-0016',\n\n /**\n * The user cancelled the video recording.\n */\n RecordVideoCancelled = 'OS-PLUG-CAMR-0017',\n\n /**\n * Failed to retrieve a video from the gallery.\n * @platform ios\n */\n VideoNotFound = 'OS-PLUG-CAMR-0025',\n\n // Play Video\n /**\n * Failed to play video.\n */\n PlayVideoFailed = 'OS-PLUG-CAMR-0023',\n\n // General\n /**\n * Failed to encode the media result.\n * @platform ios\n */\n EncodeResultFailed = 'OS-PLUG-CAMR-0019',\n\n /**\n * The selected file does not exist.\n */\n FileNotFound = 'OS-PLUG-CAMR-0027',\n\n /**\n * Invalid argument provided to a plugin method.\n * @platform android\n */\n InvalidArgument = 'OS-PLUG-CAMR-0031',\n\n /**\n * A general plugin error occurred.\n * @platform ios\n */\n GeneralError = 'OS-PLUG-CAMR-0026',\n}\n"]}
@@ -52,6 +52,126 @@ exports.EncodingType = void 0;
52
52
  EncodingType[EncodingType["JPEG"] = 0] = "JPEG";
53
53
  EncodingType[EncodingType["PNG"] = 1] = "PNG";
54
54
  })(exports.EncodingType || (exports.EncodingType = {}));
55
+ /**
56
+ * Error codes returned by the Camera plugin.
57
+ * These values match the `code` field on rejected promises.
58
+ *
59
+ * @since 8.2.0
60
+ */
61
+ exports.CameraErrorCode = void 0;
62
+ (function (CameraErrorCode) {
63
+ // Permissions
64
+ /**
65
+ * Camera access was denied by the user.
66
+ */
67
+ CameraErrorCode["CameraPermissionDenied"] = "OS-PLUG-CAMR-0003";
68
+ /**
69
+ * Photo library / gallery access was denied by the user.
70
+ */
71
+ CameraErrorCode["GalleryPermissionDenied"] = "OS-PLUG-CAMR-0005";
72
+ /**
73
+ * No camera hardware is available on the device.
74
+ */
75
+ CameraErrorCode["NoCameraAvailable"] = "OS-PLUG-CAMR-0007";
76
+ // Take Photo
77
+ /**
78
+ * The user cancelled the take photo action.
79
+ */
80
+ CameraErrorCode["TakePhotoCancelled"] = "OS-PLUG-CAMR-0006";
81
+ /**
82
+ * Failed to take photo.
83
+ */
84
+ CameraErrorCode["TakePhotoFailed"] = "OS-PLUG-CAMR-0010";
85
+ /**
86
+ * The take photo action received invalid arguments.
87
+ * @platform ios
88
+ */
89
+ CameraErrorCode["TakePhotoInvalidArguments"] = "OS-PLUG-CAMR-0014";
90
+ // Edit Photo
91
+ /**
92
+ * The selected file contains invalid image data.
93
+ * @platform ios
94
+ */
95
+ CameraErrorCode["InvalidImageData"] = "OS-PLUG-CAMR-0008";
96
+ /**
97
+ * Failed to edit image.
98
+ */
99
+ CameraErrorCode["EditPhotoFailed"] = "OS-PLUG-CAMR-0009";
100
+ /**
101
+ * The user cancelled the edit photo action.
102
+ */
103
+ CameraErrorCode["EditPhotoCancelled"] = "OS-PLUG-CAMR-0013";
104
+ /**
105
+ * The URI parameter for editing is empty.
106
+ * @platform android
107
+ */
108
+ CameraErrorCode["EditPhotoEmptyUri"] = "OS-PLUG-CAMR-0024";
109
+ // Choose from Gallery
110
+ /**
111
+ * Failed to retrieve an image from the gallery.
112
+ */
113
+ CameraErrorCode["ImageNotFound"] = "OS-PLUG-CAMR-0011";
114
+ /**
115
+ * Failed to process the selected image.
116
+ */
117
+ CameraErrorCode["ProcessImageFailed"] = "OS-PLUG-CAMR-0012";
118
+ /**
119
+ * Failed to choose media from the gallery.
120
+ */
121
+ CameraErrorCode["ChooseMediaFailed"] = "OS-PLUG-CAMR-0018";
122
+ /**
123
+ * The user cancelled choosing media from the gallery.
124
+ */
125
+ CameraErrorCode["ChooseMediaCancelled"] = "OS-PLUG-CAMR-0020";
126
+ /**
127
+ * Failed to retrieve the media file path.
128
+ * @platform android
129
+ */
130
+ CameraErrorCode["MediaPathError"] = "OS-PLUG-CAMR-0021";
131
+ /**
132
+ * Failed to retrieve an image from the provided URI.
133
+ */
134
+ CameraErrorCode["FetchImageFromUriFailed"] = "OS-PLUG-CAMR-0028";
135
+ // Record Video
136
+ /**
137
+ * Failed to record video.
138
+ */
139
+ CameraErrorCode["RecordVideoFailed"] = "OS-PLUG-CAMR-0016";
140
+ /**
141
+ * The user cancelled the video recording.
142
+ */
143
+ CameraErrorCode["RecordVideoCancelled"] = "OS-PLUG-CAMR-0017";
144
+ /**
145
+ * Failed to retrieve a video from the gallery.
146
+ * @platform ios
147
+ */
148
+ CameraErrorCode["VideoNotFound"] = "OS-PLUG-CAMR-0025";
149
+ // Play Video
150
+ /**
151
+ * Failed to play video.
152
+ */
153
+ CameraErrorCode["PlayVideoFailed"] = "OS-PLUG-CAMR-0023";
154
+ // General
155
+ /**
156
+ * Failed to encode the media result.
157
+ * @platform ios
158
+ */
159
+ CameraErrorCode["EncodeResultFailed"] = "OS-PLUG-CAMR-0019";
160
+ /**
161
+ * The selected file does not exist.
162
+ */
163
+ CameraErrorCode["FileNotFound"] = "OS-PLUG-CAMR-0027";
164
+ /**
165
+ * Invalid argument provided to a plugin method.
166
+ * @platform android
167
+ */
168
+ CameraErrorCode["InvalidArgument"] = "OS-PLUG-CAMR-0031";
169
+ /**
170
+ * A general plugin error occurred.
171
+ * @platform ios
172
+ */
173
+ CameraErrorCode["GeneralError"] = "OS-PLUG-CAMR-0026";
174
+ })(exports.CameraErrorCode || (exports.CameraErrorCode = {}));
55
175
 
56
176
  class CameraWeb extends core.WebPlugin {
57
177
  async takePhoto(options) {
@@ -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//# 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","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;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GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;AACxE,gBAAgB,IAAI,EAAE,QAAQ;AAC9B,aAAa,CAAC;AACd,YAAY,OAAO;AACnB,gBAAgB,MAAM,EAAE,UAAU,CAAC,KAAK;AACxC,gBAAgB,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;;;;"}
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,IA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C,mBAAc,CAAC,QAAQ,EAAE;AACxC,IAAI,GAAG,EAAE,MAAM,IAAI,SAAS,EAAE;AAC9B,CAAC;;;;"}
package/dist/plugin.js CHANGED
@@ -51,6 +51,126 @@ var capacitorCamera = (function (exports, core) {
51
51
  EncodingType[EncodingType["JPEG"] = 0] = "JPEG";
52
52
  EncodingType[EncodingType["PNG"] = 1] = "PNG";
53
53
  })(exports.EncodingType || (exports.EncodingType = {}));
54
+ /**
55
+ * Error codes returned by the Camera plugin.
56
+ * These values match the `code` field on rejected promises.
57
+ *
58
+ * @since 8.2.0
59
+ */
60
+ exports.CameraErrorCode = void 0;
61
+ (function (CameraErrorCode) {
62
+ // Permissions
63
+ /**
64
+ * Camera access was denied by the user.
65
+ */
66
+ CameraErrorCode["CameraPermissionDenied"] = "OS-PLUG-CAMR-0003";
67
+ /**
68
+ * Photo library / gallery access was denied by the user.
69
+ */
70
+ CameraErrorCode["GalleryPermissionDenied"] = "OS-PLUG-CAMR-0005";
71
+ /**
72
+ * No camera hardware is available on the device.
73
+ */
74
+ CameraErrorCode["NoCameraAvailable"] = "OS-PLUG-CAMR-0007";
75
+ // Take Photo
76
+ /**
77
+ * The user cancelled the take photo action.
78
+ */
79
+ CameraErrorCode["TakePhotoCancelled"] = "OS-PLUG-CAMR-0006";
80
+ /**
81
+ * Failed to take photo.
82
+ */
83
+ CameraErrorCode["TakePhotoFailed"] = "OS-PLUG-CAMR-0010";
84
+ /**
85
+ * The take photo action received invalid arguments.
86
+ * @platform ios
87
+ */
88
+ CameraErrorCode["TakePhotoInvalidArguments"] = "OS-PLUG-CAMR-0014";
89
+ // Edit Photo
90
+ /**
91
+ * The selected file contains invalid image data.
92
+ * @platform ios
93
+ */
94
+ CameraErrorCode["InvalidImageData"] = "OS-PLUG-CAMR-0008";
95
+ /**
96
+ * Failed to edit image.
97
+ */
98
+ CameraErrorCode["EditPhotoFailed"] = "OS-PLUG-CAMR-0009";
99
+ /**
100
+ * The user cancelled the edit photo action.
101
+ */
102
+ CameraErrorCode["EditPhotoCancelled"] = "OS-PLUG-CAMR-0013";
103
+ /**
104
+ * The URI parameter for editing is empty.
105
+ * @platform android
106
+ */
107
+ CameraErrorCode["EditPhotoEmptyUri"] = "OS-PLUG-CAMR-0024";
108
+ // Choose from Gallery
109
+ /**
110
+ * Failed to retrieve an image from the gallery.
111
+ */
112
+ CameraErrorCode["ImageNotFound"] = "OS-PLUG-CAMR-0011";
113
+ /**
114
+ * Failed to process the selected image.
115
+ */
116
+ CameraErrorCode["ProcessImageFailed"] = "OS-PLUG-CAMR-0012";
117
+ /**
118
+ * Failed to choose media from the gallery.
119
+ */
120
+ CameraErrorCode["ChooseMediaFailed"] = "OS-PLUG-CAMR-0018";
121
+ /**
122
+ * The user cancelled choosing media from the gallery.
123
+ */
124
+ CameraErrorCode["ChooseMediaCancelled"] = "OS-PLUG-CAMR-0020";
125
+ /**
126
+ * Failed to retrieve the media file path.
127
+ * @platform android
128
+ */
129
+ CameraErrorCode["MediaPathError"] = "OS-PLUG-CAMR-0021";
130
+ /**
131
+ * Failed to retrieve an image from the provided URI.
132
+ */
133
+ CameraErrorCode["FetchImageFromUriFailed"] = "OS-PLUG-CAMR-0028";
134
+ // Record Video
135
+ /**
136
+ * Failed to record video.
137
+ */
138
+ CameraErrorCode["RecordVideoFailed"] = "OS-PLUG-CAMR-0016";
139
+ /**
140
+ * The user cancelled the video recording.
141
+ */
142
+ CameraErrorCode["RecordVideoCancelled"] = "OS-PLUG-CAMR-0017";
143
+ /**
144
+ * Failed to retrieve a video from the gallery.
145
+ * @platform ios
146
+ */
147
+ CameraErrorCode["VideoNotFound"] = "OS-PLUG-CAMR-0025";
148
+ // Play Video
149
+ /**
150
+ * Failed to play video.
151
+ */
152
+ CameraErrorCode["PlayVideoFailed"] = "OS-PLUG-CAMR-0023";
153
+ // General
154
+ /**
155
+ * Failed to encode the media result.
156
+ * @platform ios
157
+ */
158
+ CameraErrorCode["EncodeResultFailed"] = "OS-PLUG-CAMR-0019";
159
+ /**
160
+ * The selected file does not exist.
161
+ */
162
+ CameraErrorCode["FileNotFound"] = "OS-PLUG-CAMR-0027";
163
+ /**
164
+ * Invalid argument provided to a plugin method.
165
+ * @platform android
166
+ */
167
+ CameraErrorCode["InvalidArgument"] = "OS-PLUG-CAMR-0031";
168
+ /**
169
+ * A general plugin error occurred.
170
+ * @platform ios
171
+ */
172
+ CameraErrorCode["GeneralError"] = "OS-PLUG-CAMR-0026";
173
+ })(exports.CameraErrorCode || (exports.CameraErrorCode = {}));
54
174
 
55
175
  class CameraWeb extends core.WebPlugin {
56
176
  async takePhoto(options) {
@@ -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//# 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","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,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,OAAO,EAAE,EAAE;IACnB,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,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;;;;;;;;;;"}
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,EAAE;IAC5B,IAAI,eAAe,CAAC,MAAM,CAAC,GAAG,MAAM;IACpC,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,OAAO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C,SAAS,CAAC;IACtD,QAAQ,CAAC,CAAC;IACV,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;IACxE,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,+CAA+C,CAAC;IACnF,QAAQ;IACR,QAAQ,IAAI;IACZ;IACA;IACA;IACA,YAAY,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;IACxE,gBAAgB,IAAI,EAAE,QAAQ;IAC9B,aAAa,CAAC;IACd,YAAY,OAAO;IACnB,gBAAgB,MAAM,EAAE,UAAU,CAAC,KAAK;IACxC,gBAAgB,MAAM,EAAE,SAAS;IACjC,aAAa;IACb,QAAQ;IACR,QAAQ,OAAO,EAAE,EAAE;IACnB,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,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.1.0",
3
+ "version": "8.2.0",
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",