How can you create an auto playlist with the HTML5 Audio tag?
-
How can you create an auto playlist with the audio tag from HTML5? What I'm trying to achieve is a player with only the play/pause button big 30x25 px, the player autoplays when the page loads and when the song ends it'll play the next song automatically. Trying to have 3-4 songs in a playlist.
-
Answer:
Check out this post: http://stackoverflow.com/questions/9517726/using-jquery-audio-w-php-mysql-to-loop-playback-times/9527327#9527327 var sfx = new Audio('sfx.wav'); var sounds = a.addTextTrack('metadata'); // add sounds we care about sounds.addCue(new TextTrackCue('dog bark', 12.783, 13.612, '', '', '', true)); sounds.addCue(new TextTrackCue('kitten mew', 13.612, 15.091, '', '', '', true)); function playSound(id) { sfx.currentTime = sounds.getCueById(id).startTime; sfx.play(); } I just updated this with a better example of using cues as specified here: http://dev.w3.org/html5/spec/Overview.html
Marian at Stack Overflow Visit the source
Related Q & A:
- How do you create an auto reply on Yahoo messenger?Best solution by Yahoo! Answers
- How Can I Create an XML to Create a Menu?Best solution by Drupal Answers
- How can I disable this Auto-brightness feature?Best solution by Quora
- How can I get online auto-cad jobs?Best solution by Yahoo! Answers
- How can I create a "Tag Page" on Tumblr?Best solution by uk.answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.