W3C home > Mailing lists > Public > public-media-capture@w3.org > October 2014

Re: Bug 26939 "what info does the app get when a track ends" - where are we

From: Jan-Ivar Bruaroey <jib@mozilla.com>
Date: Fri, 10 Oct 2014 12:48:36 -0400
Message-ID: <54380DE4.7090806@mozilla.com>
To: Jim Barnett <1jhbarnett@gmail.com>, public-media-capture@w3.org
On 10/10/14, 10:22 AM, Jim Barnett wrote:
> I think it's a bit odd to have a MediaStreamErrorEvent with no error.

Actually, since MediaStreamErrorEvent has a public constructor that 
takes an eventInitDict, there's no inherent guarantee of an error, so 
arguably either the error argument must be nullable or the spec should 
say what the default is or require the UA to throw on absence (this has 
come up before [1]).

>   It would be cleaner to have a separate Ended event, where the cause 
> might or might not be an error.

Not sure this counts as precedence, but RTCPeerConnectionIceEvent can 
have a null RTCIceCandidate.candidate.

> (Not counting Jan-Ivar's Promise-based proposal) there seem to be two 
> proposals on the table:

That's one way to count. ;-) FWIW it's a prime candidate since we only 
end once [2]. I cast my vote for adding an 'ended' promise attribute 
(and keeping onended as-is).

.: Jan-Ivar :.

[2] http://www.w3.org/2001/tag/doc/promises-guide#one-time-events
Received on Friday, 10 October 2014 16:49:04 UTC

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