W3C home > Mailing lists > Public > public-media-capture@w3.org > May 2013

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

From: Harald Alvestrand <harald@alvestrand.no>
Date: Tue, 28 May 2013 11:04:09 +0200
Message-ID: <51A47309.3070808@alvestrand.no>
To: robert@ocallahan.org
CC: Adam Bergkvist <adam.bergkvist@ericsson.com>, Martin Thomson <martin.thomson@gmail.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On 04/13/2013 03:08 PM, Robert O'Callahan wrote:
> On Fri, Apr 12, 2013 at 8:42 PM, Adam Bergkvist 
> <adam.bergkvist@ericsson.com <mailto:adam.bergkvist@ericsson.com>> wrote:
>
>     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?
>
>
> You could, but you still have to define the behavior of a media 
> element with a MediaStream source, so you still need to define some 
> kind of ended state --- or else say that a media element with a 
> MediaStream source never ends, which is very unintuitive since in 
> practice MediaStreams do end.
>
> I think that, given many kinds of MediaStreams do actually end, not 
> exposing that state because of weird edge cases is undesirable and 
> will frustrate Web developers.
>
> How about defining ended-ness on a MediaStream be dependent on the 
> type of MediaStream, and insist that an ended MediaStream never 
> transitions to not-ended. For a default definition, say that a 
> MediaStream is ended if at some point in its history it transitioned 
> from having live tracks to having no live tracks.

(resurrecting the discussion, since I saw no conclusion)
This is a possiblity, but a) at the moment we don't have any MediaStream 
types, and b) it doesn't address the original issue - what's the ended 
state of a MediaStream with no tracks?

I think having ended() return the AND of the ended() states of the 
component tracks (ANDed with true, so that an empty MediaStream is 
ended), with no guarantee about the future value of ended(), will be a 
description that is understandable by implementors.

So a stream will un-end itself if one adds a live track to it. I can 
live with that.
Received on Tuesday, 28 May 2013 09:04:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:17 UTC