[whatwg] Proposal for a MediaSource API that allows sending media data to a HTMLMediaElement

Robert O'Callahan robert at ocallahan.org
Mon Jul 11 17:54:44 PDT 2011

It seems to me that the spec is written assuming only one media element is
consuming the MediaSource. But nothing stops multiple elements consuming the
same URL simultaneously. Maybe instead of going through a URL you should add
API directly to media elements.

bytesAvailable is for flow control? Instead of doing it this way, I would
follow WebSockets and use a bufferedAmount attribute to indicate how much
data is currently buffered up. That makes it easy for authors who don't want
to care about flow control to just append stuff without encountering errors,
while still allowing authors who care about flow control to do it.

"If we claim to be without sin, we deceive ourselves and the truth is not in
us. If we confess our sins, he is faithful and just and will forgive us our
sins and purify us from all unrighteousness. If we claim we have not sinned,
we make him out to be a liar and his word is not in us." [1 John 1:8-10]

More information about the whatwg mailing list