francois-p-peloquin / cordova-silent-mode

Simple mute/not mute checked for Cordova and iOS
Apache License 2.0
4 stars 5 forks source link

Weird noise when plugin is instantiated #1

Open rafaelmb opened 7 years ago

rafaelmb commented 7 years ago

Hi, we have a hybrid ionic app that we started to use this plugin to detected the silent mode from iOS phones. When we add the plugin and do the init + isMuted with the callback (the same as in the example) as soon as the app starts the phone do a little noise (you have to get really close to hear it) We isolated the problem on the plugin and I was wondering if someone had the same problem.

francois-p-peloquin commented 7 years ago

Hi @rafaelmb,

The method for checking the mute/unmute mode is by playing a small sound (mute.caf) to see if it resonates or not. I imagine the sound decibels could be dropped lower still, but this is the only method I've found for checking if the mute switch is toggled on or not.

Hope that helps

rafaelmb commented 7 years ago

So it's a feature ;) I couldn't hear it, unless I got it really close. But one of my coworkers did so it could worth to reduce it a little bit.

vishal-revdiwala commented 4 years ago

Anyone suggest how to make use of this available plugin, as I tried installation but when I am trying to access SilentMode.init(), it's throwing error. Thanks.