@capgo/capacitor-screen-recorder 7.0.0 → 7.1.2
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/CapgoCapacitorScreenRecorder.podspec +1 -1
- package/README.md +15 -12
- package/android/build.gradle +9 -9
- package/dist/docs.json +4 -4
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/ScreenRecorderPlugin.swift +7 -1
- package/package.json +26 -27
- package/ios/Plugin/ScreenRecorderPlugin.h +0 -10
- package/ios/Plugin/ScreenRecorderPlugin.m +0 -9
|
@@ -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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Capacitor-screen-recorder
|
|
2
|
+
<a href="https://capgo.app/"><img src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/></a>
|
|
3
|
+
|
|
4
4
|
<div align="center">
|
|
5
|
-
<h2><a href="https://capgo.app
|
|
5
|
+
<h2><a href="https://capgo.app/?ref=plugin"> ➡️ Get Instant updates for your App with Capgo 🚀</a></h2>
|
|
6
|
+
<h2><a href="https://capgo.app/consulting/?ref=plugin"> Fix your annoying bug now, Hire a Capacitor expert 💪</a></h2>
|
|
6
7
|
</div>
|
|
7
|
-
|
|
8
8
|
Record device's screen
|
|
9
9
|
|
|
10
10
|
## Install
|
|
@@ -16,11 +16,18 @@ npx cap sync
|
|
|
16
16
|
|
|
17
17
|
## IOS
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
add NSPhotoLibraryUsageDescription in your info.plist
|
|
20
20
|
|
|
21
21
|
## Android
|
|
22
22
|
increase project's minSdk version to 23, it's required by the dependency scrcast
|
|
23
23
|
|
|
24
|
+
Add this permissions in your `AndroidManifest.xml`
|
|
25
|
+
```xml
|
|
26
|
+
<uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
|
|
27
|
+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
|
|
24
31
|
### Variables
|
|
25
32
|
|
|
26
33
|
This plugin will use the following project variables (defined in your app's `variables.gradle` file):
|
|
@@ -61,26 +68,22 @@ No configuration required for this plugin.
|
|
|
61
68
|
### start()
|
|
62
69
|
|
|
63
70
|
```typescript
|
|
64
|
-
start() =>
|
|
71
|
+
start() => Promise<void>
|
|
65
72
|
```
|
|
66
73
|
|
|
67
74
|
start the recording
|
|
68
75
|
|
|
69
|
-
**Returns:** <code>any</code>
|
|
70
|
-
|
|
71
76
|
--------------------
|
|
72
77
|
|
|
73
78
|
|
|
74
79
|
### stop()
|
|
75
80
|
|
|
76
81
|
```typescript
|
|
77
|
-
stop() =>
|
|
82
|
+
stop() => Promise<void>
|
|
78
83
|
```
|
|
79
84
|
|
|
80
85
|
stop the recording
|
|
81
86
|
|
|
82
|
-
**Returns:** <code>any</code>
|
|
83
|
-
|
|
84
87
|
--------------------
|
|
85
88
|
|
|
86
89
|
</docgen-api>
|
package/android/build.gradle
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
ext {
|
|
3
3
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
6
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.
|
|
7
|
-
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
|
6
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
|
|
7
|
+
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.15.0'
|
|
8
8
|
kotlin_version = project.hasProperty('kotlin_version') ? rootProject.ext.kotlin_version : '1.7.21'
|
|
9
9
|
}
|
|
10
10
|
repositories {
|
|
@@ -12,7 +12,7 @@ buildscript {
|
|
|
12
12
|
mavenCentral()
|
|
13
13
|
}
|
|
14
14
|
dependencies {
|
|
15
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
15
|
+
classpath 'com.android.tools.build:gradle:8.7.3'
|
|
16
16
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -22,10 +22,10 @@ apply plugin: 'kotlin-android'
|
|
|
22
22
|
|
|
23
23
|
android {
|
|
24
24
|
namespace "ee.forgr.plugin.screenrecorder"
|
|
25
|
-
|
|
25
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
|
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 : 35
|
|
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_21
|
|
44
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
45
45
|
}
|
|
46
46
|
kotlinOptions {
|
|
47
47
|
jvmTarget = '11'
|
package/dist/docs.json
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"methods": [
|
|
8
8
|
{
|
|
9
9
|
"name": "start",
|
|
10
|
-
"signature": "() =>
|
|
10
|
+
"signature": "() => Promise<void>",
|
|
11
11
|
"parameters": [],
|
|
12
|
-
"returns": "
|
|
12
|
+
"returns": "Promise<void>",
|
|
13
13
|
"tags": [],
|
|
14
14
|
"docs": "start the recording",
|
|
15
15
|
"complexTypes": [],
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "stop",
|
|
20
|
-
"signature": "() =>
|
|
20
|
+
"signature": "() => Promise<void>",
|
|
21
21
|
"parameters": [],
|
|
22
|
-
"returns": "
|
|
22
|
+
"returns": "Promise<void>",
|
|
23
23
|
"tags": [],
|
|
24
24
|
"docs": "stop the recording",
|
|
25
25
|
"complexTypes": [],
|
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
|
|
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;AACA,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA;;;;;;;;;"}
|
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
|
|
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;IACA,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,13 @@ import Capacitor
|
|
|
6
6
|
* here: https://capacitorjs.com/docs/plugins/ios
|
|
7
7
|
*/
|
|
8
8
|
@objc(ScreenRecorderPlugin)
|
|
9
|
-
public class ScreenRecorderPlugin: CAPPlugin {
|
|
9
|
+
public class ScreenRecorderPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
+
public let identifier = "ScreenRecorderPlugin"
|
|
11
|
+
public let jsName = "ScreenRecorder"
|
|
12
|
+
public let pluginMethods: [CAPPluginMethod] = [
|
|
13
|
+
CAPPluginMethod(name: "start", returnType: CAPPluginReturnPromise),
|
|
14
|
+
CAPPluginMethod(name: "stop", returnType: CAPPluginReturnPromise)
|
|
15
|
+
]
|
|
10
16
|
private let implementation = ScreenRecorder()
|
|
11
17
|
|
|
12
18
|
@objc func start(_ call: CAPPluginCall) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-screen-recorder",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"description": "Record device's screen",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/
|
|
20
|
+
"url": "git+https://github.com/Cap-go/capacitor-screen-recorder.git"
|
|
21
21
|
},
|
|
22
22
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/
|
|
23
|
+
"url": "https://github.com/Cap-go/capacitor-screen-recorder/issues"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"capacitor",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
32
|
-
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
|
|
32
|
+
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -sdk iphoneos -scheme Plugin && cd ..",
|
|
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
36
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --autocorrect --format",
|
|
37
|
-
"eslint": "eslint .
|
|
37
|
+
"eslint": "eslint .",
|
|
38
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",
|
|
@@ -44,34 +44,33 @@
|
|
|
44
44
|
"prepublishOnly": "npm run build"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@capacitor/android": "^
|
|
48
|
-
"@capacitor/cli": "^
|
|
49
|
-
"@capacitor/core": "^
|
|
50
|
-
"@capacitor/docgen": "^0.
|
|
51
|
-
"@capacitor/ios": "^
|
|
52
|
-
"@ionic/eslint-config": "^0.
|
|
53
|
-
"@ionic/prettier-config": "^
|
|
54
|
-
"@ionic/swiftlint-config": "^
|
|
55
|
-
"@
|
|
56
|
-
"
|
|
57
|
-
"eslint": "^
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"prettier": "^2.
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"typescript": "^5.0.4"
|
|
47
|
+
"@capacitor/android": "^7.0.0",
|
|
48
|
+
"@capacitor/cli": "^7.0.0",
|
|
49
|
+
"@capacitor/core": "^7.0.0",
|
|
50
|
+
"@capacitor/docgen": "^0.3.0",
|
|
51
|
+
"@capacitor/ios": "^7.0.0",
|
|
52
|
+
"@ionic/eslint-config": "^0.4.0",
|
|
53
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
54
|
+
"@ionic/swiftlint-config": "^2.0.0",
|
|
55
|
+
"@types/node": "^22.13.1",
|
|
56
|
+
"eslint": "^8.57.0",
|
|
57
|
+
"eslint-plugin-import": "^2.31.0",
|
|
58
|
+
"husky": "^9.1.7",
|
|
59
|
+
"prettier": "^3.4.2",
|
|
60
|
+
"prettier-plugin-java": "^2.6.7",
|
|
61
|
+
"rimraf": "^6.0.1",
|
|
62
|
+
"rollup": "^4.34.6",
|
|
63
|
+
"swiftlint": "^2.0.0",
|
|
64
|
+
"typescript": "^5.7.3"
|
|
66
65
|
},
|
|
67
66
|
"peerDependencies": {
|
|
68
|
-
"@capacitor/core": "
|
|
67
|
+
"@capacitor/core": ">=7.0.0"
|
|
69
68
|
},
|
|
70
|
-
"prettier": "@ionic/prettier-config",
|
|
71
|
-
"swiftlint": "@ionic/swiftlint-config",
|
|
72
69
|
"eslintConfig": {
|
|
73
70
|
"extends": "@ionic/eslint-config/recommended"
|
|
74
71
|
},
|
|
72
|
+
"prettier": "@ionic/prettier-config",
|
|
73
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
75
74
|
"capacitor": {
|
|
76
75
|
"ios": {
|
|
77
76
|
"src": "ios"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
|
|
3
|
-
//! Project version number for Plugin.
|
|
4
|
-
FOUNDATION_EXPORT double PluginVersionNumber;
|
|
5
|
-
|
|
6
|
-
//! Project version string for Plugin.
|
|
7
|
-
FOUNDATION_EXPORT const unsigned char PluginVersionString[];
|
|
8
|
-
|
|
9
|
-
// In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
|
|
10
|
-
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
#import <Capacitor/Capacitor.h>
|
|
3
|
-
|
|
4
|
-
// Define the plugin using the CAP_PLUGIN Macro, and
|
|
5
|
-
// each method the plugin supports using the CAP_PLUGIN_METHOD macro.
|
|
6
|
-
CAP_PLUGIN(ScreenRecorderPlugin, "ScreenRecorder",
|
|
7
|
-
CAP_PLUGIN_METHOD(start, CAPPluginReturnPromise);
|
|
8
|
-
CAP_PLUGIN_METHOD(stop, CAPPluginReturnPromise);
|
|
9
|
-
)
|