Re: [Bug 21618] New: MediaStreams with no tracks need to not be Ended

On 2013-04-09 14:27, Robert O'Callahan wrote:
> On Tue, Apr 9, 2013 at 10:59 PM, Harald Alvestrand <harald@alvestrand.no
> <mailto:harald@alvestrand.no>> wrote:
>
>     Hmmm.... I'm trying to parse the media element spec, and it says
>     that it's ended when its input has reached the end of the medium -
>     but I can't tell if there's the option of manually rewinding the
>     input, or if it's possible for a media source to change the position
>     of the end after the media element has ended.
>
>     Is it possible for a media element to become un-ended after having
>     been ended?
>
>
> Yes. You can set currentTime to seek to any position. Also you can call
> play() to replay the resource from the beginning. However, this has to
> be triggered by the application --- the resource cannot spontaneously
> re-animate itself :-).
>

It's rather convenient to be able to detect, on MediaStream level, when 
all tracks in a stream ends without having to monitor the states of all 
the individual tracks. The simplest example in the spec uses this 
functionality.

I think the problem with the current solution is the ended state on 
MediaStream. It's hard to come up with a natural definition since a 
stream can have no tracks and live tracks could possibly be added after 
the stream ends. The useful thing is the event. Couldn't we simply have 
an event that indicates that all tracks, currently in the stream, have 
ended, and not set any state?

/Adam

Received on Friday, 12 April 2013 08:42:29 UTC