views:

134

answers:

1

I have a few YT videos embedded on the pages of my site. Is there any way (say, via Javascript/DOM) I can track the following:

  1. How much % (bytes, duration, etc) of the video content got transferred to the user's browser? (The red progress bar in YT videos, for example.)

  2. How much % (bytes, duration, etc) actually got played (watched by the user) in the user's browser?

  3. Play/Pause/Stop/Rewind/FF patterns of the user... like, eg, the user watched the segment time1 to time2 M times, followed by time3 to time4 N times, and so forth?

Do the Flash players (esp, the browser plugin versions) provide any way to tap such user actions on the player as the Start, Stop, Pause, Rewind, jump to arbitrary point?

+1  A: 

Everything you can do with JS is explained here: YouTube JavaScript Player API

The long and short of it is that you can get most information about what the user has done (play, pause, etc) but you can't really get much about the amount of data they loaded but didn't view.

Branden Hall
Thanx Branden, your answer was *very* helpful. I'm happy again now :-)Btw, I know nothing about Flash, its API, API of its players, etc. If you are a 'well known figure in the Flash community' and if you speak at big conferences, may be you can help influence the opening up of this blackbox called Flash just a li'l bit more. As a developer, I intuitively know that it should be trivial for Flash to support what I was hoping for in #3 above. Why they are not (or won't be) supporting this, I don't know. Do you? Best regards...
Harry
Well, that's the thing - Flash *can* support that stuff, it's just the YouTube API that doesn't support it. Flash only provides the basics - the ability to load and play video/audio. The rest of the player (pause/play, scrubber, volume, etc) is actually written in ActionScript by the folks at YouTube. What methods they expose out to JavaScript is entirely up to them.
Branden Hall