Monday, February 27, 2012

Re: [YouTube-API] replay a video with js

first thank you for your replay

else {
var ids = playerId.split("_");
rlemediabanner[ids[0]]['processing'] = true;
tag.style.display = "none";
player.style.display = "";
var ytplayer = rlemediabanner[ids[0]]['ytplayers'][ids[1]];
if (ytplayer) {
if (navigator.appName == "Microsoft Internet Explorer") {
if (typeof ytplayer.playVideo === 'function') {
ytplayer.playVideo();   <---------------------------------------- hire where it happens
}
} else {
ytplayer.playVideo();
}
}
rlemediabanner[ids[0]]['processing'] = false;
}

this code works fine in ff and chrome and opera, just in in IE i doesn't.
i know that some code is not needed.

what i'm trying to do is the following:
1.there are more then one video 
2. in 10 seconds the next video slides 
3. for every video there is a pic to be displayed, when the pic clicked the pic will be hidden and the video displayed and played 
4. it will be waited until the video is finished playing after 10 seconds it will be slides to the next if it was clicked it will be played if not in 10 seconds slides.
and so on.
the problem with IE when i click the video it will be played at the first time but at the next slide (when its turn ) after the click the video not starts and it is at the last position (from the last play) and i get the following error:
 "Das Objekt unterstützt diese Eigenschaft oder Methode nicht"  witch in English this object doesn't support this property or method. 


On Monday, February 27, 2012 12:16:47 PM UTC+1, Tim Wintle (Guru) wrote:
Hi,

Can you share more of your code?

It sounds like you haven't got a reference to a valid player object.

Tim Wintle

On Mon, 2012-02-27 at 03:06 -0800, Yihya Hugirat wrote:
> hallo all,
> i need to  replay a ended video with js i.e to use a button to play
> the video from the beginning after i was ended. i need it just in IE
> i have tried to use seekTo(0)  and after that to play the video but i
> get an error that the seekTo() function ist not known  
>
> --
> 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/-/QK5umWmYPrEJ.
> 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.


--
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/-/yDnKBd99ANAJ.
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