Re: Input needed: Cancelling a permission request?

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.

> 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 01:59:32 UTC