I'm using the YouTube iframe API to implement a video player.
I'd like to be able to subscribe to an event that fires periodically during playback. For example, every 10 seconds, I'd like to capture and log the current playback time of the video.
The iframe API exposes events like onPlayerReady and onStateChange, but they don't tell me anything about the video while it's actually playing.
I'm not finding any answers in Google's documentation. Any ideas?
Thanks!
player.getCurrentTime()
, which returns number of seconds since video started playing – juvian