W3C home > Mailing lists > Public > public-webrtc@w3.org > April 2015

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

From: Justin Uberti <juberti@google.com>
Date: Mon, 13 Apr 2015 18:52:51 -0700
Message-ID: <CAOJ7v-0d_t5x3_TRQ7zcyxKn5rt_DD+G-a-STFs_M2RDdAAC7Q@mail.gmail.com>
To: Iñaki Baz Castillo <ibc@aliax.net>
Cc: Martin Thomson <martin.thomson@gmail.com>, "Cullen Jennings (fluffy)" <fluffy@cisco.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:43 UTC