@capgo/capacitor-screen-recorder 7.1.23 → 7.2.3
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/README.md +14 -0
- package/android/src/main/java/ee/forgr/plugin/screenrecorder/ScreenRecorderPlugin.java +14 -0
- package/dist/docs.json +19 -0
- package/dist/esm/definitions.d.ts +9 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +3 -0
- package/dist/esm/web.js +3 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +3 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/ScreenRecorderPlugin/ScreenRecorderPlugin.swift +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,6 +74,7 @@ No configuration required for this plugin.
|
|
|
74
74
|
|
|
75
75
|
* [`start(...)`](#start)
|
|
76
76
|
* [`stop()`](#stop)
|
|
77
|
+
* [`getPluginVersion()`](#getpluginversion)
|
|
77
78
|
|
|
78
79
|
</docgen-index>
|
|
79
80
|
|
|
@@ -105,4 +106,17 @@ stop the recording
|
|
|
105
106
|
|
|
106
107
|
--------------------
|
|
107
108
|
|
|
109
|
+
|
|
110
|
+
### getPluginVersion()
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
getPluginVersion() => Promise<{ version: string; }>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Get the native Capacitor plugin version
|
|
117
|
+
|
|
118
|
+
**Returns:** <code>Promise<{ version: string; }></code>
|
|
119
|
+
|
|
120
|
+
--------------------
|
|
121
|
+
|
|
108
122
|
</docgen-api>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package ee.forgr.plugin.screenrecorder;
|
|
2
2
|
|
|
3
|
+
import com.getcapacitor.JSObject;
|
|
3
4
|
import com.getcapacitor.Plugin;
|
|
4
5
|
import com.getcapacitor.PluginCall;
|
|
5
6
|
import com.getcapacitor.PluginMethod;
|
|
@@ -10,6 +11,8 @@ import dev.bmcreations.scrcast.config.Options;
|
|
|
10
11
|
@CapacitorPlugin(name = "ScreenRecorder")
|
|
11
12
|
public class ScreenRecorderPlugin extends Plugin {
|
|
12
13
|
|
|
14
|
+
private final String PLUGIN_VERSION = "7.2.3";
|
|
15
|
+
|
|
13
16
|
private ScrCast recorder;
|
|
14
17
|
|
|
15
18
|
@Override
|
|
@@ -30,4 +33,15 @@ public class ScreenRecorderPlugin extends Plugin {
|
|
|
30
33
|
recorder.stopRecording();
|
|
31
34
|
call.resolve();
|
|
32
35
|
}
|
|
36
|
+
|
|
37
|
+
@PluginMethod
|
|
38
|
+
public void getPluginVersion(final PluginCall call) {
|
|
39
|
+
try {
|
|
40
|
+
final JSObject ret = new JSObject();
|
|
41
|
+
ret.put("version", this.PLUGIN_VERSION);
|
|
42
|
+
call.resolve(ret);
|
|
43
|
+
} catch (final Exception e) {
|
|
44
|
+
call.reject("Could not get plugin version", e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
33
47
|
}
|
package/dist/docs.json
CHANGED
|
@@ -35,6 +35,25 @@
|
|
|
35
35
|
"docs": "stop the recording",
|
|
36
36
|
"complexTypes": [],
|
|
37
37
|
"slug": "stop"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "getPluginVersion",
|
|
41
|
+
"signature": "() => Promise<{ version: string; }>",
|
|
42
|
+
"parameters": [],
|
|
43
|
+
"returns": "Promise<{ version: string; }>",
|
|
44
|
+
"tags": [
|
|
45
|
+
{
|
|
46
|
+
"name": "returns",
|
|
47
|
+
"text": "an Promise with version for this device"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "throws",
|
|
51
|
+
"text": "An error if the something went wrong"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"docs": "Get the native Capacitor plugin version",
|
|
55
|
+
"complexTypes": [],
|
|
56
|
+
"slug": "getpluginversion"
|
|
38
57
|
}
|
|
39
58
|
],
|
|
40
59
|
"properties": []
|
|
@@ -10,4 +10,13 @@ export interface ScreenRecorderPlugin {
|
|
|
10
10
|
* stop the recording
|
|
11
11
|
*/
|
|
12
12
|
stop(): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Get the native Capacitor plugin version
|
|
15
|
+
*
|
|
16
|
+
* @returns {Promise<{ id: string }>} an Promise with version for this device
|
|
17
|
+
* @throws An error if the something went wrong
|
|
18
|
+
*/
|
|
19
|
+
getPluginVersion(): Promise<{
|
|
20
|
+
version: string;
|
|
21
|
+
}>;
|
|
13
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface ScreenRecorderPlugin {\n /**\n * start the recording\n * @param options Recording options\n */\n start(options?: { recordAudio?: boolean }): Promise<void>;\n /**\n * stop the recording\n */\n stop(): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface ScreenRecorderPlugin {\n /**\n * start the recording\n * @param options Recording options\n */\n start(options?: { recordAudio?: boolean }): Promise<void>;\n /**\n * stop the recording\n */\n stop(): Promise<void>;\n\n /**\n * Get the native Capacitor plugin version\n *\n * @returns {Promise<{ id: string }>} an Promise with version for this device\n * @throws An error if the something went wrong\n */\n getPluginVersion(): Promise<{ version: string }>;\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
package/dist/esm/web.js
CHANGED
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,iBAAkB,SAAQ,SAAS;IAC9C,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","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ScreenRecorderPlugin } from './definitions';\n\nexport class ScreenRecorderWeb extends WebPlugin implements ScreenRecorderPlugin {\n async start(): Promise<void> {\n throw new Error('Method not implemented.');\n }\n async stop(): Promise<void> {\n throw new Error('Method not implemented.');\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAC9C,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;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ScreenRecorderPlugin } from './definitions';\n\nexport class ScreenRecorderWeb extends WebPlugin implements ScreenRecorderPlugin {\n async start(): Promise<void> {\n throw new Error('Method not implemented.');\n }\n async stop(): Promise<void> {\n throw new Error('Method not implemented.');\n }\n\n async getPluginVersion(): Promise<{ version: string }> {\n return { version: 'web' };\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
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 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;AAClD,IAAI;AACJ,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD,IAAI;AACJ;;;;;;;;;"}
|
|
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 async getPluginVersion() {\n return { version: 'web' };\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;AAClD,IAAI;AACJ,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
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 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;IAClD,IAAI;IACJ,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
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 async getPluginVersion() {\n return { version: 'web' };\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;IAClD,IAAI;IACJ,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
@@ -7,11 +7,13 @@ import Capacitor
|
|
|
7
7
|
*/
|
|
8
8
|
@objc(ScreenRecorderPlugin)
|
|
9
9
|
public class ScreenRecorderPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
+
private let PLUGIN_VERSION: String = "7.2.3"
|
|
10
11
|
public let identifier = "ScreenRecorderPlugin"
|
|
11
12
|
public let jsName = "ScreenRecorder"
|
|
12
13
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
13
14
|
CAPPluginMethod(name: "start", returnType: CAPPluginReturnPromise),
|
|
14
|
-
CAPPluginMethod(name: "stop", returnType: CAPPluginReturnPromise)
|
|
15
|
+
CAPPluginMethod(name: "stop", returnType: CAPPluginReturnPromise),
|
|
16
|
+
CAPPluginMethod(name: "getPluginVersion", returnType: CAPPluginReturnPromise)
|
|
15
17
|
]
|
|
16
18
|
private let implementation = ScreenRecorder()
|
|
17
19
|
|
|
@@ -35,4 +37,9 @@ public class ScreenRecorderPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
35
37
|
}
|
|
36
38
|
})
|
|
37
39
|
}
|
|
40
|
+
|
|
41
|
+
@objc func getPluginVersion(_ call: CAPPluginCall) {
|
|
42
|
+
call.resolve(["version": self.PLUGIN_VERSION])
|
|
43
|
+
}
|
|
44
|
+
|
|
38
45
|
}
|