@capgo/capacitor-screen-recorder 7.1.1 → 7.1.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 CHANGED
@@ -19,14 +19,29 @@ npx cap sync
19
19
  add NSPhotoLibraryUsageDescription in your info.plist
20
20
 
21
21
  ## Android
22
- increase project's minSdk version to 23, it's required by the dependency scrcast
22
+ increase project's minSdk version to 23, it's required by the dependency HBRecorder
23
23
 
24
- Add this permissions in your `AndroidManifest.xml`
24
+ Add these permissions in your `AndroidManifest.xml`:
25
25
  ```xml
26
- <uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
27
- <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
26
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
27
+ <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
28
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
29
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
30
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
28
31
  ```
29
32
 
33
+ ### Add JitPack Repository
34
+ Add JitPack repository to your Android app's build.gradle (android/app/build.gradle):
35
+
36
+ ```gradle
37
+ allprojects {
38
+ repositories {
39
+ google()
40
+ mavenCentral()
41
+ maven { url 'https://jitpack.io/' }
42
+ }
43
+ }
44
+ ```
30
45
 
31
46
  ### Variables
32
47
 
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface ScreenRecorderPlugin {\n /**\n * start the recording\n *\n */\n start(): Promise<void>;\n /**\n * stop the recording\n *\n */\n stop(): Promise<void>;\n}\n"]}
@@ -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"}
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 +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"}
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"]}
@@ -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.1.1",
3
+ "version": "7.1.3",
4
4
  "description": "Record device's screen",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -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
- )