@capgo/capacitor-mute 7.2.0 → 7.3.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 CHANGED
@@ -52,6 +52,7 @@ If no answer I will add the code directly to capacitor-mute
52
52
  <docgen-index>
53
53
 
54
54
  * [`isMuted()`](#ismuted)
55
+ * [`getPluginVersion()`](#getpluginversion)
55
56
  * [Interfaces](#interfaces)
56
57
 
57
58
  </docgen-index>
@@ -59,16 +60,35 @@ If no answer I will add the code directly to capacitor-mute
59
60
  <docgen-api>
60
61
  <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
61
62
 
63
+ Capacitor Mute Plugin for detecting device mute status.
64
+
62
65
  ### isMuted()
63
66
 
64
67
  ```typescript
65
68
  isMuted() => Promise<MuteResponse>
66
69
  ```
67
70
 
68
- check if the device is muted
71
+ Check if the device mute switch is enabled.
69
72
 
70
73
  **Returns:** <code>Promise&lt;<a href="#muteresponse">MuteResponse</a>&gt;</code>
71
74
 
75
+ **Since:** 1.0.0
76
+
77
+ --------------------
78
+
79
+
80
+ ### getPluginVersion()
81
+
82
+ ```typescript
83
+ getPluginVersion() => Promise<{ version: string; }>
84
+ ```
85
+
86
+ Get the native Capacitor plugin version.
87
+
88
+ **Returns:** <code>Promise&lt;{ version: string; }&gt;</code>
89
+
90
+ **Since:** 1.0.0
91
+
72
92
  --------------------
73
93
 
74
94
 
@@ -77,12 +97,10 @@ check if the device is muted
77
97
 
78
98
  #### MuteResponse
79
99
 
80
- | Prop | Type |
81
- | ----------- | -------------------- |
82
- | **`value`** | <code>boolean</code> |
100
+ Response from mute status check.
83
101
 
84
- | Method | Signature | Description |
85
- | -------------------- | -------------------------------------------- | --------------------------------------- |
86
- | **getPluginVersion** | () =&gt; Promise&lt;{ version: string; }&gt; | Get the native Capacitor plugin version |
102
+ | Prop | Type | Description |
103
+ | ----------- | -------------------- | ---------------------------------------- |
104
+ | **`value`** | <code>boolean</code> | True if device is muted, false otherwise |
87
105
 
88
106
  </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.0";
14
+ private final String PLUGIN_VERSION = "7.3.0";
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
- "docs": "check if the device is muted",
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
- "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"
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
- * check if the device is muted
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 {Promise<{ id: string }>} an Promise with version for this device
14
- * @throws An error if the something went wrong
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":["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"]}
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.0"
10
+ private let PLUGIN_VERSION: String = "7.3.0"
11
11
  public let identifier = "MutePlugin"
12
12
  public let jsName = "Mute"
13
13
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-mute",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "description": "Detect if the mute switch is enabled/disabled on a device",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",