Tuesday, March 6, 2012

[YouTube-API] iFrame API and YT.Player

Trying to get the current time and the duration while using the new iFrame embed code & YT.Player. There does not appear to be any support for the JavaScript API methods of player.getCurrentTime() and player.getDuration().

I did find the required information in event.target.e.currentTime and event.target.e.duration (where event is the event data for onStateChange ). This does not appear to be documented anywhere, is it safe to use? Is there a better approach?

cheers,
Marc.


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