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

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 :.

[1] 
http://lists.w3.org/Archives/Public/public-media-capture/2014Aug/0081.html
[2] http://www.w3.org/2001/tag/doc/promises-guide#one-time-events

Received on Friday, 10 October 2014 16:49:04 UTC