@capgo/capacitor-mute 7.2.1 → 7.3.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/README.md
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
Detect if the mute switch is enabled/disabled on a device
|
|
11
11
|
|
|
12
|
+
## Documentation
|
|
13
|
+
|
|
14
|
+
The most complete doc is available here: https://capgo.app/docs/plugins/mute/
|
|
15
|
+
|
|
12
16
|
## Install
|
|
13
17
|
|
|
14
18
|
```bash
|
|
@@ -52,6 +56,7 @@ If no answer I will add the code directly to capacitor-mute
|
|
|
52
56
|
<docgen-index>
|
|
53
57
|
|
|
54
58
|
* [`isMuted()`](#ismuted)
|
|
59
|
+
* [`getPluginVersion()`](#getpluginversion)
|
|
55
60
|
* [Interfaces](#interfaces)
|
|
56
61
|
|
|
57
62
|
</docgen-index>
|
|
@@ -59,16 +64,35 @@ If no answer I will add the code directly to capacitor-mute
|
|
|
59
64
|
<docgen-api>
|
|
60
65
|
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
61
66
|
|
|
67
|
+
Capacitor Mute Plugin for detecting device mute status.
|
|
68
|
+
|
|
62
69
|
### isMuted()
|
|
63
70
|
|
|
64
71
|
```typescript
|
|
65
72
|
isMuted() => Promise<MuteResponse>
|
|
66
73
|
```
|
|
67
74
|
|
|
68
|
-
|
|
75
|
+
Check if the device mute switch is enabled.
|
|
69
76
|
|
|
70
77
|
**Returns:** <code>Promise<<a href="#muteresponse">MuteResponse</a>></code>
|
|
71
78
|
|
|
79
|
+
**Since:** 1.0.0
|
|
80
|
+
|
|
81
|
+
--------------------
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### getPluginVersion()
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
getPluginVersion() => Promise<{ version: string; }>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Get the native Capacitor plugin version.
|
|
91
|
+
|
|
92
|
+
**Returns:** <code>Promise<{ version: string; }></code>
|
|
93
|
+
|
|
94
|
+
**Since:** 1.0.0
|
|
95
|
+
|
|
72
96
|
--------------------
|
|
73
97
|
|
|
74
98
|
|
|
@@ -77,12 +101,10 @@ check if the device is muted
|
|
|
77
101
|
|
|
78
102
|
#### MuteResponse
|
|
79
103
|
|
|
80
|
-
|
|
81
|
-
| ----------- | -------------------- |
|
|
82
|
-
| **`value`** | <code>boolean</code> |
|
|
104
|
+
Response from mute status check.
|
|
83
105
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
106
|
+
| Prop | Type | Description |
|
|
107
|
+
| ----------- | -------------------- | ---------------------------------------- |
|
|
108
|
+
| **`value`** | <code>boolean</code> | True if device is muted, false otherwise |
|
|
87
109
|
|
|
88
110
|
</docgen-api>
|
|
@@ -11,7 +11,7 @@ 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
|
|
14
|
+
private final String PLUGIN_VERSION = "7.3.2";
|
|
15
15
|
|
|
16
16
|
@PluginMethod
|
|
17
17
|
public void isMuted(PluginCall call) {
|
package/dist/docs.json
CHANGED
|
@@ -2,20 +2,69 @@
|
|
|
2
2
|
"api": {
|
|
3
3
|
"name": "MutePlugin",
|
|
4
4
|
"slug": "muteplugin",
|
|
5
|
-
"docs": "",
|
|
6
|
-
"tags": [
|
|
5
|
+
"docs": "Capacitor Mute Plugin for detecting device mute status.",
|
|
6
|
+
"tags": [
|
|
7
|
+
{
|
|
8
|
+
"text": "1.0.0",
|
|
9
|
+
"name": "since"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
7
12
|
"methods": [
|
|
8
13
|
{
|
|
9
14
|
"name": "isMuted",
|
|
10
15
|
"signature": "() => Promise<MuteResponse>",
|
|
11
16
|
"parameters": [],
|
|
12
17
|
"returns": "Promise<MuteResponse>",
|
|
13
|
-
"tags": [
|
|
14
|
-
|
|
18
|
+
"tags": [
|
|
19
|
+
{
|
|
20
|
+
"name": "returns",
|
|
21
|
+
"text": "Promise that resolves with the mute status"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "throws",
|
|
25
|
+
"text": "Error if checking mute status fails"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "since",
|
|
29
|
+
"text": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "example",
|
|
33
|
+
"text": "```typescript\nconst { value } = await Mute.isMuted();\nif (value) {\n console.log('Device is muted');\n} else {\n console.log('Device is not muted');\n}\n```"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"docs": "Check if the device mute switch is enabled.",
|
|
15
37
|
"complexTypes": [
|
|
16
38
|
"MuteResponse"
|
|
17
39
|
],
|
|
18
40
|
"slug": "ismuted"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "getPluginVersion",
|
|
44
|
+
"signature": "() => Promise<{ version: string; }>",
|
|
45
|
+
"parameters": [],
|
|
46
|
+
"returns": "Promise<{ version: string; }>",
|
|
47
|
+
"tags": [
|
|
48
|
+
{
|
|
49
|
+
"name": "returns",
|
|
50
|
+
"text": "Promise that resolves with the plugin version"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "throws",
|
|
54
|
+
"text": "Error if getting the version fails"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "since",
|
|
58
|
+
"text": "1.0.0"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "example",
|
|
62
|
+
"text": "```typescript\nconst { version } = await Mute.getPluginVersion();\nconsole.log('Plugin version:', version);\n```"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"docs": "Get the native Capacitor plugin version.",
|
|
66
|
+
"complexTypes": [],
|
|
67
|
+
"slug": "getpluginversion"
|
|
19
68
|
}
|
|
20
69
|
],
|
|
21
70
|
"properties": []
|
|
@@ -24,34 +73,19 @@
|
|
|
24
73
|
{
|
|
25
74
|
"name": "MuteResponse",
|
|
26
75
|
"slug": "muteresponse",
|
|
27
|
-
"docs": "",
|
|
28
|
-
"tags": [
|
|
29
|
-
"methods": [
|
|
76
|
+
"docs": "Response from mute status check.",
|
|
77
|
+
"tags": [
|
|
30
78
|
{
|
|
31
|
-
"
|
|
32
|
-
"
|
|
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"
|
|
79
|
+
"text": "1.0.0",
|
|
80
|
+
"name": "since"
|
|
48
81
|
}
|
|
49
82
|
],
|
|
83
|
+
"methods": [],
|
|
50
84
|
"properties": [
|
|
51
85
|
{
|
|
52
86
|
"name": "value",
|
|
53
87
|
"tags": [],
|
|
54
|
-
"docs": "",
|
|
88
|
+
"docs": "True if device is muted, false otherwise",
|
|
55
89
|
"complexTypes": [],
|
|
56
90
|
"type": "boolean"
|
|
57
91
|
}
|
|
@@ -1,19 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capacitor Mute Plugin for detecting device mute status.
|
|
3
|
+
*
|
|
4
|
+
* @since 1.0.0
|
|
5
|
+
*/
|
|
1
6
|
export interface MutePlugin {
|
|
2
7
|
/**
|
|
3
|
-
*
|
|
8
|
+
* Check if the device mute switch is enabled.
|
|
4
9
|
*
|
|
10
|
+
* @returns Promise that resolves with the mute status
|
|
11
|
+
* @throws Error if checking mute status fails
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const { value } = await Mute.isMuted();
|
|
16
|
+
* if (value) {
|
|
17
|
+
* console.log('Device is muted');
|
|
18
|
+
* } else {
|
|
19
|
+
* console.log('Device is not muted');
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
5
22
|
*/
|
|
6
23
|
isMuted(): Promise<MuteResponse>;
|
|
7
|
-
}
|
|
8
|
-
export interface MuteResponse {
|
|
9
|
-
value: boolean;
|
|
10
24
|
/**
|
|
11
|
-
* Get the native Capacitor plugin version
|
|
25
|
+
* Get the native Capacitor plugin version.
|
|
12
26
|
*
|
|
13
|
-
* @returns
|
|
14
|
-
* @throws
|
|
27
|
+
* @returns Promise that resolves with the plugin version
|
|
28
|
+
* @throws Error if getting the version fails
|
|
29
|
+
* @since 1.0.0
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const { version } = await Mute.getPluginVersion();
|
|
33
|
+
* console.log('Plugin version:', version);
|
|
34
|
+
* ```
|
|
15
35
|
*/
|
|
16
36
|
getPluginVersion(): Promise<{
|
|
17
37
|
version: string;
|
|
18
38
|
}>;
|
|
19
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Response from mute status check.
|
|
42
|
+
*
|
|
43
|
+
* @since 1.0.0
|
|
44
|
+
*/
|
|
45
|
+
export interface MuteResponse {
|
|
46
|
+
/** True if device is muted, false otherwise */
|
|
47
|
+
value: boolean;
|
|
48
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Capacitor Mute Plugin for detecting device mute status.\n *\n * @since 1.0.0\n */\nexport interface MutePlugin {\n /**\n * Check if the device mute switch is enabled.\n *\n * @returns Promise that resolves with the mute status\n * @throws Error if checking mute status fails\n * @since 1.0.0\n * @example\n * ```typescript\n * const { value } = await Mute.isMuted();\n * if (value) {\n * console.log('Device is muted');\n * } else {\n * console.log('Device is not muted');\n * }\n * ```\n */\n isMuted(): Promise<MuteResponse>;\n\n /**\n * Get the native Capacitor plugin version.\n *\n * @returns Promise that resolves with the plugin version\n * @throws Error if getting the version fails\n * @since 1.0.0\n * @example\n * ```typescript\n * const { version } = await Mute.getPluginVersion();\n * console.log('Plugin version:', version);\n * ```\n */\n getPluginVersion(): Promise<{ version: string }>;\n}\n\n/**\n * Response from mute status check.\n *\n * @since 1.0.0\n */\nexport interface MuteResponse {\n /** True if device is muted, false otherwise */\n value: boolean;\n}\n"]}
|
|
@@ -7,7 +7,7 @@ import Capacitor
|
|
|
7
7
|
*/
|
|
8
8
|
@objc(MutePlugin)
|
|
9
9
|
public class MutePlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
-
private let PLUGIN_VERSION: String = "7.2
|
|
10
|
+
private let PLUGIN_VERSION: String = "7.3.2"
|
|
11
11
|
public let identifier = "MutePlugin"
|
|
12
12
|
public let jsName = "Mute"
|
|
13
13
|
public let pluginMethods: [CAPPluginMethod] = [
|