Nelson Wong
Nelson Wong

Reputation: 1

youtube jQuery Player works for the favorites playlist but not for other playlists

for these examples I am using

youtube.com/user/Google/videos?view=1

a jQuery YouTube player (Simone Gianni) works perfectly if one is accessing the "favorites" playlist

$.getJSON('http://gdata.youtube.com/feeds/users/Google/favorites?alt=json-in-script&format=5&callback=?',

http://jsfiddle.net/hL8zK/3/

but when accessing custom playlists the thumbnails populate but the click function does not generate the unique video id - I am guessing that there are some additional elements when calling custom playlists preventing the video id from being generated.

$.getJSON('http://gdata.youtube.com/feeds/playlists/5400F84F30D9651E?&alt=json-in-script&format=5&callback=?',

http://jsfiddle.net/hL8zK/5/

Upvotes: 0

Views: 630

Answers (1)

Javier de la Garza
Javier de la Garza

Reputation: 11

I ran into the same problem. After some research, I found that video ID for playlists is a little different. Try this for var video id:

this.media$group.yt$videoid.$t 

and the json URL like this:

http://gdata.youtube.com/feeds/api/playlists/5400F84F30D9651E?v=2&alt=json&callback=?

jsfiddle

Upvotes: 1

Related Questions