Skip to content

AnasAboreeda/Cordova-Plugin-Mute-Switch-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mute Switch Detector on IOS (Cordova plugin)

This plugin allows you to detect the state of mute switch on iPhone.

The plugin is based on code seen in several other existing plugins:

  1. Mute By Akram Hussein
  2. SoundSwitch by Moshe Gottlieb

Thanks to all of the above mentioned authors for sharing their code openly.

cordova plugin add https://github.com/AnasFullStack/Cordova-Plugin-Mute-Switch-Detector.git --nofetch

API reference

detectMuteSwitch

Detect mute switch status

window.cordova.plugins.DetectMuteSwitch.detectMuteSwitch();

Supported Platforms

  • iOS

Usage Example

Call the window.cordova.plugins.DetectMuteSwitch.detectMuteSwitch() method passing a callback function

Example

window.cordova.plugins.DetectMuteSwitch.detectMuteSwitch(
  function(msg) {
    console.log('Result:', msg);
  }
);

/*

This will print the Mute switch status

Result: Mute switch is Off

OR

Result: Mute switch is On

*/

About

This plugin allows you to detect the state of mute switch on iPhone.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published