Re: Promises (Re: New Editor's Draft of MediaStream Image Capture)

On Wed, Sep 10, 2014 at 7:07 AM, Jan-Ivar Bruaroey <jib@mozilla.com> wrote:

> On 9/9/14 8:25 PM, Harald Alvestrand wrote:
>
>> I've said this before, but.....
>>
>> is there any reason why getting usermedia with a promise needs to have
>> the same name as getUserMedia?
>>
>
> No technical reason, no.
>
>  If we define a new function called requestUserMedia(), there's zero
>> compatibility problems.
>>
>
> Except there's zero compatibility problems with overloading the existing
> function as well, since it returns void, and callback args can be made
> optional.
>

This seems like an especially bad idea. We've already had one Firefox bug
this
month that could have been averted by tighter argument checking.

I don't see the problem with defining a new API point that uses promises.
This also has the advantage that you could do it later.

-Ekr

Received on Wednesday, 10 September 2014 15:26:59 UTC