iframe - How do I navigate through a playlist using the Youtube Javascript API? -
once i've created playlist using loadplaylist
method array of video urls, want able navigate through playlist.
the function described in documention playvideoat(int)
seems able this, after calling single time, lose reference entire playlist.
meaning call playvideoat(2)
, navigate third video in playlist i've created, cannot use function again, , unable navigate further through list.
are there workarounds or suggested fixes use?
here's issue filed problem -- seem introduced bug.
if you're in need of temporary workaround, in lieu of videoplayat() call 'cueplaylist() again (or loadplaylist() have autoplay) , pass index, this:
player.cueplaylist({'listtype':'playlist','list':'[playlist id]','index':[video index number]});
you can test in fiddle:
http://jsfiddle.net/jlmcdonald/uz68v/3/
hopefully it'll resolved soon.
Comments
Post a Comment