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.

https://code.google.com/p/gdata-issues/issues/detail?id=5018&q=playvideoat&colspec=api%20id%20type%20status%20priority%20stars%20summary

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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -