Re: Initial draft of mediacapture-output spec posted

On 12/16/14, 8:02 PM, Justin Uberti wrote:
> On Tue, Dec 16, 2014 at 3:18 PM, Martin Thomson 
> <martin.thomson@gmail.com <mailto:martin.thomson@gmail.com>> wrote:
>
>     You probably need to get someone with more DOM clue than I to look at
>     this, but the use of a Promise-bearing setter for sinkId might be
>     incompatible with established notions of using HTML attributes for
>     this sort of thing.  As currently specified, I assume that you could
>     not support <video sinkId="foo"/>.
>
>
> We considered that, but ultimately decided on the Promise approach 
> because it provides a reasonable failure semantic.

Just being a method that can throw gives it a reasonable failure 
semantic, but why does it need to be asynchronous?

Like Martin, I'd expect push-back on a promise-returning set-method, 
especially in HTMLMediaElement where other things in development 
arguably have better reasons for being asynchronous and still aren't:

   videoelement.srcObject = stream;
   videoelement.onloadedmetadata = e => videoelement.play(); // stream 
loaded!

and

   let stream = videoelement.captureStreamUntilEnded();
   pc.addStream(stream);

> And, of course, because I love Promises.

;-)

.: Jan-Ivar :.

Received on Thursday, 18 December 2014 18:15:10 UTC