It works gr...">

HTML5 Audio: preload attribute ignored in Chrome

My code is basically this

<audio controls preload="none" src="linktofile.mp3" /> 

It works great in Safari 5 and Chrome 8, except that Chrome completely ignores the preload attribute and starts downloading (not playing) the file after the page loads. Which consumes tremendous bandwidth if the page is full of sound tags.

Is there a way to make Chrome behave like Safari 5 (i.e. the correct path) and only download the file when the user clicks the play button?

+4
source share
3 answers

This is Chrome Error # 16482 and is still not fixed, no.

Update: as of April 6, 2011, fixed :-)

+4
source

You can have a placeholder and replace it with a Javascript audio element when it clicked ...

+3
source

Have you tried to set the autobuffer attribute to false?

0
source

Source: https://habr.com/ru/post/1333913/


All Articles