Saltar al contenido →

Test

// function that builds up the related videos scrollable list
function showRelatedList(gdata, container) {
var relatedVideos = gdata.relatedVideos;
var content = ‘Related Videos:‘;
content += ‘

‘;

jQuery.each( relatedVideos, function(index, item){
content += ‘‘;
content += item.title + «
«;
content += «» + Math.round(item.duration / 60) + » min
«;
});

content += ‘

‘;

$(container).html(content);

$(«div.playlist»).scrollable({
items:’div.clips’,
vertical:true,
next:’a.down’,
prev:’a.up’
});
}

// embed the player
$f(«youtube», «http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf», {
plugins: {
youtube: {
url:’flowplayer.youtube-3.2.6.swf’,
enableGdata: true,

// listener to youtube API data, used to build up a related videos list
onApiData: function(gdata) {
console.log(gdata);

// use the function defined above to show the related clips
showRelatedList(gdata, «#playlistContainer»);
}
}
},
clip: {
provider: ‘youtube’,
urlResolvers: ‘youtube’
}
}).playlist(«div.clips»);

Comentarios

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *