playlist (supported players: AS3, HTML5)VIDEO_ID specified in the URL path, and the videos specified in the playlist parameter will play thereafter.Le mercredi 18 avril 2012 11:03:05 UTC+2, cheeeze a écrit :
Hi !
I'm lost ! I hope you can help me.I create a player with my first video (id1) and after playing I want to launch the next video (idnext).For the first, I do :function onYouTubePlayerAPIReady(id) {var tag = document.createElement('script'); tag.src = "http://www.youtube.com/player_api ";var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player;player = new YT.Player('ytvideo2', {height: '390',width: '640',videoId: id,playerVars: { 'autoplay': 0, 'controls': 1 },events: {'onReady': onPlayerReady,'onStateChange': onPlayerStateChange}});}function onPlayerStateChange(event) {if (event.data == YT.PlayerState.ENDED ) {// When the first video is finishonYouTubePlayerAPIReady('l8MjTAXW7Fw'); // ===> This doesn't working }}How can I do that. I see on the web, "about playlist" , but How can I create a playlist?? I'm really lost.Thank you for your attention, I'm waiting for your response.Cheeeze :-)
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/iqWNgdwxyDkJ.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment