Reputation: 3913
Once I've created a playlist using the loadPlaylist
method which is just an array of video urls, I want to be able to navigate to through the playlist.
The function described in the documention playVideoAt(int)
seems to be able to do this, but after calling it a single time, you lose reference to the entire playlist.
Meaning that I could call playVideoAt(2)
and navigate to the third video in the playlist I've created, but I cannot use this function again, and I am now unable to navigate any further through the list.
Are there any workarounds or suggested fixes I could use?
Upvotes: 0
Views: 582
Reputation: 13667
Here's an issue that was recently filed for this problem -- it does seem to be a recently introduced bug.
If you're in need of a temporary workaround, in lieu of videoPlayAt() you could just call 'cuePlaylist() again (or loadPlaylist() to have it autoplay) and pass it an index, like this:
player.cuePlaylist({'listType':'playlist','list':'[PLAYLIST ID]','index':[VIDEO INDEX NUMBER]});
You can test it in this fiddle:
http://jsfiddle.net/jlmcdonald/uz68V/3/
Hopefully it'll be resolved soon.
Upvotes: 1