Reputation: 5662
Suppose I have a sound file "ding" and a couple of other sound files (s1, s2, s3, ...). They are each to be played after the "ding". That is, if Button 1 is pressed, I'd like to hear a sequence of "ding" followed by "s1".
If Button 2 is pressed before ["ding", "s1"] is done playing, I would like to stop the current playback and begin ["ding", "s2"].
Currently, I've achieved this with jPlayer's playlist add-on. I simply set the playlist to ["ding", "s1"] and it plays. Life is good. Well, almost.
Problem is that jPlayer doesn't even begin downloading s1 until "ding" is done playing, so the user hears a potentially long pause between "ding" and s1.
Additional info:
There are only 5 of these sound clips, all of which are very short (few seconds of voice).
Flash fallback is important.
Questions:
What would be the best way to set this up to minimize the delay (if any) between "ding" and "s1"? Should I even use the "playlist" add-on for this?
Am I in the best spot to have .mp3 and .ogg for each sound, or should I use a different mix of formats? Goal is compatibility, but the size matters too.
Do you recommend using HTML5 as a primary and Flash as a fallback?
Thanks :-)
Upvotes: 1
Views: 1255
Reputation: 8396
preload:auto
constructor option set for each sound you want preloaded. The jPlaylist add-on will not preload the files in its playlist in advance.solution: "html, flash"
then solution: "flash, html"
in your jPlayer constructor options.Upvotes: 1