Re: Can getUserMedia() get called on a callback/event ?

Inaki, do you have a JSFiddle demonstrating the problem? It's not clear to
me what exactly in your app Chrome is not happy about.

On Wed, Apr 8, 2015 at 9:42 AM, Iñaki Baz Castillo <ibc@aliax.net> wrote:

> 2015-04-08 18:34 GMT+02:00 Martin Thomson <martin.thomson@gmail.com>:
> > On 8 April 2015 at 04:17, Iñaki Baz Castillo <ibc@aliax.net> wrote:
> >> Really, still I don't understand how the apprtc demo of Google works
> >> given that it automatically prompts the user for getUserMedia without
> >> the need for the user to click in any button. Where is the trick? Does
> >> it work if the JS lib calls gUM even before the DOM is load? but it
> >> would fail if it waits for DOM "load" event, right? This is a no sense
> >> IMHO.
> >
> >
> > It works because the gUM prompt is not conditional on an engagement
> gesture.
>
> Thanks, but I do not understand. In my tests calling gUM within a sync
> javascript loaded before the DOM does work, but gUM within a
> setTimeout or window.addEventListener('load') it does not always work
> (don't remember now the exact results).
>
> What about all those sites that do not load the JS in sync mode but by
> means of requireJS or whatever?
>
> I think the current non very well documented behavior is a not very
> good approach or solution to a non very well defined security problem.
>
>
> --
> Iñaki Baz Castillo
> <ibc@aliax.net>
>
>

Received on Tuesday, 14 April 2015 01:53:38 UTC