@capgo/capacitor-screen-recorder 1.2.52 → 2.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/android/build.gradle +13 -13
- package/android/src/main/java/ee/forgr/plugin/screenrecorder/ScreenRecorderPlugin.java +17 -17
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/web.d.ts +2 -2
- package/dist/esm/web.js +3 -3
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +3 -3
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -3
- package/dist/plugin.js.map +1 -1
- package/package.json +21 -21
package/android/build.gradle
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
ext {
|
|
3
|
-
junitVersion =
|
|
4
|
-
androidxJunitVersion =
|
|
5
|
-
androidxEspressoCoreVersion =
|
|
6
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.
|
|
7
|
-
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.
|
|
8
|
-
|
|
3
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
|
|
6
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
|
|
7
|
+
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.10.0'
|
|
8
|
+
kotlin_version = project.hasProperty('kotlin_version') ? rootProject.ext.kotlin_version : '1.7.21'
|
|
9
9
|
}
|
|
10
10
|
repositories {
|
|
11
11
|
google()
|
|
12
12
|
mavenCentral()
|
|
13
13
|
}
|
|
14
14
|
dependencies {
|
|
15
|
-
classpath 'com.android.tools.build:gradle:
|
|
16
|
-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$
|
|
15
|
+
classpath 'com.android.tools.build:gradle:8.0.0'
|
|
16
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -22,10 +22,10 @@ apply plugin: 'kotlin-android'
|
|
|
22
22
|
|
|
23
23
|
android {
|
|
24
24
|
namespace "ee.forgr.plugin.screenrecorder"
|
|
25
|
-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
25
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
|
|
26
26
|
defaultConfig {
|
|
27
27
|
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
|
28
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
28
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
|
|
29
29
|
versionCode 1
|
|
30
30
|
versionName "1.0"
|
|
31
31
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -40,8 +40,8 @@ android {
|
|
|
40
40
|
abortOnError false
|
|
41
41
|
}
|
|
42
42
|
compileOptions {
|
|
43
|
-
sourceCompatibility JavaVersion.
|
|
44
|
-
targetCompatibility JavaVersion.
|
|
43
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
44
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
45
45
|
}
|
|
46
46
|
kotlinOptions {
|
|
47
47
|
jvmTarget = '11'
|
|
@@ -61,6 +61,6 @@ dependencies {
|
|
|
61
61
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
62
62
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
63
63
|
implementation "androidx.core:core-ktx:$androidxCoreVersion"
|
|
64
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib
|
|
64
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
65
65
|
implementation ("dev.bmcreations:scrcast:0.3.0")
|
|
66
66
|
}
|
|
@@ -10,24 +10,24 @@ import dev.bmcreations.scrcast.config.Options;
|
|
|
10
10
|
@CapacitorPlugin(name = "ScreenRecorder")
|
|
11
11
|
public class ScreenRecorderPlugin extends Plugin {
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
private ScrCast recorder;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
@Override
|
|
16
|
+
public void load() {
|
|
17
|
+
recorder = ScrCast.use(this.bridge.getActivity());
|
|
18
|
+
Options options = new Options();
|
|
19
|
+
recorder.updateOptions(options);
|
|
20
|
+
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
@PluginMethod
|
|
23
|
+
public void start(PluginCall call) {
|
|
24
|
+
recorder.record();
|
|
25
|
+
call.resolve();
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
@PluginMethod
|
|
29
|
+
public void stop(PluginCall call) {
|
|
30
|
+
recorder.stopRecording();
|
|
31
|
+
call.resolve();
|
|
32
|
+
}
|
|
33
33
|
}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { registerPlugin } from
|
|
2
|
-
const ScreenRecorder = registerPlugin(
|
|
3
|
-
web: () => import(
|
|
1
|
+
import { registerPlugin } from "@capacitor/core";
|
|
2
|
+
const ScreenRecorder = registerPlugin("ScreenRecorder", {
|
|
3
|
+
web: () => import("./web").then((m) => new m.ScreenRecorderWeb()),
|
|
4
4
|
});
|
|
5
|
-
export * from
|
|
5
|
+
export * from "./definitions";
|
|
6
6
|
export { ScreenRecorder };
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WebPlugin } from
|
|
2
|
-
import type { ScreenRecorderPlugin } from
|
|
1
|
+
import { WebPlugin } from "@capacitor/core";
|
|
2
|
+
import type { ScreenRecorderPlugin } from "./definitions";
|
|
3
3
|
export declare class ScreenRecorderWeb extends WebPlugin implements ScreenRecorderPlugin {
|
|
4
4
|
start(): Promise<void>;
|
|
5
5
|
stop(): Promise<void>;
|
package/dist/esm/web.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { WebPlugin } from
|
|
1
|
+
import { WebPlugin } from "@capacitor/core";
|
|
2
2
|
export class ScreenRecorderWeb extends WebPlugin {
|
|
3
3
|
async start() {
|
|
4
|
-
throw new Error(
|
|
4
|
+
throw new Error("Method not implemented.");
|
|
5
5
|
}
|
|
6
6
|
async stop() {
|
|
7
|
-
throw new Error(
|
|
7
|
+
throw new Error("Method not implemented.");
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=web.js.map
|
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;AAI5C,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,iBACX,SAAQ,SAAS;IAGjB,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@capacitor/core');
|
|
4
4
|
|
|
5
|
-
const ScreenRecorder = core.registerPlugin(
|
|
5
|
+
const ScreenRecorder = core.registerPlugin("ScreenRecorder", {
|
|
6
6
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ScreenRecorderWeb()),
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
class ScreenRecorderWeb extends core.WebPlugin {
|
|
10
10
|
async start() {
|
|
11
|
-
throw new Error(
|
|
11
|
+
throw new Error("Method not implemented.");
|
|
12
12
|
}
|
|
13
13
|
async stop() {
|
|
14
|
-
throw new Error(
|
|
14
|
+
throw new Error("Method not implemented.");
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
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
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst ScreenRecorder = registerPlugin(\"ScreenRecorder\", {\n web: () => import(\"./web\").then((m) => new m.ScreenRecorderWeb()),\n});\nexport * from \"./definitions\";\nexport { ScreenRecorder };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class ScreenRecorderWeb extends WebPlugin {\n async start() {\n throw new Error(\"Method not implemented.\");\n }\n async stop() {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;AACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACrE,CAAC;;ACFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;AACjD,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var capacitorScreenRecorder = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const ScreenRecorder = core.registerPlugin(
|
|
4
|
+
const ScreenRecorder = core.registerPlugin("ScreenRecorder", {
|
|
5
5
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.ScreenRecorderWeb()),
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
class ScreenRecorderWeb extends core.WebPlugin {
|
|
9
9
|
async start() {
|
|
10
|
-
throw new Error(
|
|
10
|
+
throw new Error("Method not implemented.");
|
|
11
11
|
}
|
|
12
12
|
async stop() {
|
|
13
|
-
throw new Error(
|
|
13
|
+
throw new Error("Method not implemented.");
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
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
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst ScreenRecorder = registerPlugin(\"ScreenRecorder\", {\n web: () => import(\"./web\").then((m) => new m.ScreenRecorderWeb()),\n});\nexport * from \"./definitions\";\nexport { ScreenRecorder };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class ScreenRecorderWeb extends WebPlugin {\n async start() {\n throw new Error(\"Method not implemented.\");\n }\n async stop() {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;IACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACrE,CAAC;;ICFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;IACjD,IAAI,MAAM,KAAK,GAAG;IAClB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-screen-recorder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Record device's screen",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
34
34
|
"verify:web": "npm run build",
|
|
35
35
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
36
|
-
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --
|
|
36
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --autocorrect --format",
|
|
37
37
|
"eslint": "eslint . --ext ts",
|
|
38
|
-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
38
|
+
"prettier": "prettier --config .prettierrc.js \"**/*.{css,html,ts,js,java}\"",
|
|
39
39
|
"swiftlint": "node-swiftlint",
|
|
40
40
|
"docgen": "docgen --api ScreenRecorderPlugin --output-readme README.md --output-json dist/docs.json",
|
|
41
41
|
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
@@ -44,28 +44,28 @@
|
|
|
44
44
|
"prepublishOnly": "npm run build"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@capacitor/android": "^
|
|
48
|
-
"@capacitor/cli": "^
|
|
49
|
-
"@capacitor/core": "^
|
|
50
|
-
"@capacitor/docgen": "^0.2.
|
|
51
|
-
"@capacitor/ios": "^
|
|
47
|
+
"@capacitor/android": "^5.0.3",
|
|
48
|
+
"@capacitor/cli": "^5.0.3",
|
|
49
|
+
"@capacitor/core": "^5.0.3",
|
|
50
|
+
"@capacitor/docgen": "^0.2.1",
|
|
51
|
+
"@capacitor/ios": "^5.0.3",
|
|
52
52
|
"@ionic/eslint-config": "^0.3.0",
|
|
53
|
-
"@ionic/prettier-config": "^
|
|
53
|
+
"@ionic/prettier-config": "^3.0.0",
|
|
54
54
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
56
|
-
"@typescript-eslint/parser": "^5.
|
|
57
|
-
"eslint": "^8.
|
|
58
|
-
"eslint-plugin-import": "^2.
|
|
59
|
-
"husky": "^8.0.
|
|
60
|
-
"prettier": "^2.
|
|
61
|
-
"prettier-plugin-java": "^2.
|
|
62
|
-
"rimraf": "^
|
|
63
|
-
"rollup": "^3.
|
|
64
|
-
"swiftlint": "^1.0.
|
|
65
|
-
"typescript": "^
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
|
56
|
+
"@typescript-eslint/parser": "^5.59.7",
|
|
57
|
+
"eslint": "^8.41.0",
|
|
58
|
+
"eslint-plugin-import": "^2.27.5",
|
|
59
|
+
"husky": "^8.0.3",
|
|
60
|
+
"prettier": "^2.8.8",
|
|
61
|
+
"prettier-plugin-java": "^2.1.0",
|
|
62
|
+
"rimraf": "^5.0.1",
|
|
63
|
+
"rollup": "^3.23.0",
|
|
64
|
+
"swiftlint": "^1.0.2",
|
|
65
|
+
"typescript": "^5.0.4"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@capacitor/core": "^
|
|
68
|
+
"@capacitor/core": "^5.0.0"
|
|
69
69
|
},
|
|
70
70
|
"prettier": "@ionic/prettier-config",
|
|
71
71
|
"swiftlint": "@ionic/swiftlint-config",
|