W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2020

Re: [mediacapture-main] Enforcing user gesture for getUserMedia (#639)

From: youennf via GitHub <sysbot+gh@w3.org>
Date: Mon, 30 Mar 2020 13:47:46 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-606009930-1585576065-sysbot+gh@w3.org>
> My requirement is that if permission has been previously granted, it MUST be possible to enter a videoconference without a prompt.

That seems fine by me if we add the following words to your sentence "as long as user clicks on the page".

Is this fine with you?

> I don't know whether current VC products switch to a new page when starting or not,

From my experience of websites supporting Safari, they do not switch to a new page.
Reason might be that doing a navigation is time consuming, triggers a UI blank page... In Safari, this would also reprompt users.
It is usually best practice to request access to privilege resources as close as possible to the time they will actually be used.

Several websites supporting Safari call getUserMedia when loading the page or shortly after loading the page without a user gesture. This usually ends up triggering a prompt in Safari, except if users opt-in to always grant. To keep being unprompted when user grants persistent access, these websites would have to adapt, for instance by using one of the following flow:
- Call getUserMedia at the time user clicks the 'enter call' button.
- Start the call with camera/microphone muted and have some UI giving an incentive for user to share mic/camera.
Some websites like whereby.com would have nothing to change.

> This needs to be clear.

As of determining whether a user gesture is still available after a page switch, I am not sure that the definition of 'user gesture' is consistent across browsers. I am not sure we can be very precise one way or the other. Safari implementation would not allow this for instance. I don't know what other browsers do. I know some ideas (maybe implementation as well) have been discussed to pass a user gesture through postMessage.

GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/639#issuecomment-606009930 using your GitHub account
Received on Monday, 30 March 2020 13:47:48 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:50 UTC