0

I have a requirement to load hours of music, to have in case of connection shortages. What we are trying to do is to have many audio tags loading in background while the first is playing.

The problem is that, although we call .load() on every audio media element; every audio is just loaded partially.

Does anyone know if there is an option to force the full load? We have tried the trick of doing pause/play to force the loading but it is not working.

(sorry for my bad English)

Loading screenshot

DNax
  • 1,413
  • 1
  • 19
  • 29

1 Answers1

0

Have you tried adding preload="auto" to your audio elements?

EDIT Also you might want to setup a Cache manifest. Look here for more info: http://www.html5rocks.com/en/tutorials/appcache/beginner/

Also some good information from the question here: Can't get simple html5 manifest cache to work!

Community
  • 1
  • 1
am_
  • 2,378
  • 1
  • 21
  • 28
  • We are combining that attribute + the play - pause trick to force the full load. Hope this caches the content too. – DNax Oct 09 '13 at 19:26
  • 1
    Some browsers will ignore your cache headers. You can fix that by creating a cache manifest - look here: http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#manifests Also there is alot of game engines out there that have good cache solutions for html5 audio, might want to check out their source code if your interested in seeing how they did it. – am_ Oct 09 '13 at 21:30