Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setVolume for html5 audio doesn't work on mobile Android or Safari - Any workaround?

So it seems like setVolume() for html5 audio doesn't work at all on both Android stock browser and Mobile Safari. Here's a test case.

Is there any further evidence to this, an open issue or perhaps even a workaround (apart from resorting to Flash for android)?

like image 865
Ronny Avatar asked Oct 24 '25 15:10

Ronny


1 Answers

From the Safari HTML5 Audio and Video guide:

On iOS devices, the audio level is always under the user’s physical control. The volume property is not settable in JavaScript. Reading the volume property always returns 1.

On all other devices you can also set the muted property to true.

like image 120
Brian Hadaway Avatar answered Oct 27 '25 00:10

Brian Hadaway



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!