Enable laylist to auto play on page load: jPlayer

1,798 views
Skip to first unread message

Abel Zerazion

unread,
Apr 20, 2013, 4:10:40 PM4/20/13
to jpl...@googlegroups.com
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

Mark Panaghiston

unread,
Apr 22, 2013, 12:59:05 PM4/22/13
to jpl...@googlegroups.com
Take a look at the playlist docs:
http://www.jplayer.org/latest/demo-02-jPlayerPlaylist/

  • playlistOptions: {
  • autoPlay: true
  • }

Abel Zerazion

unread,
Apr 22, 2013, 1:12:47 PM4/22/13
to jpl...@googlegroups.com
Dear Mark,

Thank you very much, I was able to auto play the playlist after I read the playlist document link you sent me.
I am really happy with what you guys are doing with jPlayer. May God bless you with much more wisdom.

Thank you again
Abel


--
You received this message because you are subscribed to a topic in the Google Groups "jPlayer: HTML5 Audio & Video for jQuery" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jplayer/XUph3dsLsDU/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to jplayer+u...@googlegroups.com.
To post to this group, send email to jpl...@googlegroups.com.
Visit this group at http://groups.google.com/group/jplayer?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages