@capgo/capacitor-mute 1.1.21 → 1.1.26
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/CapgoCapacitorMute.podspec +4 -0
- package/README.md +2 -2
- package/android/src/main/java/ee/forgr/plugin/mute/MutePlugin.java +11 -10
- package/dist/docs.json +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/web.d.ts +2 -2
- package/dist/esm/web.js +3 -3
- package/dist/plugin.cjs.js +3 -3
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -3
- package/dist/plugin.js.map +1 -1
- package/package.json +2 -2
|
@@ -11,7 +11,11 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.resource_bundles = {
|
|
15
|
+
'Mute' => ['ios/Plugin/Assets/*.aiff']
|
|
16
|
+
}
|
|
14
17
|
s.ios.deployment_target = '13.0'
|
|
15
18
|
s.dependency 'Capacitor'
|
|
19
|
+
s.frameworks = 'Foundation', 'AudioToolbox'
|
|
16
20
|
s.swift_version = '5.1'
|
|
17
21
|
end
|
package/README.md
CHANGED
|
@@ -60,12 +60,12 @@ If no answer I will add the code directly to capacitor-mute
|
|
|
60
60
|
### isMuted()
|
|
61
61
|
|
|
62
62
|
```typescript
|
|
63
|
-
isMuted() =>
|
|
63
|
+
isMuted() => any
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
check if the device is muted
|
|
67
67
|
|
|
68
|
-
**Returns:** <code>
|
|
68
|
+
**Returns:** <code>any</code>
|
|
69
69
|
|
|
70
70
|
--------------------
|
|
71
71
|
|
|
@@ -11,15 +11,16 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
|
11
11
|
@CapacitorPlugin(name = "Mute")
|
|
12
12
|
public class MutePlugin extends Plugin {
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
call.resolve(ret);
|
|
14
|
+
@PluginMethod
|
|
15
|
+
public void isMuted(PluginCall call) {
|
|
16
|
+
JSObject ret = new JSObject();
|
|
17
|
+
ret.put("value", true);
|
|
18
|
+
AudioManager audio = (AudioManager) this.bridge.getContext()
|
|
19
|
+
.getSystemService(Context.AUDIO_SERVICE);
|
|
20
|
+
switch (audio.getRingerMode()) {
|
|
21
|
+
case AudioManager.RINGER_MODE_NORMAL:
|
|
22
|
+
ret.put("value", false);
|
|
24
23
|
}
|
|
24
|
+
call.resolve(ret);
|
|
25
|
+
}
|
|
25
26
|
}
|
package/dist/docs.json
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
"methods": [
|
|
8
8
|
{
|
|
9
9
|
"name": "isMuted",
|
|
10
|
-
"signature": "() =>
|
|
10
|
+
"signature": "() => any",
|
|
11
11
|
"parameters": [],
|
|
12
|
-
"returns": "
|
|
12
|
+
"returns": "any",
|
|
13
13
|
"tags": [],
|
|
14
14
|
"docs": "check if the device is muted",
|
|
15
15
|
"complexTypes": [
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { registerPlugin } from
|
|
2
|
-
const Mute = registerPlugin(
|
|
3
|
-
web: () => import(
|
|
1
|
+
import { registerPlugin } from "@capacitor/core";
|
|
2
|
+
const Mute = registerPlugin("Mute", {
|
|
3
|
+
web: () => import("./web").then((m) => new m.MuteWeb()),
|
|
4
4
|
});
|
|
5
|
-
export * from
|
|
5
|
+
export * from "./definitions";
|
|
6
6
|
export { Mute };
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WebPlugin } from
|
|
2
|
-
import type { MutePlugin, MuteResponse } from
|
|
1
|
+
import { WebPlugin } from "@capacitor/core";
|
|
2
|
+
import type { MutePlugin, MuteResponse } from "./definitions";
|
|
3
3
|
export declare class MuteWeb extends WebPlugin implements MutePlugin {
|
|
4
4
|
isMuted(): Promise<MuteResponse>;
|
|
5
5
|
}
|
package/dist/esm/web.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WebPlugin } from
|
|
1
|
+
import { WebPlugin } from "@capacitor/core";
|
|
2
2
|
export class MuteWeb extends WebPlugin {
|
|
3
3
|
async isMuted() {
|
|
4
|
-
console.log(
|
|
5
|
-
throw new Error(
|
|
4
|
+
console.log("isMuted");
|
|
5
|
+
throw new Error("Method not implemented.");
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=web.js.map
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@capacitor/core');
|
|
4
4
|
|
|
5
|
-
const Mute = core.registerPlugin(
|
|
5
|
+
const Mute = core.registerPlugin("Mute", {
|
|
6
6
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MuteWeb()),
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
class MuteWeb extends core.WebPlugin {
|
|
10
10
|
async isMuted() {
|
|
11
|
-
console.log(
|
|
12
|
-
throw new Error(
|
|
11
|
+
console.log("isMuted");
|
|
12
|
+
throw new Error("Method not implemented.");
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
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
|
|
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 console.log(\"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,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC/B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var capacitorMute = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const Mute = core.registerPlugin(
|
|
4
|
+
const Mute = core.registerPlugin("Mute", {
|
|
5
5
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MuteWeb()),
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
class MuteWeb extends core.WebPlugin {
|
|
9
9
|
async isMuted() {
|
|
10
|
-
console.log(
|
|
11
|
-
throw new Error(
|
|
10
|
+
console.log("isMuted");
|
|
11
|
+
throw new Error("Method not implemented.");
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
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
|
|
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 console.log(\"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,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-mute",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.26",
|
|
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",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
36
36
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
37
37
|
"eslint": "eslint . --ext ts",
|
|
38
|
-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
38
|
+
"prettier": "prettier --config .prettierrc.js \"**/*.{css,html,ts,js,java}\"",
|
|
39
39
|
"swiftlint": "node-swiftlint",
|
|
40
40
|
"docgen": "docgen --api MutePlugin --output-readme README.md --output-json dist/docs.json",
|
|
41
41
|
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|