html5 audio volume and mute (cordova CLI)

87 views
Skip to first unread message

sami...@gmail.com

unread,
Aug 21, 2016, 11:02:56 PM8/21/16
to phonegap
Hi guys,
I am using html5 audio to play a beep sound on certain event. $('#beep').play();
(It's a 1 second audio file and doesn't loop by default, which is perfect)

This is the result-

iOS
Sound volume of that beep is whatever is device volume.
If mute, no sound (perfect!)
But no vibration either (I want it!)

Android
Sound volume of that beep is always full regardless device's sound volume.
Even if device is silent!
No vibration on silent either.


Expected behavior 
volume should be whatever device's volume
If mute switch is on (ios) or silent (android) There shouldn't be any sound but vibration (I might need a vibration plugin)


How can I do it?


Thanks
Reply all
Reply to author
Forward
0 new messages