On Fri, Feb 27, 2015 at 5:59 PM, Jan-Ivar Bruaroey <jib@mozilla.com> wrote:
> On 2/26/15 4:18 PM, Martin Thomson wrote:
>
>> navigator.mediaDevices.cancelAllRequests()
>> .then(() => console.log('cancel complete'));
>>
>
> Why tie it to gUM?
>
> navigator.cancelAllPermissionRequests();
>
> And it could be synchronous.
I don't see any reason to believe that (say) geo or notification
requests have the same cancellation criteria.
-Ekr
> var gum = navigator.mediaDevices.getUserMedia(c);
>> gum.promise.catch(() => console.log('rejected'));
>>
>
> var p = getUserMedia(c).promise.then(console.log("Success")).catch(
> failure);
>
> is... ug.ly.
>
> Even with a .then() method, it's a chaining speed-bump, because out of:
>
> var p = getUserMedia(c);
> var p = getUserMedia(c).then(console.log("Success"));
> var p = getUserMedia(c).then(console.log("Success")).catch(failure);
>
> Only the first p is from gUM.
>
> .: Jan-Ivar :.
>
>
>