inket
inket

Reputation: 1681

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 loading (not playing) the file after page load. Which consumes a huge amount of bandwidth if the page is full of audio tags.

Is there a way to make Chrome behave like Safari 5 (ie. the right way) and only load a file when the user clicks on the play button ?

Upvotes: 4

Views: 3523

Answers (3)

ismail
ismail

Reputation: 47602

This is Chrome bug #16482 , and still not fixed, nope.

Update: As of April 6, 2011 it is fixed :-)

Upvotes: 4

Kawa
Kawa

Reputation: 1488

You could have a placeholder element and replace it with the Audio element by Javascript when it's clicked...

Upvotes: 3

amurra
amurra

Reputation: 15401

Did you try setting the autobuffer attribute to false?

Upvotes: 0

Related Questions