https://github.com/cap-go/capacitor-mute
Capacitor plugin to detect if the mute switch is enabled/disabled on a device
https://github.com/cap-go/capacitor-mute
android capacitor capacitor-plugin ionic ios plugin typescript
Last synced: 4 months ago
JSON representation
Capacitor plugin to detect if the mute switch is enabled/disabled on a device
- Host: GitHub
- URL: https://github.com/cap-go/capacitor-mute
- Owner: Cap-go
- License: mpl-2.0
- Created: 2021-11-10T23:01:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-10T18:21:12.000Z (5 months ago)
- Last Synced: 2026-01-11T16:36:34.841Z (5 months ago)
- Topics: android, capacitor, capacitor-plugin, ionic, ios, plugin, typescript
- Language: Swift
- Homepage: https://capgo.app
- Size: 1.35 MB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Detect if the mute switch is enabled/disabled on a device
## Documentation
The most complete doc is available here: https://capgo.app/docs/plugins/mute/
## Compatibility
| Plugin version | Capacitor compatibility | Maintained |
| -------------- | ----------------------- | ---------- |
| v8.\*.\* | v8.\*.\* | ✅ |
| v7.\*.\* | v7.\*.\* | On demand |
| v6.\*.\* | v6.\*.\* | ❌ |
| v5.\*.\* | v5.\*.\* | ❌ |
> **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.
## Install
```bash
npm install @capgo/capacitor-mute
npx cap sync
```
## Know issue
On IOS with Xcode 14 the lib use under the hood `Mute` is not configured as Apple expect anymore, it's not the only one having the issue as you can see here :
https://github.com/CocoaPods/CocoaPods/issues/8891
Solution:
Replace this to your Podfile:
```ruby
post_install do |installer|
assertDeploymentTarget(installer)
end
```
By
```ruby
post_install do |installer|
assertDeploymentTarget(installer)
installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end
```
That should solve your issue.
I did open issue in the original repo to see if they can fix it:
https://github.com/akramhussein/Mute/issues/16
If no answer I will add the code directly to capacitor-mute
## API
* [`isMuted()`](#ismuted)
* [`getPluginVersion()`](#getpluginversion)
* [Interfaces](#interfaces)
Capacitor Mute Plugin for detecting device mute status.
### isMuted()
```typescript
isMuted() => Promise
```
Check if the device mute switch is enabled.
**Returns:** Promise<MuteResponse>
**Since:** 1.0.0
--------------------
### getPluginVersion()
```typescript
getPluginVersion() => Promise<{ version: string; }>
```
Get the native Capacitor plugin version.
**Returns:** Promise<{ version: string; }>
**Since:** 1.0.0
--------------------
### Interfaces
#### MuteResponse
Response from mute status check.
| Prop | Type | Description |
| ----------- | -------------------- | ---------------------------------------- |
| **`value`** | boolean | True if device is muted, false otherwise |
