Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Cap-go/capacitor-mute
Detect if the mute switch is enabled/disabled on a device
https://github.com/Cap-go/capacitor-mute
android capacitor capacitor-plugin ionic ios typescript
Last synced: 24 days ago
JSON representation
Detect if the mute switch is enabled/disabled on a device
- Host: GitHub
- URL: https://github.com/Cap-go/capacitor-mute
- Owner: Cap-go
- Created: 2021-11-10T23:01:44.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T19:51:36.000Z (about 2 months ago)
- Last Synced: 2024-10-29T21:06:33.850Z (about 1 month ago)
- Topics: android, capacitor, capacitor-plugin, ionic, ios, typescript
- Language: Swift
- Homepage: https://capgo.app
- Size: 513 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-capacitorjs - @capgo/capacitor-mute - Detect silent mode and mute audio. (Plugins / Community Plugins)
- awesome-capacitor - Mute - Detect silent mode and mute audio. ([Capgo plugins](https://capgo.app/))
README
➡️ Get Instant updates for your App with Capgo 🚀
Fix your annoying bug now, Hire a Capacitor expert 💪
Detect if the mute switch is enabled/disabled on a device
## 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/8891Solution:
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)
* [Interfaces](#interfaces)### isMuted()
```typescript
isMuted() => any
```check if the device is muted
**Returns:**
any
--------------------
### Interfaces
#### MuteResponse
| Prop | Type |
| ----------- | -------------------- |
| **`value`** |boolean
|