W3C home > Mailing lists > Public > public-media-capture@w3.org > February 2015

Re: Input needed: Cancelling a permission request?

From: Eric Rescorla <ekr@rtfm.com>
Date: Sat, 28 Feb 2015 06:38:42 -0800
Message-ID: <CABcZeBMWMBrNFWLAYgq1XqKqdbiEt9h+bOWkmK_PeMjZS97_Jg@mail.gmail.com>
To: Jan-Ivar Bruaroey <jib@mozilla.com>
Cc: Martin Thomson <martin.thomson@gmail.com>, Stefan HÃ¥kansson LK <stefan.lk.hakansson@ericsson.com>, Anne van Kesteren <annevk@annevk.nl>, Harald Alvestrand <harald@alvestrand.no>, "public-media-capture@w3.org" <public-media-capture@w3.org>
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 :.
>
>
>
Received on Saturday, 28 February 2015 14:39:52 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 28 February 2015 14:39:52 UTC