You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jPlayer: HTML5 Audio & Video for jQuery
Oh well, that was easy. In the ready function, I just put
$('#jp_playlist_2_item_3').trigger('click');
ready: function () {
audioPlaylist.displayPlaylist();
audioPlaylist.playlistInit(false); // Parameter is a boolean for
autoplay.
$('#jp_playlist_2_item_3').trigger('click');
},
jPlayer will build the <ul> with <li> ids = to something similar to
the above, depending on how many playlists you have on a page, etc.
Maybe someone who knows more can tell about that. At any rate, I
looked at the 'generated source' with FF web dev tool bar, found that
the 'links' jPlayer created look like
<li class="jp-playlist-current">
<a class="jp-playlist-current" href="#" id="jp_playlist_2_item_0"
tabindex="1">Bow Hill - Next Exit - 01 - Sore From</a>
</li>
<li>
<a href="#" id="jp_playlist_2_item_1" tabindex="1">Bow Hill - Next
Exit - 02 - Break the Mold</a>
</li>
Mark Panaghiston
unread,
Apr 6, 2011, 2:37:44 PM4/6/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jpl...@googlegroups.com
audioPlaylist.current = 2; would also set the index to point at the 3rd track.
You could then put that line at the start of the ready function. ie., before displaying and init the playlist.
Or if all of the playlists start from the 3rd one, then you could just change the original object property for current.
By the way, the playlist is not actually part of jPlayer. It is a piece of code that uses jPlayer to enable a playlist.
Best regards, Mark P.
J. Frank Parnell
unread,
Apr 6, 2011, 10:15:43 PM4/6/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jPlayer: HTML5 Audio & Video for jQuery
Ah, yes that works, too, but as I have
audioPlaylist.playlistInit(false);
it does not play automatically. Easy fix with php, although I may
leave it that way.