Dear jPlayer community,
I was wondering how to make the jPlayer playlist start playing after the page loads. I am using one of the jPlayer demo (demo-02-pf.htm) from the 2.3.0 release.
This is the sample code from the demo...
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, [
{
title:"Cro Magnon Man",
mp3:"
http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3",
oga:"
http://www.jplayer.org/audio/ogg/TSP-01-Cro_magnon_man.ogg"
},
{
title:"Your Face",
mp3:"
http://www.jplayer.org/audio/mp3/TSP-05-Your_face.mp3",
oga:"
http://www.jplayer.org/audio/ogg/TSP-05-Your_face.ogg"
}
], {
swfPath: "js",
supplied: "oga, mp3",
wmode: "window",
smoothPlayBar: true,
keyEnabled: true
});
});
//]]>
</script>
I tried the following code in the document ready but did not work...
$("#jquery_jplayer_1").jPlayer({
ready: function() {
playListInit(flase);
}, oggSupport: true
});
Thank you all in advance
Abel