Control volume and Receive volume events (iOS /Android)
- iOS
- Android
cordova plugin add https://github.com/boedy/cordova-volume-control --save
volumeControl.init({options}, callbackVolumeChanges);
Initializes pluginvolumeControl.destroy();
Unset pluginvolumeControl.setVolume(float 0 <=> 1);
Set volume
- volume: Set volume during initialization
- hideVolumeNotification: (iOS only) hides the volume UI during volume change
var options = {volume: 0.5, hideVolumeNotification:true};
//init
volumeControl.init(options, function(vol){
console.log("Volume changed" , vol);
});