Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

In a playlist, do I always have to start at the first playlist item when entering?


I'm working on adding bookmarking to our project where I keep track of which playlist items the user has viewed. When the user exists and re-enters, I would like to highlight the last playlist item that was viewed and let the user start playing from there. Is this possible?

Here's what I tried that didn't work. Perhaps I'm on the wrong track or it's not possible. I added code to the onReady event to highlight the correct playlist item and that works. I then tried to call
jwplayer().PlaylistItem(currentindex); in onReady immediately after with the correct playlist item but the first playlist item always gets played.

Are things just not completely set up in onReady to have me select a playlist item? Is there another place to call this?

6 Community Answers

jherrieven

Best Answer 

May be a simple typo:

jwplayer().PlaylistItem(currentindex);

should be:

jwplayer().playlistItem(currentindex);

View in conversation

Ethan Feldman

JW Player Support Agent  
0 rated :

Where did you try this?

publishing

User  
0 rated :

I'm trying it on my local test site. I can email you a link if you would like. I just upgraded to 6.8.

Ethan Feldman

JW Player Support Agent  
0 rated :

Sure – support [at] jwplayer [dot] com. I would also update to 6.9.

jherrieven

Best Answer  User  
0 rated :

May be a simple typo:

jwplayer().PlaylistItem(currentindex);

should be:

jwplayer().playlistItem(currentindex);

publishing

User  
0 rated :

Hi Ethan,

I updated to jwplayer 6.9 and then I simplified the example.
I emailed you a link to the new example. It's standalone so hopefully it will be easy to see the issue/question.

Thanks in advance!

Ethan Feldman

JW Player Support Agent  
0 rated :

Np!

Ah right, jwplayer().playlistItem(currentindex); might work.

This question has received the maximum number of answers.