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

Re: Canceling pending getUserMedia() call

From: Iñaki Baz Castillo <ibc@aliax.net>
Date: Wed, 28 Jan 2015 16:20:44 +0100
Message-ID: <CALiegfnpsUhp1MXZ1BJNFpxqLJeeruH+=7gwstrJ4LjHkGzhnw@mail.gmail.com>
To: Jan-Ivar Bruaroey <jib@mozilla.com>
Cc: "public-media-capture@w3.org" <public-media-capture@w3.org>
2015-01-28 6:29 GMT+01:00 Jan-Ivar Bruaroey <jib@mozilla.com>:
> Why would you call gUM again if you already have an outstanding request?

Because I need audio+video and the previous+prending gUM was just about audio.

>> I still consider that a simple API would be nice to have:
>> var gum = getUserMedia(....);
>> [...]
>> gum.cancel();  // And voila, prompt disappears.
> Understood, though getUserMedia returns a promise, so you can't do cancel on
> that. ;-)

opss :)

> Note though that it may not be as trivial an issue to add as you seem to
> suggest, as it may open up avenues where web-page's could use repeated
> issuing and canceling of prompts over and over to pester a user into
> accepting or accidentally hitting a permission prompt.
> Like it or not, there's a disincentive built into the existing behavior to
> issuing these prompts frivolously (it stays till the user addresses it or
> the page is refreshed). Not saying we shouldn't consider it, just that it's
> not obvious what the best answer is.

Right, more complex than it looks.

Iñaki Baz Castillo
Received on Wednesday, 28 January 2015 15:22:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 28 January 2015 15:22:05 UTC