Re: Canceling pending getUserMedia() call

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
<ibc@aliax.net>

Received on Wednesday, 28 January 2015 15:22:05 UTC