我想知道播放列表(youtube)上的视频编号这是 json 播放列表的示例
http://gdata.youtube.com/feeds/api/playlists/80D426344F3DE8B6?v=2&alt=json
编码 :
var playlistURL = 'http://gdata.youtube.com/feeds/api/playlists/'+config.playlist+'?v=2&alt=json&callback=?';
var youURL = 'http://www.youtube.com/watch?v=';
//retrieve json
jQuery.getJSON(playlistURL, function(data) {
jQuery.each(data.feed.entry, function(i, item) {
var feedTitle = item.title.jQueryt;
var feedURL = item.link[1].href;
var fragments = feedURL.split("/");
var videoID = fragments[fragments.length - 2];
var url = youURL + videoID;
var thumb = "http://img.youtube.com/vi/"+ videoID +"/default.jpg";
var videosCount = ??????
});
});
感谢先进