Wednesday, July 11, 2012

[YouTube-API] Getting Times in HTML5

I am using the ordinary Iframe API using the <iframe> tag, with a custom time display. In Flash, everything works perfectly in all modern browsers. However, when switching over to HTML5, the player.getCurrentTime() and player.getDuration() stay 0. When pausing the video for the first time, the player.getCurrentTime() suddenly fires and now displays the current, correct time. After continuing the video, now the player.getCurrentTime() keeps working properly. The playing.getDuration still stays 0 though. Whether the video autoplays or not doesn't matter, the times really stay 0/0 till the video is paused.

On https://developers.google.com/youtube/youtube_player_demo I noticed that with HTML5, is does show the player.getDuration() as a start, but the player.getCurrentTime() again gets triggered only when the video is paused for the first time. I tried loads of other functions like the volume (also working with 'get'), playing, pausing, seeking to specific times, video quality and such, and the time really is the only thing that doesn't work properly. Is it fair to say the HTML5 is still in development?

Thank you for your time and reply in advance.

Best regards,

Mark

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