@capgo/capacitor-screen-recorder 7.1.16 → 7.1.22

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.
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
10
10
  s.homepage = package['repository']['url']
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
- s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
13
+ s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.ios.deployment_target = '14.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.swift_version = '5.1'
package/Package.swift ADDED
@@ -0,0 +1,28 @@
1
+ // swift-tools-version: 5.9
2
+ import PackageDescription
3
+
4
+ let package = Package(
5
+ name: "CapgoCapacitorScreenRecorder",
6
+ platforms: [.iOS(.v14)],
7
+ products: [
8
+ .library(
9
+ name: "CapgoCapacitorScreenRecorder",
10
+ targets: ["ScreenRecorderPlugin"])
11
+ ],
12
+ dependencies: [
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
14
+ ],
15
+ targets: [
16
+ .target(
17
+ name: "ScreenRecorderPlugin",
18
+ dependencies: [
19
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
+ .product(name: "Cordova", package: "capacitor-swift-pm")
21
+ ],
22
+ path: "ios/Sources/ScreenRecorderPlugin"),
23
+ .testTarget(
24
+ name: "ScreenRecorderPluginTests",
25
+ dependencies: ["ScreenRecorderPlugin"],
26
+ path: "ios/Tests/ScreenRecorderPluginTests")
27
+ ]
28
+ )
@@ -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
- private ScrCast recorder;
13
+ private ScrCast recorder;
14
14
 
15
- @Override
16
- public void load() {
17
- recorder = ScrCast.use(this.bridge.getActivity());
18
- Options options = new Options();
19
- recorder.updateOptions(options);
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
- @PluginMethod
23
- public void start(PluginCall call) {
24
- recorder.record();
25
- call.resolve();
26
- }
22
+ @PluginMethod
23
+ public void start(PluginCall call) {
24
+ recorder.record();
25
+ call.resolve();
26
+ }
27
27
 
28
- @PluginMethod
29
- public void stop(PluginCall call) {
30
- recorder.stopRecording();
31
- call.resolve();
32
- }
28
+ @PluginMethod
29
+ public void stop(PluginCall call) {
30
+ recorder.stopRecording();
31
+ call.resolve();
32
+ }
33
33
  }
@@ -1,4 +1,4 @@
1
- import type { ScreenRecorderPlugin } from "./definitions";
1
+ import type { ScreenRecorderPlugin } from './definitions';
2
2
  declare const ScreenRecorder: ScreenRecorderPlugin;
3
- export * from "./definitions";
3
+ export * from './definitions';
4
4
  export { ScreenRecorder };
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { registerPlugin } from "@capacitor/core";
2
- const ScreenRecorder = registerPlugin("ScreenRecorder", {
3
- web: () => import("./web").then((m) => new m.ScreenRecorderWeb()),
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 "./definitions";
5
+ export * from './definitions';
6
6
  export { ScreenRecorder };
7
7
  //# sourceMappingURL=index.js.map
@@ -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,cAAc,GAAG,cAAc,CAAuB,gBAAgB,EAAE;IAC5E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;CAClE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\n\nimport type { ScreenRecorderPlugin } from \"./definitions\";\n\nconst ScreenRecorder = registerPlugin<ScreenRecorderPlugin>(\"ScreenRecorder\", {\n web: () => import(\"./web\").then((m) => new m.ScreenRecorderWeb()),\n});\n\nexport * from \"./definitions\";\nexport { ScreenRecorder };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,cAAc,GAAG,cAAc,CAAuB,gBAAgB,EAAE;IAC5E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;CAClE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { ScreenRecorderPlugin } from './definitions';\n\nconst ScreenRecorder = registerPlugin<ScreenRecorderPlugin>('ScreenRecorder', {\n web: () => import('./web').then((m) => new m.ScreenRecorderWeb()),\n});\n\nexport * from './definitions';\nexport { ScreenRecorder };\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { WebPlugin } from "@capacitor/core";
2
- import type { ScreenRecorderPlugin } from "./definitions";
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 "@capacitor/core";
1
+ import { WebPlugin } from '@capacitor/core';
2
2
  export class ScreenRecorderWeb extends WebPlugin {
3
3
  async start() {
4
- throw new Error("Method not implemented.");
4
+ throw new Error('Method not implemented.');
5
5
  }
6
6
  async stop() {
7
- throw new Error("Method not implemented.");
7
+ throw new Error('Method not implemented.');
8
8
  }
9
9
  }
10
10
  //# sourceMappingURL=web.js.map
@@ -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,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","sourcesContent":["import { WebPlugin } from \"@capacitor/core\";\n\nimport type { ScreenRecorderPlugin } from \"./definitions\";\n\nexport class ScreenRecorderWeb\n extends WebPlugin\n implements ScreenRecorderPlugin\n{\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;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"]}
@@ -2,16 +2,16 @@
2
2
 
3
3
  var core = require('@capacitor/core');
4
4
 
5
- const ScreenRecorder = core.registerPlugin("ScreenRecorder", {
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("Method not implemented.");
11
+ throw new Error('Method not implemented.');
12
12
  }
13
13
  async stop() {
14
- throw new Error("Method not implemented.");
14
+ throw new Error('Method not implemented.');
15
15
  }
16
16
  }
17
17
 
@@ -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;AACA,IAAI,MAAM,IAAI,GAAG;AACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA;;;;;;;;;"}
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;;;;;;;;;"}
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("ScreenRecorder", {
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("Method not implemented.");
10
+ throw new Error('Method not implemented.');
11
11
  }
12
12
  async stop() {
13
- throw new Error("Method not implemented.");
13
+ throw new Error('Method not implemented.');
14
14
  }
15
15
  }
16
16
 
@@ -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;IACA,IAAI,MAAM,IAAI,GAAG;IACjB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA;;;;;;;;;;;;;;;"}
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;;;;;;;;;;;;;;;"}
@@ -0,0 +1,13 @@
1
+ import XCTest
2
+ @testable import ScreenRecorderPlugin
3
+
4
+ final class ScreenRecorderPluginTests: XCTestCase {
5
+ func testEcho() {
6
+ // Ensure the sample helper still returns the provided value.
7
+ let implementation = ScreenRecorder()
8
+ let value = "Hello, World!"
9
+ let result = implementation.echo(value)
10
+
11
+ XCTAssertEqual(value, result)
12
+ }
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-screen-recorder",
3
- "version": "7.1.16",
3
+ "version": "7.1.22",
4
4
  "description": "Record device's screen",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -10,7 +10,9 @@
10
10
  "android/src/main/",
11
11
  "android/build.gradle",
12
12
  "dist/",
13
- "ios/Plugin/",
13
+ "ios/Sources",
14
+ "ios/Tests",
15
+ "Package.swift",
14
16
  "CapgoCapacitorScreenRecorder.podspec"
15
17
  ],
16
18
  "author": "Martin Donadieu",
@@ -29,13 +31,13 @@
29
31
  ],
30
32
  "scripts": {
31
33
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
32
- "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -sdk iphoneos -scheme Plugin && cd ..",
34
+ "verify:ios": "xcodebuild -scheme CapgoCapacitorScreenRecorder -destination generic/platform=iOS",
33
35
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
34
36
  "verify:web": "npm run build",
35
37
  "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 -- --autocorrect --format",
37
- "eslint": "eslint .",
38
- "prettier": "prettier --config .prettierrc.js \"**/*.{css,html,ts,js,java}\"",
38
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
39
+ "eslint": "eslint . --ext ts",
40
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
39
41
  "swiftlint": "node-swiftlint",
40
42
  "docgen": "docgen --api ScreenRecorderPlugin --output-readme README.md --output-json dist/docs.json",
41
43
  "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
@@ -45,32 +47,28 @@
45
47
  },
46
48
  "devDependencies": {
47
49
  "@capacitor/android": "^7.0.0",
48
- "@capacitor/cli": "^7.0.0",
49
50
  "@capacitor/core": "^7.0.0",
50
51
  "@capacitor/docgen": "^0.3.0",
51
52
  "@capacitor/ios": "^7.0.0",
52
53
  "@ionic/eslint-config": "^0.4.0",
53
54
  "@ionic/prettier-config": "^4.0.0",
54
55
  "@ionic/swiftlint-config": "^2.0.0",
55
- "@types/node": "^24.0.0",
56
56
  "eslint": "^8.57.0",
57
- "eslint-plugin-import": "^2.31.0",
58
- "husky": "^9.1.7",
59
57
  "prettier": "^3.4.2",
60
- "prettier-plugin-java": "^2.6.7",
58
+ "prettier-plugin-java": "^2.6.6",
61
59
  "rimraf": "^6.0.1",
62
- "rollup": "^4.34.6",
60
+ "rollup": "^4.30.1",
63
61
  "swiftlint": "^2.0.0",
64
- "typescript": "^5.7.3"
62
+ "typescript": "~4.1.5"
65
63
  },
66
64
  "peerDependencies": {
67
65
  "@capacitor/core": ">=7.0.0"
68
66
  },
67
+ "prettier": "@ionic/prettier-config",
68
+ "swiftlint": "@ionic/swiftlint-config",
69
69
  "eslintConfig": {
70
70
  "extends": "@ionic/eslint-config/recommended"
71
71
  },
72
- "prettier": "@ionic/prettier-config",
73
- "swiftlint": "@ionic/swiftlint-config",
74
72
  "capacitor": {
75
73
  "ios": {
76
74
  "src": "ios"
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>CFBundleDevelopmentRegion</key>
6
- <string>$(DEVELOPMENT_LANGUAGE)</string>
7
- <key>CFBundleExecutable</key>
8
- <string>$(EXECUTABLE_NAME)</string>
9
- <key>CFBundleIdentifier</key>
10
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
- <key>CFBundleInfoDictionaryVersion</key>
12
- <string>6.0</string>
13
- <key>CFBundleName</key>
14
- <string>$(PRODUCT_NAME)</string>
15
- <key>CFBundlePackageType</key>
16
- <string>FMWK</string>
17
- <key>CFBundleShortVersionString</key>
18
- <string>1.0</string>
19
- <key>CFBundleVersion</key>
20
- <string>$(CURRENT_PROJECT_VERSION)</string>
21
- <key>NSPrincipalClass</key>
22
- <string></string>
23
- </dict>
24
- </plist>