Hello everyone !
I've a problem with displaying videos.
I succeed to display video in a boucle for but I need to put a javascript alert when I create each player.
for(i=0;i<tabId.length;i++)
{
//This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "http://www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
//This function creates an <iframe> (and YouTube player)after the API code downloads.
alert("baba");
var player1 = new YT.Player(tabId[i],{
height: '150',
width: '200',
videoId: tabId[i].toString(),
// the order of controls you want on the control bar (and other plugins below)
events:{ 'onReady': playYouTubeVideo,
'onStateChange': onPlayerStateChange
}
});
} // End of for
I thought about a time of loading, maybe...?? Can you help me?
Thank you !
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/-/UHYEjwzDFekJ.
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