@capgo/capacitor-mute 7.1.67 → 7.2.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/README.md +4 -0
- package/android/src/main/java/ee/forgr/plugin/mute/MutePlugin.java +13 -0
- package/dist/docs.json +21 -1
- 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/MutePlugin/MutePlugin.swift +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,4 +81,8 @@ check if the device is muted
|
|
|
81
81
|
| ----------- | -------------------- |
|
|
82
82
|
| **`value`** | <code>boolean</code> |
|
|
83
83
|
|
|
84
|
+
| Method | Signature | Description |
|
|
85
|
+
| -------------------- | -------------------------------------------- | --------------------------------------- |
|
|
86
|
+
| **getPluginVersion** | () => Promise<{ version: string; }> | Get the native Capacitor plugin version |
|
|
87
|
+
|
|
84
88
|
</docgen-api>
|
|
@@ -11,6 +11,8 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
|
11
11
|
@CapacitorPlugin(name = "Mute")
|
|
12
12
|
public class MutePlugin extends Plugin {
|
|
13
13
|
|
|
14
|
+
private final String PLUGIN_VERSION = "7.2.0";
|
|
15
|
+
|
|
14
16
|
@PluginMethod
|
|
15
17
|
public void isMuted(PluginCall call) {
|
|
16
18
|
JSObject ret = new JSObject();
|
|
@@ -22,4 +24,15 @@ public class MutePlugin extends Plugin {
|
|
|
22
24
|
}
|
|
23
25
|
call.resolve(ret);
|
|
24
26
|
}
|
|
27
|
+
|
|
28
|
+
@PluginMethod
|
|
29
|
+
public void getPluginVersion(final PluginCall call) {
|
|
30
|
+
try {
|
|
31
|
+
final JSObject ret = new JSObject();
|
|
32
|
+
ret.put("version", this.PLUGIN_VERSION);
|
|
33
|
+
call.resolve(ret);
|
|
34
|
+
} catch (final Exception e) {
|
|
35
|
+
call.reject("Could not get plugin version", e);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
25
38
|
}
|
package/dist/docs.json
CHANGED
|
@@ -26,7 +26,27 @@
|
|
|
26
26
|
"slug": "muteresponse",
|
|
27
27
|
"docs": "",
|
|
28
28
|
"tags": [],
|
|
29
|
-
"methods": [
|
|
29
|
+
"methods": [
|
|
30
|
+
{
|
|
31
|
+
"name": "getPluginVersion",
|
|
32
|
+
"signature": "() => Promise<{ version: string; }>",
|
|
33
|
+
"parameters": [],
|
|
34
|
+
"returns": "Promise<{ version: string; }>",
|
|
35
|
+
"tags": [
|
|
36
|
+
{
|
|
37
|
+
"name": "returns",
|
|
38
|
+
"text": "an Promise with version for this device"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "throws",
|
|
42
|
+
"text": "An error if the something went wrong"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"docs": "Get the native Capacitor plugin version",
|
|
46
|
+
"complexTypes": [],
|
|
47
|
+
"slug": "getpluginversion"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
30
50
|
"properties": [
|
|
31
51
|
{
|
|
32
52
|
"name": "value",
|
|
@@ -7,4 +7,13 @@ export interface MutePlugin {
|
|
|
7
7
|
}
|
|
8
8
|
export interface MuteResponse {
|
|
9
9
|
value: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Get the native Capacitor plugin version
|
|
12
|
+
*
|
|
13
|
+
* @returns {Promise<{ id: string }>} an Promise with version for this device
|
|
14
|
+
* @throws An error if the something went wrong
|
|
15
|
+
*/
|
|
16
|
+
getPluginVersion(): Promise<{
|
|
17
|
+
version: string;
|
|
18
|
+
}>;
|
|
10
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface MutePlugin {\n /**\n * check if the device is muted\n *\n */\n isMuted(): Promise<MuteResponse>;\n}\n\nexport interface MuteResponse {\n value: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface MutePlugin {\n /**\n * check if the device is muted\n *\n */\n isMuted(): Promise<MuteResponse>;\n}\n\nexport interface MuteResponse {\n value: boolean;\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
|
@@ -2,4 +2,7 @@ import { WebPlugin } from '@capacitor/core';
|
|
|
2
2
|
import type { MutePlugin, MuteResponse } from './definitions';
|
|
3
3
|
export declare class MuteWeb extends WebPlugin implements MutePlugin {
|
|
4
4
|
isMuted(): Promise<MuteResponse>;
|
|
5
|
+
getPluginVersion(): Promise<{
|
|
6
|
+
version: string;
|
|
7
|
+
}>;
|
|
5
8
|
}
|
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,OAAQ,SAAQ,SAAS;IACpC,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { MutePlugin, MuteResponse } from './definitions';\n\nexport class MuteWeb extends WebPlugin implements MutePlugin {\n async isMuted(): Promise<MuteResponse> {\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,OAAQ,SAAQ,SAAS;IACpC,KAAK,CAAC,OAAO;QACX,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 { MutePlugin, MuteResponse } from './definitions';\n\nexport class MuteWeb extends WebPlugin implements MutePlugin {\n async isMuted(): Promise<MuteResponse> {\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 Mute = registerPlugin('Mute', {\n web: () => import('./web').then((m) => new m.MuteWeb()),\n});\nexport * from './definitions';\nexport { Mute };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class MuteWeb extends WebPlugin {\n async isMuted() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;AACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;AAC3D,CAAC;;ACFM,MAAM,OAAO,SAASC,cAAS,CAAC;AACvC,IAAI,MAAM,OAAO,GAAG;AACpB,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 Mute = registerPlugin('Mute', {\n web: () => import('./web').then((m) => new m.MuteWeb()),\n});\nexport * from './definitions';\nexport { Mute };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class MuteWeb extends WebPlugin {\n async isMuted() {\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,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;AACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;AAC3D,CAAC;;ACFM,MAAM,OAAO,SAASC,cAAS,CAAC;AACvC,IAAI,MAAM,OAAO,GAAG;AACpB,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 Mute = registerPlugin('Mute', {\n web: () => import('./web').then((m) => new m.MuteWeb()),\n});\nexport * from './definitions';\nexport { Mute };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class MuteWeb extends WebPlugin {\n async isMuted() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;IACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IAC3D,CAAC;;ICFM,MAAM,OAAO,SAASC,cAAS,CAAC;IACvC,IAAI,MAAM,OAAO,GAAG;IACpB,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 Mute = registerPlugin('Mute', {\n web: () => import('./web').then((m) => new m.MuteWeb()),\n});\nexport * from './definitions';\nexport { Mute };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class MuteWeb extends WebPlugin {\n async isMuted() {\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,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;IACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IAC3D,CAAC;;ICFM,MAAM,OAAO,SAASC,cAAS,CAAC;IACvC,IAAI,MAAM,OAAO,GAAG;IACpB,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,10 +7,12 @@ import Capacitor
|
|
|
7
7
|
*/
|
|
8
8
|
@objc(MutePlugin)
|
|
9
9
|
public class MutePlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
+
private let PLUGIN_VERSION: String = "7.2.0"
|
|
10
11
|
public let identifier = "MutePlugin"
|
|
11
12
|
public let jsName = "Mute"
|
|
12
13
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
13
|
-
CAPPluginMethod(name: "isMuted", returnType: CAPPluginReturnPromise)
|
|
14
|
+
CAPPluginMethod(name: "isMuted", returnType: CAPPluginReturnPromise),
|
|
15
|
+
CAPPluginMethod(name: "getPluginVersion", returnType: CAPPluginReturnPromise)
|
|
14
16
|
]
|
|
15
17
|
private let implementation = Muted()
|
|
16
18
|
override public func load() {
|
|
@@ -24,4 +26,9 @@ public class MutePlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
24
26
|
])
|
|
25
27
|
}
|
|
26
28
|
}
|
|
29
|
+
|
|
30
|
+
@objc func getPluginVersion(_ call: CAPPluginCall) {
|
|
31
|
+
call.resolve(["version": self.PLUGIN_VERSION])
|
|
32
|
+
}
|
|
33
|
+
|
|
27
34
|
}
|