- From: Jan-Ivar Bruaroey <jib@mozilla.com>
- Date: Fri, 10 Oct 2014 13:06:49 -0400
- To: Jim Barnett <1jhbarnett@gmail.com>, public-media-capture@w3.org
Received on Friday, 10 October 2014 17:07:16 UTC
On 10/10/14, 12:48 PM, Jan-Ivar Bruaroey wrote:
> 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).
Since this is still new to many, I should probably explain what I mean
to make it an actual proposal:
interface MediaStreamTrack : EventTarget {
...
attribute EventHandler onended;
attribute Promise ended; // <--- add this
};
So people can write:
track.ended.then(() => log("Ended"), reason => log("Dropped: " +
reason.message));
instead of:
track.onended = () => log("Ended or dropped");
.: Jan-Ivar :.
> [2] http://www.w3.org/2001/tag/doc/promises-guide#one-time-events
Received on Friday, 10 October 2014 17:07:16 UTC