[whatwg] TimedTracks and MPEG transport streams - tracks can change dynamically
philipj at opera.com
Tue Dec 14 08:31:24 PST 2010
On Wed, 24 Nov 2010 17:11:02 +0100, Eric Winkelman
<E.Winkelman at cablelabs.com> wrote:
> I'm investigating how TimedTracks can be used for in-band-data-tracks
> within MPEG transport streams (used for cable television).
> In this format, the number and types of in-band-data-tracks can change
> over time. So, for example, when the programming switches from a
> football game to a movie, an alternate language track may appear that
> wasn't there before. Later, when the programming changes again, that
> language track may be removed.
> It's not clear to me how these changes are exposed by the proposed Media
> Element events.
The thinking is that you switch between different streams by setting the
src="" attribute to point to another stream, in which case you'll get an
emptied event along with another bunch of events. If you have a single
source where audio/video/text streams appear and disappear, there's not
really any way to handle it.
> The "loadedmetadata" event is used to indicate that the TimedTracks are
> ready, but it appears that it is only fired before playback begins. Is
> this event fired again whenever a new track is discovered? Is there
> another event that is intended for this situation?
> Similarly, is there an event that indicates when a track has been
> removed? Or is this also handled by the "loadedmetadata" event somehow?
No, the loadedmetadata event is only fired once per resource, it's not the
event you're looking for.
As for actual solutions, I think that having loadedmetadata fire again if
the number or type of streams change would make some sense.
More information about the whatwg