@intuiface/capacitor-plugin-screenshot 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/IntuifaceCapacitorPluginScreenshot.podspec +1 -1
- package/README.md +1 -1
- package/android/build.gradle +9 -9
- package/android/src/main/java/com/intuiface/plugins/screenshot/CapacitorScreenshotPlugin.java +26 -27
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.js +3 -6
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +4 -9
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +4 -9
- package/dist/plugin.js.map +1 -1
- package/package.json +15 -15
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
11
11
|
s.author = package['author']
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
14
|
-
s.ios.deployment_target = '
|
14
|
+
s.ios.deployment_target = '14.0'
|
15
15
|
s.dependency 'Capacitor'
|
16
16
|
s.swift_version = '5.1'
|
17
17
|
end
|
package/README.md
CHANGED
package/android/build.gradle
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
ext {
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
6
6
|
}
|
7
7
|
|
8
8
|
buildscript {
|
@@ -11,7 +11,7 @@ buildscript {
|
|
11
11
|
mavenCentral()
|
12
12
|
}
|
13
13
|
dependencies {
|
14
|
-
classpath 'com.android.tools.build:gradle:8.2
|
14
|
+
classpath 'com.android.tools.build:gradle:8.7.2'
|
15
15
|
}
|
16
16
|
}
|
17
17
|
|
@@ -19,10 +19,10 @@ apply plugin: 'com.android.library'
|
|
19
19
|
|
20
20
|
android {
|
21
21
|
namespace "com.intuiface.plugins.screenshot"
|
22
|
-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
22
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
23
23
|
defaultConfig {
|
24
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
25
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
24
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
25
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
|
26
26
|
versionCode 1
|
27
27
|
versionName "1.0"
|
28
28
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
@@ -37,8 +37,8 @@ android {
|
|
37
37
|
abortOnError false
|
38
38
|
}
|
39
39
|
compileOptions {
|
40
|
-
sourceCompatibility JavaVersion.
|
41
|
-
targetCompatibility JavaVersion.
|
40
|
+
sourceCompatibility JavaVersion.VERSION_21
|
41
|
+
targetCompatibility JavaVersion.VERSION_21
|
42
42
|
}
|
43
43
|
}
|
44
44
|
|
package/android/src/main/java/com/intuiface/plugins/screenshot/CapacitorScreenshotPlugin.java
CHANGED
@@ -50,21 +50,20 @@ public class CapacitorScreenshotPlugin extends Plugin {
|
|
50
50
|
handlerThread.start();
|
51
51
|
handler = new Handler(handlerThread.getLooper());
|
52
52
|
|
53
|
-
mediaProjectionActivityLauncher =
|
54
|
-
|
55
|
-
.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
startScreenshotCapture(mediaProjection);
|
64
|
-
}
|
53
|
+
mediaProjectionActivityLauncher = getActivity()
|
54
|
+
.registerForActivityResult(
|
55
|
+
new ActivityResultContracts.StartActivityForResult(),
|
56
|
+
new ActivityResultCallback<ActivityResult>() {
|
57
|
+
@Override
|
58
|
+
public void onActivityResult(ActivityResult result) {
|
59
|
+
if (result.getResultCode() == Activity.RESULT_OK) {
|
60
|
+
assert result.getData() != null;
|
61
|
+
mediaProjection = mediaProjectionManager.getMediaProjection(result.getResultCode(), result.getData());
|
62
|
+
startScreenshotCapture(mediaProjection);
|
65
63
|
}
|
66
64
|
}
|
67
|
-
|
65
|
+
}
|
66
|
+
);
|
68
67
|
}
|
69
68
|
|
70
69
|
@PluginMethod
|
@@ -105,8 +104,9 @@ public class CapacitorScreenshotPlugin extends Plugin {
|
|
105
104
|
public void run() {
|
106
105
|
Activity activity = getBridge().getActivity();
|
107
106
|
if (activity != null) {
|
108
|
-
mediaProjectionManager =
|
109
|
-
|
107
|
+
mediaProjectionManager = (MediaProjectionManager) activity.getSystemService(
|
108
|
+
Activity.MEDIA_PROJECTION_SERVICE
|
109
|
+
);
|
110
110
|
|
111
111
|
savedCall = call;
|
112
112
|
Intent projectionIntent = mediaProjectionManager.createScreenCaptureIntent();
|
@@ -131,17 +131,16 @@ public class CapacitorScreenshotPlugin extends Plugin {
|
|
131
131
|
|
132
132
|
mediaProjection.registerCallback(new MediaProjection.Callback() {}, null);
|
133
133
|
// Create a VirtualDisplay using the mediaProjection and imageReader
|
134
|
-
this.virtualDisplay =
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
);
|
134
|
+
this.virtualDisplay = mediaProjection.createVirtualDisplay(
|
135
|
+
"ScreenCapture",
|
136
|
+
screenWidth,
|
137
|
+
screenHeight,
|
138
|
+
screenDensity,
|
139
|
+
DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR,
|
140
|
+
imageReader.getSurface(),
|
141
|
+
null,
|
142
|
+
handler
|
143
|
+
);
|
145
144
|
}
|
146
145
|
|
147
146
|
private void processScreenshot(Image image) {
|
@@ -204,7 +203,7 @@ public class CapacitorScreenshotPlugin extends Plugin {
|
|
204
203
|
int desiredWidth = savedCall.getInt("size", width);
|
205
204
|
// scale but keep ratio
|
206
205
|
int scaledWidth = Math.min(width, desiredWidth);
|
207
|
-
int scaledHeight = height * scaledWidth / width;
|
206
|
+
int scaledHeight = (height * scaledWidth) / width;
|
208
207
|
bitmap = Bitmap.createScaledBitmap(bitmap, scaledWidth, scaledHeight, false);
|
209
208
|
|
210
209
|
return bitmap;
|
package/dist/esm/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { registerPlugin } from '@capacitor/core';
|
2
2
|
const CapacitorScreenshot = registerPlugin('CapacitorScreenshot', {
|
3
|
-
web: () => import('./web').then(m => new m.CapacitorScreenshotWeb()),
|
3
|
+
web: () => import('./web').then((m) => new m.CapacitorScreenshotWeb()),
|
4
4
|
});
|
5
5
|
export * from './definitions';
|
6
6
|
export { CapacitorScreenshot };
|
package/dist/esm/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,mBAAmB,GAAG,cAAc,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,mBAAmB,GAAG,cAAc,CAA4B,qBAAqB,EAAE;IAC3F,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,sBAAsB,EAAE,CAAC;CACvE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { CapacitorScreenshotPlugin } from './definitions';\n\nconst CapacitorScreenshot = registerPlugin<CapacitorScreenshotPlugin>('CapacitorScreenshot', {\n web: () => import('./web').then((m) => new m.CapacitorScreenshotWeb()),\n});\n\nexport * from './definitions';\nexport { CapacitorScreenshot };\n"]}
|
package/dist/esm/web.js
CHANGED
@@ -22,7 +22,7 @@ export class CapacitorScreenshotWeb extends WebPlugin {
|
|
22
22
|
// create a canvas
|
23
23
|
this.captureCanvas = document.createElement('canvas');
|
24
24
|
}
|
25
|
-
return new Promise(resolve => {
|
25
|
+
return new Promise((resolve) => {
|
26
26
|
const callbackLoadedMetadata = () => {
|
27
27
|
// unbind from loaded metadata
|
28
28
|
this.videoCapture.removeEventListener('loadedmetadata', callbackLoadedMetadata);
|
@@ -33,15 +33,12 @@ export class CapacitorScreenshotWeb extends WebPlugin {
|
|
33
33
|
let newHeight = this.captureCanvas.height;
|
34
34
|
if (options.size) {
|
35
35
|
newWidth = options.size;
|
36
|
-
newHeight =
|
37
|
-
(this.captureCanvas.height * newWidth) / this.captureCanvas.width;
|
36
|
+
newHeight = (this.captureCanvas.height * newWidth) / this.captureCanvas.width;
|
38
37
|
this.captureCanvas.width = newWidth;
|
39
38
|
this.captureCanvas.height = newHeight;
|
40
39
|
}
|
41
40
|
// draw the video into canvas
|
42
|
-
this.captureCanvas
|
43
|
-
.getContext('2d')
|
44
|
-
.drawImage(this.videoCapture, 0, 0, newWidth, newHeight);
|
41
|
+
this.captureCanvas.getContext('2d').drawImage(this.videoCapture, 0, 0, newWidth, newHeight);
|
45
42
|
let quality = 1.0;
|
46
43
|
if (options.quality) {
|
47
44
|
quality = options.quality / 100;
|
package/dist/esm/web.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,sBAAuB,SAAQ,SAAS;IAKnD,KAAK,CAAC,aAAa,CAAC,OAA0B;QAC5C,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;gBACvB,sBAAsB;gBAEtB,uBAAuB;gBACvB,MAAM,YAAY,GAAG,SAAS,CAAC,YAAmB,CAAC;gBACnD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC;gBAC5D,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC;gBAE9D,oCAAoC;gBACpC,IAAI,CAAC,aAAa,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC;oBACtD,gBAAgB,EAAE,IAAI;oBACtB,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE;wBACL,KAAK;wBACL,MAAM;qBACP;iBACF,CAAC,CAAC;gBACH,qBAAqB;gBACrB,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBACpD,kBAAkB;gBAClB,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CA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C;oBAClE,kBAAkB;oBAClB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;oBAE1B,mBAAmB;oBACnB,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC7B,CAAC,CAAC;gBAEF,oEAAoE;gBACpE,IAAI,CAAC,YAAY,CAAC,gBAAgB,GAAG,sBAAsB,CAAC;gBAC5D,2BAA2B;gBAC3B,IAAI,CAAC,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC;gBACjD,iBAAiB;gBACjB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC;SACJ;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,UAAU,GAAa,EAAE,CAAC,CAAC;YACzC,OAAO,IAAI,CAAC;SACb;IACH,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorScreenshotPlugin, ScreenshotOptions, ScreenshotValue } from './definitions';\n\nexport class CapacitorScreenshotWeb extends WebPlugin implements CapacitorScreenshotPlugin {\n private captureStream: any;\n private videoCapture: any;\n private captureCanvas: any;\n\n async getScreenshot(options: ScreenshotOptions): Promise<ScreenshotValue | null> {\n try {\n if (!this.captureStream) {\n // display a message ?\n\n // get the media device\n const mediaDevices = navigator.mediaDevices as any;\n const width = screen.width * (window.devicePixelRatio || 1);\n const height = screen.height * (window.devicePixelRatio || 1);\n\n // start sharing screen (ask for it)\n this.captureStream = await mediaDevices.getDisplayMedia({\n preferCurrentTab: true,\n audio: false,\n video: {\n width,\n height,\n },\n });\n // create a video tag\n this.videoCapture = document.createElement('video');\n // create a canvas\n this.captureCanvas = document.createElement('canvas');\n }\n\n return new Promise<any>((resolve) => {\n const callbackLoadedMetadata = () => {\n // unbind from loaded metadata\n this.videoCapture.removeEventListener('loadedmetadata', callbackLoadedMetadata);\n // set the canvas size with the video size\n this.captureCanvas.width = this.videoCapture.videoWidth;\n this.captureCanvas.height = this.videoCapture.videoHeight;\n let newWidth = this.captureCanvas.width;\n let newHeight = this.captureCanvas.height;\n if (options.size) {\n newWidth = options.size;\n newHeight = (this.captureCanvas.height * newWidth) / this.captureCanvas.width;\n this.captureCanvas.width = newWidth;\n this.captureCanvas.height = newHeight;\n }\n // draw the video into canvas\n this.captureCanvas.getContext('2d').drawImage(this.videoCapture, 0, 0, newWidth, newHeight);\n let quality = 1.0;\n if (options.quality) {\n quality = options.quality / 100;\n }\n // get the image of the canvas\n const frame = this.captureCanvas.toDataURL('image/jpeg', quality);\n // pause the video\n this.videoCapture.pause();\n\n // return the image\n resolve({ base64: frame });\n };\n\n // bind on loaded metadata to draw the video when the video is ready\n this.videoCapture.onloadedmetadata = callbackLoadedMetadata;\n // set the src of the video\n this.videoCapture.srcObject = this.captureStream;\n // play the video\n this.videoCapture.play();\n });\n } catch (err) {\n console.error(`Error: ${err as string}`);\n return null;\n }\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
3
|
var core = require('@capacitor/core');
|
6
4
|
|
7
5
|
const CapacitorScreenshot = core.registerPlugin('CapacitorScreenshot', {
|
8
|
-
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.CapacitorScreenshotWeb()),
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorScreenshotWeb()),
|
9
7
|
});
|
10
8
|
|
11
9
|
class CapacitorScreenshotWeb extends core.WebPlugin {
|
@@ -31,7 +29,7 @@ class CapacitorScreenshotWeb extends core.WebPlugin {
|
|
31
29
|
// create a canvas
|
32
30
|
this.captureCanvas = document.createElement('canvas');
|
33
31
|
}
|
34
|
-
return new Promise(resolve => {
|
32
|
+
return new Promise((resolve) => {
|
35
33
|
const callbackLoadedMetadata = () => {
|
36
34
|
// unbind from loaded metadata
|
37
35
|
this.videoCapture.removeEventListener('loadedmetadata', callbackLoadedMetadata);
|
@@ -42,15 +40,12 @@ class CapacitorScreenshotWeb extends core.WebPlugin {
|
|
42
40
|
let newHeight = this.captureCanvas.height;
|
43
41
|
if (options.size) {
|
44
42
|
newWidth = options.size;
|
45
|
-
newHeight =
|
46
|
-
(this.captureCanvas.height * newWidth) / this.captureCanvas.width;
|
43
|
+
newHeight = (this.captureCanvas.height * newWidth) / this.captureCanvas.width;
|
47
44
|
this.captureCanvas.width = newWidth;
|
48
45
|
this.captureCanvas.height = newHeight;
|
49
46
|
}
|
50
47
|
// draw the video into canvas
|
51
|
-
this.captureCanvas
|
52
|
-
.getContext('2d')
|
53
|
-
.drawImage(this.videoCapture, 0, 0, newWidth, newHeight);
|
48
|
+
this.captureCanvas.getContext('2d').drawImage(this.videoCapture, 0, 0, newWidth, newHeight);
|
54
49
|
let quality = 1.0;
|
55
50
|
if (options.quality) {
|
56
51
|
quality = options.quality / 100;
|
package/dist/plugin.cjs.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorScreenshot = registerPlugin('CapacitorScreenshot', {\n web: () => import('./web').then(m => new m.CapacitorScreenshotWeb()),\n});\nexport * from './definitions';\nexport { CapacitorScreenshot };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorScreenshotWeb extends WebPlugin {\n async getScreenshot(options) {\n try {\n if (!this.captureStream) {\n // display a message ?\n // get the media device\n const mediaDevices = navigator.mediaDevices;\n const width = screen.width * (window.devicePixelRatio || 1);\n const height = screen.height * (window.devicePixelRatio || 1);\n // start sharing screen (ask for it)\n this.captureStream = await mediaDevices.getDisplayMedia({\n preferCurrentTab: true,\n audio: false,\n video: {\n width,\n height,\n },\n });\n // create a video tag\n this.videoCapture = document.createElement('video');\n // create a canvas\n this.captureCanvas = document.createElement('canvas');\n }\n return new Promise(resolve => {\n const callbackLoadedMetadata = () => {\n // unbind from loaded metadata\n this.videoCapture.removeEventListener('loadedmetadata', callbackLoadedMetadata);\n // set the canvas size with the video size\n this.captureCanvas.width = this.videoCapture.videoWidth;\n this.captureCanvas.height = this.videoCapture.videoHeight;\n let newWidth = this.captureCanvas.width;\n let newHeight = this.captureCanvas.height;\n if (options.size) {\n newWidth = options.size;\n newHeight
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorScreenshot = registerPlugin('CapacitorScreenshot', {\n web: () => import('./web').then((m) => new m.CapacitorScreenshotWeb()),\n});\nexport * from './definitions';\nexport { CapacitorScreenshot };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorScreenshotWeb extends WebPlugin {\n async getScreenshot(options) {\n try {\n if (!this.captureStream) {\n // display a message ?\n // get the media device\n const mediaDevices = navigator.mediaDevices;\n const width = screen.width * (window.devicePixelRatio || 1);\n const height = screen.height * (window.devicePixelRatio || 1);\n // start sharing screen (ask for it)\n this.captureStream = await mediaDevices.getDisplayMedia({\n preferCurrentTab: true,\n audio: false,\n video: {\n width,\n height,\n },\n });\n // create a video tag\n this.videoCapture = document.createElement('video');\n // create a canvas\n this.captureCanvas = document.createElement('canvas');\n }\n return new Promise((resolve) => {\n const callbackLoadedMetadata = () => {\n // unbind from loaded metadata\n this.videoCapture.removeEventListener('loadedmetadata', callbackLoadedMetadata);\n // set the canvas size with the video size\n this.captureCanvas.width = this.videoCapture.videoWidth;\n this.captureCanvas.height = this.videoCapture.videoHeight;\n let newWidth = this.captureCanvas.width;\n let newHeight = this.captureCanvas.height;\n if (options.size) {\n newWidth = options.size;\n newHeight = (this.captureCanvas.height * newWidth) / this.captureCanvas.width;\n this.captureCanvas.width = newWidth;\n this.captureCanvas.height = newHeight;\n }\n // draw the video into canvas\n this.captureCanvas.getContext('2d').drawImage(this.videoCapture, 0, 0, newWidth, newHeight);\n let quality = 1.0;\n if (options.quality) {\n quality = options.quality / 100;\n }\n // get the image of the canvas\n const frame = this.captureCanvas.toDataURL('image/jpeg', quality);\n // pause the video\n this.videoCapture.pause();\n // return the image\n resolve({ base64: frame });\n };\n // bind on loaded metadata to draw the video when the video is ready\n this.videoCapture.onloadedmetadata = callbackLoadedMetadata;\n // set the src of the video\n this.videoCapture.srcObject = this.captureStream;\n // play the video\n this.videoCapture.play();\n });\n }\n catch (err) {\n console.error(`Error: ${err}`);\n return null;\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,mBAAmB,GAAGA,mBAAc,CAAC,qBAAqB,EAAE;AAClE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,sBAAsB,EAAE,CAAC;AAC1E,CAAC;;ACFM,MAAM,sBAAsB,SAASC,cAAS,CAAC;AACtD,IAAI,MAAM,aAAa,CAAC,OAAO,EAAE;AACjC,QAAQ,IAAI;AACZ,YAAY,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;AACrC;AACA;AACA,gBAAgB,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY;AAC3D,gBAAgB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC;AAC3E,gBAAgB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC;AAC7E;AACA,gBAAgB,IAAI,CAAC,aAAa,GAAG,MAAM,YAAY,CAAC,eAAe,CAAC;AACxE,oBAAoB,gBAAgB,EAAE,IAAI;AAC1C,oBAAoB,KAAK,EAAE,KAAK;AAChC,oBAAoB,KAAK,EAAE;AAC3B,wBAAwB,KAAK;AAC7B,wBAAwB,MAAM;AAC9B,qBAAqB;AACrB,iBAAi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AAwB,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG;AACvD;AACA;AACA,oBAAoB,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC;AACrF;AACA,oBAAoB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE;AAC7C;AACA,oBAAoB,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAC9C,iBAAiB;AACjB;AACA,gBAAgB,IAAI,CAAC,YAAY,CAAC,gBAAgB,GAAG,sBAAsB;AAC3E;AACA,gBAAgB,IAAI,CAAC,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa;AAChE;AACA,gBAAgB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;AACxC,aAAa,CAAC;AACd;AACA,QAAQ,OAAO,GAAG,EAAE;AACpB,YAAY,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;AAC1C,YAAY,OAAO,IAAI;AACvB;AACA;AACA;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
@@ -2,7 +2,7 @@ var capacitorCapacitorScreenshot = (function (exports, core) {
|
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
const CapacitorScreenshot = core.registerPlugin('CapacitorScreenshot', {
|
5
|
-
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.CapacitorScreenshotWeb()),
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorScreenshotWeb()),
|
6
6
|
});
|
7
7
|
|
8
8
|
class CapacitorScreenshotWeb extends core.WebPlugin {
|
@@ -28,7 +28,7 @@ var capacitorCapacitorScreenshot = (function (exports, core) {
|
|
28
28
|
// create a canvas
|
29
29
|
this.captureCanvas = document.createElement('canvas');
|
30
30
|
}
|
31
|
-
return new Promise(resolve => {
|
31
|
+
return new Promise((resolve) => {
|
32
32
|
const callbackLoadedMetadata = () => {
|
33
33
|
// unbind from loaded metadata
|
34
34
|
this.videoCapture.removeEventListener('loadedmetadata', callbackLoadedMetadata);
|
@@ -39,15 +39,12 @@ var capacitorCapacitorScreenshot = (function (exports, core) {
|
|
39
39
|
let newHeight = this.captureCanvas.height;
|
40
40
|
if (options.size) {
|
41
41
|
newWidth = options.size;
|
42
|
-
newHeight =
|
43
|
-
(this.captureCanvas.height * newWidth) / this.captureCanvas.width;
|
42
|
+
newHeight = (this.captureCanvas.height * newWidth) / this.captureCanvas.width;
|
44
43
|
this.captureCanvas.width = newWidth;
|
45
44
|
this.captureCanvas.height = newHeight;
|
46
45
|
}
|
47
46
|
// draw the video into canvas
|
48
|
-
this.captureCanvas
|
49
|
-
.getContext('2d')
|
50
|
-
.drawImage(this.videoCapture, 0, 0, newWidth, newHeight);
|
47
|
+
this.captureCanvas.getContext('2d').drawImage(this.videoCapture, 0, 0, newWidth, newHeight);
|
51
48
|
let quality = 1.0;
|
52
49
|
if (options.quality) {
|
53
50
|
quality = options.quality / 100;
|
@@ -81,8 +78,6 @@ var capacitorCapacitorScreenshot = (function (exports, core) {
|
|
81
78
|
|
82
79
|
exports.CapacitorScreenshot = CapacitorScreenshot;
|
83
80
|
|
84
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
85
|
-
|
86
81
|
return exports;
|
87
82
|
|
88
83
|
})({}, capacitorExports);
|
package/dist/plugin.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorScreenshot = registerPlugin('CapacitorScreenshot', {\n web: () => import('./web').then(m => new m.CapacitorScreenshotWeb()),\n});\nexport * from './definitions';\nexport { CapacitorScreenshot };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorScreenshotWeb extends WebPlugin {\n async getScreenshot(options) {\n try {\n if (!this.captureStream) {\n // display a message ?\n // get the media device\n const mediaDevices = navigator.mediaDevices;\n const width = screen.width * (window.devicePixelRatio || 1);\n const height = screen.height * (window.devicePixelRatio || 1);\n // start sharing screen (ask for it)\n this.captureStream = await mediaDevices.getDisplayMedia({\n preferCurrentTab: true,\n audio: false,\n video: {\n width,\n height,\n },\n });\n // create a video tag\n this.videoCapture = document.createElement('video');\n // create a canvas\n this.captureCanvas = document.createElement('canvas');\n }\n return new Promise(resolve => {\n const callbackLoadedMetadata = () => {\n // unbind from loaded metadata\n this.videoCapture.removeEventListener('loadedmetadata', callbackLoadedMetadata);\n // set the canvas size with the video size\n this.captureCanvas.width = this.videoCapture.videoWidth;\n this.captureCanvas.height = this.videoCapture.videoHeight;\n let newWidth = this.captureCanvas.width;\n let newHeight = this.captureCanvas.height;\n if (options.size) {\n newWidth = options.size;\n newHeight
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorScreenshot = registerPlugin('CapacitorScreenshot', {\n web: () => import('./web').then((m) => new m.CapacitorScreenshotWeb()),\n});\nexport * from './definitions';\nexport { CapacitorScreenshot };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorScreenshotWeb extends WebPlugin {\n async getScreenshot(options) {\n try {\n if (!this.captureStream) {\n // display a message ?\n // get the media device\n const mediaDevices = navigator.mediaDevices;\n const width = screen.width * (window.devicePixelRatio || 1);\n const height = screen.height * (window.devicePixelRatio || 1);\n // start sharing screen (ask for it)\n this.captureStream = await mediaDevices.getDisplayMedia({\n preferCurrentTab: true,\n audio: false,\n video: {\n width,\n height,\n },\n });\n // create a video tag\n this.videoCapture = document.createElement('video');\n // create a canvas\n this.captureCanvas = document.createElement('canvas');\n }\n return new Promise((resolve) => {\n const callbackLoadedMetadata = () => {\n // unbind from loaded metadata\n this.videoCapture.removeEventListener('loadedmetadata', callbackLoadedMetadata);\n // set the canvas size with the video size\n this.captureCanvas.width = this.videoCapture.videoWidth;\n this.captureCanvas.height = this.videoCapture.videoHeight;\n let newWidth = this.captureCanvas.width;\n let newHeight = this.captureCanvas.height;\n if (options.size) {\n newWidth = options.size;\n newHeight = (this.captureCanvas.height * newWidth) / this.captureCanvas.width;\n this.captureCanvas.width = newWidth;\n this.captureCanvas.height = newHeight;\n }\n // draw the video into canvas\n this.captureCanvas.getContext('2d').drawImage(this.videoCapture, 0, 0, newWidth, newHeight);\n let quality = 1.0;\n if (options.quality) {\n quality = options.quality / 100;\n }\n // get the image of the canvas\n const frame = this.captureCanvas.toDataURL('image/jpeg', quality);\n // pause the video\n this.videoCapture.pause();\n // return the image\n resolve({ base64: frame });\n };\n // bind on loaded metadata to draw the video when the video is ready\n this.videoCapture.onloadedmetadata = callbackLoadedMetadata;\n // set the src of the video\n this.videoCapture.srcObject = this.captureStream;\n // play the video\n this.videoCapture.play();\n });\n }\n catch (err) {\n console.error(`Error: ${err}`);\n return null;\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,mBAAmB,GAAGA,mBAAc,CAAC,qBAAqB,EAAE;IAClE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,sBAAsB,EAAE,CAAC;IAC1E,CAAC;;ICFM,MAAM,sBAAsB,SAASC,cAAS,CAAC;IACtD,IAAI,MAAM,aAAa,CAAC,OAAO,EAAE;IACjC,QAAQ,IAAI;IACZ,YAAY,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;IACrC;IACA;IACA,gBAAgB,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY;IAC3D,gBAAgB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC;IAC3E,gBAAgB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC;IAC7E;IACA,gBAAgB,IAAI,CA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AC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,CAAC;IAC/G,oBAAoB,IAAI,OAAO,GAAG,GAAG;IACrC,oBAAoB,IAAI,OAAO,CAAC,OAAO,EAAE;IACzC,wBAAwB,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG;IACvD;IACA;IACA,oBAAoB,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC;IACrF;IACA,oBAAoB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE;IAC7C;IACA,oBAAoB,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9C,iBAAiB;IACjB;IACA,gBAAgB,IAAI,CAAC,YAAY,CAAC,gBAAgB,GAAG,sBAAsB;IAC3E;IACA,gBAAgB,IAAI,CAAC,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa;IAChE;IACA,gBAAgB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IACxC,aAAa,CAAC;IACd;IACA,QAAQ,OAAO,GAAG,EAAE;IACpB,YAAY,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IAC1C,YAAY,OAAO,IAAI;IACvB;IACA;IACA;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@intuiface/capacitor-plugin-screenshot",
|
3
|
-
"version": "
|
3
|
+
"version": "3.0.0",
|
4
4
|
"description": "Capacitor plugin to take screenshot for iOS and Android devices",
|
5
5
|
"main": "dist/plugin.cjs.js",
|
6
6
|
"module": "dist/esm/index.js",
|
@@ -35,33 +35,33 @@
|
|
35
35
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
36
36
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
37
37
|
"eslint": "eslint . --ext ts",
|
38
|
-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
38
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
39
39
|
"swiftlint": "node-swiftlint",
|
40
40
|
"docgen": "docgen --api CapacitorScreenshotPlugin --output-readme README.md --output-json dist/docs.json",
|
41
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.
|
41
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
42
42
|
"clean": "rimraf ./dist",
|
43
43
|
"watch": "tsc --watch",
|
44
44
|
"prepublishOnly": "npm run build",
|
45
45
|
"prepare": "npx shx cp -u ./.githooks/* ./.git/hooks/"
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
|
-
"@capacitor/android": "^
|
49
|
-
"@capacitor/core": "^
|
50
|
-
"@capacitor/docgen": "^0.0
|
51
|
-
"@capacitor/ios": "^
|
48
|
+
"@capacitor/android": "^7.0.0",
|
49
|
+
"@capacitor/core": "^7.0.0",
|
50
|
+
"@capacitor/docgen": "^0.3.0",
|
51
|
+
"@capacitor/ios": "^7.0.0",
|
52
52
|
"@ionic/eslint-config": "^0.4.0",
|
53
|
-
"@ionic/prettier-config": "^
|
54
|
-
"@ionic/swiftlint-config": "^
|
53
|
+
"@ionic/prettier-config": "^4.0.0",
|
54
|
+
"@ionic/swiftlint-config": "^2.0.0",
|
55
55
|
"eslint": "^8.57.0",
|
56
|
-
"prettier": "
|
57
|
-
"prettier-plugin-java": "
|
58
|
-
"rimraf": "^
|
59
|
-
"rollup": "^
|
60
|
-
"swiftlint": "^
|
56
|
+
"prettier": "^3.4.2",
|
57
|
+
"prettier-plugin-java": "^2.6.6",
|
58
|
+
"rimraf": "^6.0.1",
|
59
|
+
"rollup": "^4.30.1",
|
60
|
+
"swiftlint": "^2.0.0",
|
61
61
|
"typescript": "~4.1.5"
|
62
62
|
},
|
63
63
|
"peerDependencies": {
|
64
|
-
"@capacitor/core": "
|
64
|
+
"@capacitor/core": ">=7.0.0"
|
65
65
|
},
|
66
66
|
"prettier": "@ionic/prettier-config",
|
67
67
|
"swiftlint": "@ionic/swiftlint-config",
|