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

On Wed, Jul 13, 2011 at 11:30 AM, Aaron Colwell <acolwell at google.com> wrote:

> I'm doing WebM demuxing and media fetching in JavaScript. When a seek
> occurs, I look at currentTime to see where we are seeking to. I then look at
> the CUES index data I've fetched to find the file offset for the closest
> seek point to the desired time. The appropriate data is fetched and pushed
> into the element via append(). The seeked event firing and readyState
> transitioning to HAVE_FUTURE_DATA or HAVE_ENOUGH_DATA tells me when I've
> sent the element enough data. During playback I just monitor the buffered
> attribute to keep a specific duration ahead of the current playback time.


Now I'm rather confused about what you're doing and how you're using this
feature. What format is the data that you're feeding into the element?

I had imagined that this API would let the author feed in the same data as
you would load from some URI. But that can't be what's happening, since in
some element implementations (e.g., Gecko's) loaded data is buffered
internally and seeking might not require any new data to be loaded.

Rob
-- 
"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]

Received on Tuesday, 12 July 2011 16:44:31 UTC