capacitor-community-multilens-camerapreview 0.0.11-a → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CapacitorCommunityMultilensCamerapreview.podspec +17 -17
  2. package/README.md +16 -26
  3. package/android/build.gradle +55 -55
  4. package/android/src/main/AndroidManifest.xml +4 -4
  5. package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraActivity.java +1008 -1008
  6. package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +544 -544
  7. package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomSurfaceView.java +23 -23
  8. package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomTextureView.java +29 -29
  9. package/android/src/main/java/com/ahm/capacitor/camera/preview/Preview.java +386 -386
  10. package/android/src/main/java/com/ahm/capacitor/camera/preview/TapGestureDetector.java +24 -24
  11. package/android/src/main/res/layout/bridge_layout_main.xml +15 -15
  12. package/android/src/main/res/layout/camera_activity.xml +68 -68
  13. package/android/src/main/res/values/camera_ids.xml +4 -4
  14. package/android/src/main/res/values/camera_theme.xml +9 -9
  15. package/android/src/main/res/values/colors.xml +3 -3
  16. package/android/src/main/res/values/strings.xml +3 -3
  17. package/android/src/main/res/values/styles.xml +3 -3
  18. package/dist/docs.json +1 -11
  19. package/dist/esm/definitions.d.ts +80 -81
  20. package/dist/esm/definitions.js +1 -1
  21. package/dist/esm/definitions.js.map +1 -1
  22. package/dist/esm/index.d.ts +4 -4
  23. package/dist/esm/index.js +6 -6
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/web.d.ts +28 -29
  26. package/dist/esm/web.js +155 -158
  27. package/dist/esm/web.js.map +1 -1
  28. package/dist/plugin.cjs.js +149 -152
  29. package/dist/plugin.cjs.js.map +1 -1
  30. package/dist/plugin.js +149 -152
  31. package/dist/plugin.js.map +1 -1
  32. package/ios/Plugin/CameraController.swift +733 -783
  33. package/ios/Plugin/Info.plist +24 -24
  34. package/ios/Plugin/Plugin.h +10 -10
  35. package/ios/Plugin/Plugin.m +18 -19
  36. package/ios/Plugin/Plugin.swift +308 -316
  37. package/package.json +78 -78
package/dist/plugin.js CHANGED
@@ -1,160 +1,157 @@
1
1
  var capacitorCameraPreview = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
- const CameraPreview$1 = core.registerPlugin('CameraPreview', {
5
- web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CameraPreviewWeb()),
4
+ const CameraPreview$1 = core.registerPlugin('CameraPreview', {
5
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CameraPreviewWeb()),
6
6
  });
7
7
 
8
- /* eslint-disable @typescript-eslint/no-unused-vars */
9
- class CameraPreviewWeb extends core.WebPlugin {
10
- constructor() {
11
- super({
12
- name: 'CameraPreview',
13
- platforms: ['web'],
14
- });
15
- /**
16
- * track which camera is used based on start options
17
- * used in capture
18
- */
19
- this.isBackCamera = false;
20
- }
21
- async start(options) {
22
- return new Promise(async (resolve, reject) => {
23
- var _a;
24
- await navigator.mediaDevices
25
- .getUserMedia({
26
- audio: !options.disableAudio,
27
- video: true
28
- })
29
- .then((stream) => {
30
- // Stop any existing stream so we can request media with different constraints based on user input
31
- stream.getTracks().forEach((track) => track.stop());
32
- })
33
- .catch((error) => {
34
- reject(error);
35
- });
36
- const video = document.getElementById('video');
37
- const parent = document.getElementById(options.parent);
38
- if (!video) {
39
- const videoElement = document.createElement('video');
40
- videoElement.id = 'video';
41
- videoElement.setAttribute('class', options.className || '');
42
- // Don't flip video feed if camera is rear facing
43
- if (options.position !== 'rear') {
44
- videoElement.setAttribute('style', '-webkit-transform: scaleX(-1); transform: scaleX(-1);');
45
- }
46
- const userAgent = navigator.userAgent.toLowerCase();
47
- const isSafari = userAgent.includes('safari') && !userAgent.includes('chrome');
48
- // Safari on iOS needs to have the autoplay, muted and playsinline attributes set for video.play() to be successful
49
- // Without these attributes videoElement.play() will throw a NotAllowedError
50
- // https://developer.apple.com/documentation/webkit/delivering_video_content_for_safari
51
- if (isSafari) {
52
- videoElement.setAttribute('autoplay', 'true');
53
- videoElement.setAttribute('muted', 'true');
54
- videoElement.setAttribute('playsinline', 'true');
55
- }
56
- if (parent) {
57
- parent.appendChild(videoElement);
58
- }
59
- if ((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia) {
60
- const constraints = {
61
- video: {
62
- width: { ideal: options.width },
63
- height: { ideal: options.height }
64
- }
65
- };
66
- if (options.position === 'rear') {
67
- constraints.video.facingMode = 'environment';
68
- this.isBackCamera = true;
69
- }
70
- else {
71
- this.isBackCamera = false;
72
- }
73
- navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
74
- //video.src = window.URL.createObjectURL(stream);
75
- videoElement.srcObject = stream;
76
- videoElement.play();
77
- resolve({});
78
- }, (err) => {
79
- reject(err);
80
- });
81
- }
82
- }
83
- else {
84
- reject({ message: 'camera already started' });
85
- }
86
- });
87
- }
88
- async stop() {
89
- const video = document.getElementById('video');
90
- if (video) {
91
- video.pause();
92
- const st = video.srcObject;
93
- const tracks = st.getTracks();
94
- for (let i = 0; i < tracks.length; i++) {
95
- const track = tracks[i];
96
- track.stop();
97
- }
98
- video.remove();
99
- }
100
- }
101
- async capture(options) {
102
- return new Promise((resolve, _) => {
103
- const video = document.getElementById('video');
104
- const canvas = document.createElement('canvas');
105
- // video.width = video.offsetWidth;
106
- const context = canvas.getContext('2d');
107
- canvas.width = video.videoWidth;
108
- canvas.height = video.videoHeight;
109
- // flip horizontally back camera isn't used
110
- if (context) {
111
- if (!this.isBackCamera) {
112
- context.translate(video.videoWidth, 0);
113
- context.scale(-1, 1);
114
- }
115
- context.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
116
- }
117
- let base64EncodedImage;
118
- if (options.quality != undefined) {
119
- base64EncodedImage = canvas.toDataURL('image/jpeg', options.quality / 100.0).replace('data:image/jpeg;base64,', '');
120
- }
121
- else {
122
- base64EncodedImage = canvas.toDataURL('image/png').replace('data:image/png;base64,', '');
123
- }
124
- resolve({
125
- value: base64EncodedImage,
126
- });
127
- });
128
- }
129
- async captureSample(_options) {
130
- return this.capture(_options);
131
- }
132
- async setZoom(_options) {
133
- throw new Error('set zoom not supported under the web platform');
134
- }
135
- async getSupportedFlashModes() {
136
- throw new Error('getSupportedFlashModes not supported under the web platform');
137
- }
138
- getSupportedZoomLevels() {
139
- throw new Error('getSupportedFlashModes not supported under the web platform.');
140
- }
141
- async setFlashMode(_options) {
142
- throw new Error('setFlashMode not supported under the web platform');
143
- }
144
- async flip() {
145
- throw new Error('flip not supported under the web platform');
146
- }
147
- async changeOrientation() {
148
- throw new Error('changeOrientation not supported under the web platform');
149
- }
150
- async setOpacity(_options) {
151
- const video = document.getElementById('video');
152
- if (!!video && !!_options['opacity']) {
153
- video.style.setProperty('opacity', _options['opacity'].toString());
154
- }
155
- }
156
- }
157
- const CameraPreview = new CameraPreviewWeb();
8
+ /* eslint-disable @typescript-eslint/no-unused-vars */
9
+ class CameraPreviewWeb extends core.WebPlugin {
10
+ constructor() {
11
+ super({
12
+ name: 'CameraPreview',
13
+ platforms: ['web'],
14
+ });
15
+ /**
16
+ * track which camera is used based on start options
17
+ * used in capture
18
+ */
19
+ this.isBackCamera = false;
20
+ }
21
+ async start(options) {
22
+ return new Promise(async (resolve, reject) => {
23
+ var _a;
24
+ await navigator.mediaDevices
25
+ .getUserMedia({
26
+ audio: !options.disableAudio,
27
+ video: true
28
+ })
29
+ .then((stream) => {
30
+ // Stop any existing stream so we can request media with different constraints based on user input
31
+ stream.getTracks().forEach((track) => track.stop());
32
+ })
33
+ .catch((error) => {
34
+ reject(error);
35
+ });
36
+ const video = document.getElementById('video');
37
+ const parent = document.getElementById(options.parent);
38
+ if (!video) {
39
+ const videoElement = document.createElement('video');
40
+ videoElement.id = 'video';
41
+ videoElement.setAttribute('class', options.className || '');
42
+ // Don't flip video feed if camera is rear facing
43
+ if (options.position !== 'rear') {
44
+ videoElement.setAttribute('style', '-webkit-transform: scaleX(-1); transform: scaleX(-1);');
45
+ }
46
+ const userAgent = navigator.userAgent.toLowerCase();
47
+ const isSafari = userAgent.includes('safari') && !userAgent.includes('chrome');
48
+ // Safari on iOS needs to have the autoplay, muted and playsinline attributes set for video.play() to be successful
49
+ // Without these attributes videoElement.play() will throw a NotAllowedError
50
+ // https://developer.apple.com/documentation/webkit/delivering_video_content_for_safari
51
+ if (isSafari) {
52
+ videoElement.setAttribute('autoplay', 'true');
53
+ videoElement.setAttribute('muted', 'true');
54
+ videoElement.setAttribute('playsinline', 'true');
55
+ }
56
+ if (parent) {
57
+ parent.appendChild(videoElement);
58
+ }
59
+ if ((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia) {
60
+ const constraints = {
61
+ video: {
62
+ width: { ideal: options.width },
63
+ height: { ideal: options.height }
64
+ }
65
+ };
66
+ if (options.position === 'rear') {
67
+ constraints.video.facingMode = 'environment';
68
+ this.isBackCamera = true;
69
+ }
70
+ else {
71
+ this.isBackCamera = false;
72
+ }
73
+ navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
74
+ //video.src = window.URL.createObjectURL(stream);
75
+ videoElement.srcObject = stream;
76
+ videoElement.play();
77
+ resolve({});
78
+ }, (err) => {
79
+ reject(err);
80
+ });
81
+ }
82
+ }
83
+ else {
84
+ reject({ message: 'camera already started' });
85
+ }
86
+ });
87
+ }
88
+ async stop() {
89
+ const video = document.getElementById('video');
90
+ if (video) {
91
+ video.pause();
92
+ const st = video.srcObject;
93
+ const tracks = st.getTracks();
94
+ for (let i = 0; i < tracks.length; i++) {
95
+ const track = tracks[i];
96
+ track.stop();
97
+ }
98
+ video.remove();
99
+ }
100
+ }
101
+ async capture(options) {
102
+ return new Promise((resolve, _) => {
103
+ const video = document.getElementById('video');
104
+ const canvas = document.createElement('canvas');
105
+ // video.width = video.offsetWidth;
106
+ const context = canvas.getContext('2d');
107
+ canvas.width = video.videoWidth;
108
+ canvas.height = video.videoHeight;
109
+ // flip horizontally back camera isn't used
110
+ if (context) {
111
+ if (!this.isBackCamera) {
112
+ context.translate(video.videoWidth, 0);
113
+ context.scale(-1, 1);
114
+ }
115
+ context.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
116
+ }
117
+ let base64EncodedImage;
118
+ if (options.quality != undefined) {
119
+ base64EncodedImage = canvas.toDataURL('image/jpeg', options.quality / 100.0).replace('data:image/jpeg;base64,', '');
120
+ }
121
+ else {
122
+ base64EncodedImage = canvas.toDataURL('image/png').replace('data:image/png;base64,', '');
123
+ }
124
+ resolve({
125
+ value: base64EncodedImage,
126
+ });
127
+ });
128
+ }
129
+ async captureSample(_options) {
130
+ return this.capture(_options);
131
+ }
132
+ async setZoom(_options) {
133
+ throw new Error('set zoom not supported under the web platform');
134
+ }
135
+ async getSupportedFlashModes() {
136
+ throw new Error('getSupportedFlashModes not supported under the web platform');
137
+ }
138
+ getSupportedZoomLevels() {
139
+ throw new Error('getSupportedFlashModes not supported under the web platform.');
140
+ }
141
+ async setFlashMode(_options) {
142
+ throw new Error('setFlashMode not supported under the web platform');
143
+ }
144
+ async flip() {
145
+ throw new Error('flip not supported under the web platform');
146
+ }
147
+ async setOpacity(_options) {
148
+ const video = document.getElementById('video');
149
+ if (!!video && !!_options['opacity']) {
150
+ video.style.setProperty('opacity', _options['opacity'].toString());
151
+ }
152
+ }
153
+ }
154
+ const CameraPreview = new CameraPreviewWeb();
158
155
  core.registerWebPlugin(CameraPreview);
159
156
 
160
157
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CameraPreview = registerPlugin('CameraPreview', {\n web: () => import('./web').then((m) => new m.CameraPreviewWeb()),\n});\nexport * from './definitions';\nexport { CameraPreview };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/prefer-for-of */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable no-async-promise-executor */\n/* eslint-disable @typescript-eslint/consistent-type-assertions */\n/* eslint-disable @typescript-eslint/no-inferrable-types */\nimport { WebPlugin, registerWebPlugin } from '@capacitor/core';\nexport class CameraPreviewWeb extends WebPlugin {\n constructor() {\n super({\n name: 'CameraPreview',\n platforms: ['web'],\n });\n /**\n * track which camera is used based on start options\n * used in capture\n */\n this.isBackCamera = false;\n }\n async start(options) {\n return new Promise(async (resolve, reject) => {\n var _a;\n await navigator.mediaDevices\n .getUserMedia({\n audio: !options.disableAudio,\n video: true\n })\n .then((stream) => {\n // Stop any existing stream so we can request media with different constraints based on user input\n stream.getTracks().forEach((track) => track.stop());\n })\n .catch((error) => {\n reject(error);\n });\n const video = document.getElementById('video');\n const parent = document.getElementById(options.parent);\n if (!video) {\n const videoElement = document.createElement('video');\n videoElement.id = 'video';\n videoElement.setAttribute('class', options.className || '');\n // Don't flip video feed if camera is rear facing\n if (options.position !== 'rear') {\n videoElement.setAttribute('style', '-webkit-transform: scaleX(-1); transform: scaleX(-1);');\n }\n const userAgent = navigator.userAgent.toLowerCase();\n const isSafari = userAgent.includes('safari') && !userAgent.includes('chrome');\n // Safari on iOS needs to have the autoplay, muted and playsinline attributes set for video.play() to be successful\n // Without these attributes videoElement.play() will throw a NotAllowedError\n // https://developer.apple.com/documentation/webkit/delivering_video_content_for_safari\n if (isSafari) {\n videoElement.setAttribute('autoplay', 'true');\n videoElement.setAttribute('muted', 'true');\n videoElement.setAttribute('playsinline', 'true');\n }\n if (parent) {\n parent.appendChild(videoElement);\n }\n if ((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia) {\n const constraints = {\n video: {\n width: { ideal: options.width },\n height: { ideal: options.height }\n }\n };\n if (options.position === 'rear') {\n constraints.video.facingMode = 'environment';\n this.isBackCamera = true;\n }\n else {\n this.isBackCamera = false;\n }\n navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\n //video.src = window.URL.createObjectURL(stream);\n videoElement.srcObject = stream;\n videoElement.play();\n resolve({});\n }, (err) => {\n reject(err);\n });\n }\n }\n else {\n reject({ message: 'camera already started' });\n }\n });\n }\n async stop() {\n const video = document.getElementById('video');\n if (video) {\n video.pause();\n const st = video.srcObject;\n const tracks = st.getTracks();\n for (let i = 0; i < tracks.length; i++) {\n const track = tracks[i];\n track.stop();\n }\n video.remove();\n }\n }\n async capture(options) {\n return new Promise((resolve, _) => {\n const video = document.getElementById('video');\n const canvas = document.createElement('canvas');\n // video.width = video.offsetWidth;\n const context = canvas.getContext('2d');\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n // flip horizontally back camera isn't used\n if (context) {\n if (!this.isBackCamera) {\n context.translate(video.videoWidth, 0);\n context.scale(-1, 1);\n }\n context.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);\n }\n let base64EncodedImage;\n if (options.quality != undefined) {\n base64EncodedImage = canvas.toDataURL('image/jpeg', options.quality / 100.0).replace('data:image/jpeg;base64,', '');\n }\n else {\n base64EncodedImage = canvas.toDataURL('image/png').replace('data:image/png;base64,', '');\n }\n resolve({\n value: base64EncodedImage,\n });\n });\n }\n async captureSample(_options) {\n return this.capture(_options);\n }\n async setZoom(_options) {\n throw new Error('set zoom not supported under the web platform');\n }\n async getSupportedFlashModes() {\n throw new Error('getSupportedFlashModes not supported under the web platform');\n }\n getSupportedZoomLevels() {\n throw new Error('getSupportedFlashModes not supported under the web platform.');\n }\n async setFlashMode(_options) {\n throw new Error('setFlashMode not supported under the web platform');\n }\n async flip() {\n throw new Error('flip not supported under the web platform');\n }\n async changeOrientation() {\n throw new Error('changeOrientation not supported under the web platform');\n }\n async setOpacity(_options) {\n const video = document.getElementById('video');\n if (!!video && !!_options['opacity']) {\n video.style.setProperty('opacity', _options['opacity'].toString());\n }\n }\n}\nconst CameraPreview = new CameraPreviewWeb();\nexport { CameraPreview };\nregisterWebPlugin(CameraPreview);\n//# sourceMappingURL=web.js.map"],"names":["CameraPreview","registerPl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C,OAAO,CAAC,CAAC;IACvD,QAAQ,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;IAC9C,YAAY,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/E,SAAS;IACT,KAAK;IACL,CAAC;IACD,MAAM,aAAa,GAAG,IAAI,gBAAgB,EAAE,CAAC;AAE7CC,0BAAiB,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\r\nconst CameraPreview = registerPlugin('CameraPreview', {\r\n web: () => import('./web').then((m) => new m.CameraPreviewWeb()),\r\n});\r\nexport * from './definitions';\r\nexport { CameraPreview };\r\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable @typescript-eslint/prefer-for-of */\r\n/* eslint-disable @typescript-eslint/ban-types */\r\n/* eslint-disable no-async-promise-executor */\r\n/* eslint-disable @typescript-eslint/consistent-type-assertions */\r\n/* eslint-disable @typescript-eslint/no-inferrable-types */\r\nimport { WebPlugin, registerWebPlugin } from '@capacitor/core';\r\nexport class CameraPreviewWeb extends WebPlugin {\r\n constructor() {\r\n super({\r\n name: 'CameraPreview',\r\n platforms: ['web'],\r\n });\r\n /**\r\n * track which camera is used based on start options\r\n * used in capture\r\n */\r\n this.isBackCamera = false;\r\n }\r\n async start(options) {\r\n return new Promise(async (resolve, reject) => {\r\n var _a;\r\n await navigator.mediaDevices\r\n .getUserMedia({\r\n audio: !options.disableAudio,\r\n video: true\r\n })\r\n .then((stream) => {\r\n // Stop any existing stream so we can request media with different constraints based on user input\r\n stream.getTracks().forEach((track) => track.stop());\r\n })\r\n .catch((error) => {\r\n reject(error);\r\n });\r\n const video = document.getElementById('video');\r\n const parent = document.getElementById(options.parent);\r\n if (!video) {\r\n const videoElement = document.createElement('video');\r\n videoElement.id = 'video';\r\n videoElement.setAttribute('class', options.className || '');\r\n // Don't flip video feed if camera is rear facing\r\n if (options.position !== 'rear') {\r\n videoElement.setAttribute('style', '-webkit-transform: scaleX(-1); transform: scaleX(-1);');\r\n }\r\n const userAgent = navigator.userAgent.toLowerCase();\r\n const isSafari = userAgent.includes('safari') && !userAgent.includes('chrome');\r\n // Safari on iOS needs to have the autoplay, muted and playsinline attributes set for video.play() to be successful\r\n // Without these attributes videoElement.play() will throw a NotAllowedError\r\n // https://developer.apple.com/documentation/webkit/delivering_video_content_for_safari\r\n if (isSafari) {\r\n videoElement.setAttribute('autoplay', 'true');\r\n videoElement.setAttribute('muted', 'true');\r\n videoElement.setAttribute('playsinline', 'true');\r\n }\r\n if (parent) {\r\n parent.appendChild(videoElement);\r\n }\r\n if ((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia) {\r\n const constraints = {\r\n video: {\r\n width: { ideal: options.width },\r\n height: { ideal: options.height }\r\n }\r\n };\r\n if (options.position === 'rear') {\r\n constraints.video.facingMode = 'environment';\r\n this.isBackCamera = true;\r\n }\r\n else {\r\n this.isBackCamera = false;\r\n }\r\n navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {\r\n //video.src = window.URL.createObjectURL(stream);\r\n videoElement.srcObject = stream;\r\n videoElement.play();\r\n resolve({});\r\n }, (err) => {\r\n reject(err);\r\n });\r\n }\r\n }\r\n else {\r\n reject({ message: 'camera already started' });\r\n }\r\n });\r\n }\r\n async stop() {\r\n const video = document.getElementById('video');\r\n if (video) {\r\n video.pause();\r\n const st = video.srcObject;\r\n const tracks = st.getTracks();\r\n for (let i = 0; i < tracks.length; i++) {\r\n const track = tracks[i];\r\n track.stop();\r\n }\r\n video.remove();\r\n }\r\n }\r\n async capture(options) {\r\n return new Promise((resolve, _) => {\r\n const video = document.getElementById('video');\r\n const canvas = document.createElement('canvas');\r\n // video.width = video.offsetWidth;\r\n const context = canvas.getContext('2d');\r\n canvas.width = video.videoWidth;\r\n canvas.height = video.videoHeight;\r\n // flip horizontally back camera isn't used\r\n if (context) {\r\n if (!this.isBackCamera) {\r\n context.translate(video.videoWidth, 0);\r\n context.scale(-1, 1);\r\n }\r\n context.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);\r\n }\r\n let base64EncodedImage;\r\n if (options.quality != undefined) {\r\n base64EncodedImage = canvas.toDataURL('image/jpeg', options.quality / 100.0).replace('data:image/jpeg;base64,', '');\r\n }\r\n else {\r\n base64EncodedImage = canvas.toDataURL('image/png').replace('data:image/png;base64,', '');\r\n }\r\n resolve({\r\n value: base64EncodedImage,\r\n });\r\n });\r\n }\r\n async captureSample(_options) {\r\n return this.capture(_options);\r\n }\r\n async setZoom(_options) {\r\n throw new Error('set zoom not supported under the web platform');\r\n }\r\n async getSupportedFlashModes() {\r\n throw new Error('getSupportedFlashModes not supported under the web platform');\r\n }\r\n getSupportedZoomLevels() {\r\n throw new Error('getSupportedFlashModes not supported under the web platform.');\r\n }\r\n async setFlashMode(_options) {\r\n throw new Error('setFlashMode not supported under the web platform');\r\n }\r\n async flip() {\r\n throw new Error('flip not supported under the web platform');\r\n }\r\n async setOpacity(_options) {\r\n const video = document.getElementById('video');\r\n if (!!video && !!_options['opacity']) {\r\n video.style.setProperty('opacity', _options['opacity'].toString());\r\n }\r\n }\r\n}\r\nconst CameraPreview = new CameraPreviewWeb();\r\nexport { CameraPreview };\r\nregisterWebPlugin(CameraPreview);\r\n//# sourceMappingURL=web.js.map"],"names":["CameraPreview","registerPlugin","WebPlugin","registerWebPlugin"],"mappings":";;;AACK,UAACA,eAAa,GAAGC,mBAAc,CAAC,eAAe,EAAE;IACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACpE,CAAC;;ICHD;IAOO,MAAM,gBAAgB,SAASC,c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