Thank you for response.
Thats available in Html5?
Cheers.
Le mercredi 18 avril 2012 22:53:31 UTC+2, Jeffrey Posnick a écrit :
-- Le mercredi 18 avril 2012 22:53:31 UTC+2, Jeffrey Posnick a écrit :
Hello,
The easiest way to do this would be to use the "playlist" player
parameter, like
playerVars: { 'autoplay': 0, 'controls': 1, 'playlist':
'videoId1,videoId2,videoId3' },
Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev
On Apr 18, 5:03 am, cheeeze <marcelisod...@gmail.com> wrote:
> 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 finish
> onYouTubePlayerAPIReady('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/-/vue1hNkeyGgJ.
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