[whatwg] Media elements statistics

Hi,

I'd like the raise this thread again:
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-August/027929.html
(I wasn't on the list at that point, so starting a new thread here and
cc'ing a couple of folks from it...)

I work on the media stack in Chromium and we'd like to implement
something pretty similar. So I'm looking for comments...

The original suggestion for the video element looks good:

[Video Element]

// Frames decoded and available for playback.
unsigned long decodedFrames;

// Frames dropped during playback for performance reasons.
unsigned long droppedFrames;

But for the media element I'd like to propose raw bytes instead of a
rate as this allows the developer to construct their own rates (if
needed) based on whatever window they want. It would also be useful to
separate audio from video. A suggestion might be:

[Media Element]

unsigned long audioBytesDecoded;
unsigned long videoBytesDecoded;

Though this seems a little strange to have these specifically on the
media element as they reference particular media types. Another idea
would be to move these to the video element and also add
audioBytesDecoded to the audio element.

Another open question: what are sensible values if the information is
not available. Zero seems wrong.

Thoughts?

Cheers!
Steve

Received on Thursday, 27 January 2011 15:22:38 UTC