简体   繁体   中英

HTML5 Audio Tag Volume control is Not working

I'm using a HTML5 audio tag to play the audio from the internet.

It's perfectly working on PC browsers and Android browsers.

IN IOS mobile browsers Volume control is not working,

Is there a workaround to correct this?

<audio #audioplayer [src]="audioUrl"></audio>

Different browsers supports a little different sets of media formats. It's possible, that iOS's browser don't support your audio format.

To add volume change support to iOS and not rewrite your entire app from html5 audio to web audio for that, you can combine these audio solutions via createMediaElementSource.

Please see more details at Mozilla website https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaElementSource

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM