W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2011

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 13 Jul 2011 11:44:31 +1200
Message-ID: <CAOp6jLYvjWD-PX8NMWcRy_DhH_pDigxOWYrYJd3nuPAWJJ+m9g@mail.gmail.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:34 UTC