Why does HTML 5 Audio disregards mobile device audio settings such as silent or volume?

Deadly 提交于 2019-12-05 16:45:59

问题


I have a site that targets mobile android users. I’m using the HTML5 audio to play background music.

The audio is played even if the device is on silent; also the audio is played in the highest volume regardless of the device volume settings.

Does anyone know why these things happen or how to get the device current audio settings? I’d prefer a client side (javascript) solution but I’m open to all solution.

Thank you for your help Moshe S.


回答1:


In Android, even if the phone is on silent, the media volume will not change.

I'm not sure if android allows for the modification of the system sound settings through the browser, since the default one does not have permission to change/read the volume state.



来源:https://stackoverflow.com/questions/14110508/why-does-html-5-audio-disregards-mobile-device-audio-settings-such-as-silent-or

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!