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

Re: Input needed: Cancelling a permission request?

From: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>
Date: Thu, 26 Feb 2015 12:07:19 +0000
To: Anne van Kesteren <annevk@annevk.nl>
CC: Harald Alvestrand <harald@alvestrand.no>, "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <1447FA0C20ED5147A1AA0EF02890A64B1D1A6EF3@ESESSMB209.ericsson.se>
On 26/02/15 12:43, Anne van Kesteren wrote:
> On Thu, Feb 26, 2015 at 12:33 PM, Stefan Håkansson LK
> <stefan.lk.hakansson@ericsson.com> wrote:
>> What is supposed to happen if you do:
>>
>> var p = navigator.mediaDevices.getUserMedia(options);
>>
>> followed by
>>
>> p.constructor.reject();
>
> There's no public way to reject p. Promise.reject() is a static method
> to create an instance of a rejected promise.

OK. I was fooled by experimenting in the console of a couple of 
browsers. It (i.e. reject a Promise by calling constructor.reject) 
seemed to work there: no warnings and one even prints out a new status 
"rejected" for the Promise. (A third browser warns.)

At closer inspection it turns out that the Promise remains "pending" in 
all cases.
Received on Thursday, 26 February 2015 12:07:45 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 26 February 2015 12:07:46 UTC