[Webkit-unassigned] [Bug 227608] New: the method getDisplayMedia must be called from a user gesture handler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 1 22:32:09 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=227608

            Bug ID: 227608
           Summary: the method getDisplayMedia must be called from a user
                    gesture handler
           Product: WebKit
           Version: Safari 14
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: WebRTC
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: yafan at cisco.com
                CC: youennf at gmail.com

When we share screen in Safari browser, we found there is a restriction - the method getDisplayMedia must be called from a user gesture handler

In our current meeting behaviour, we cannot call "getDisplayMedia" method from a user gesture handler directly. The reason is  we need to get the presenter privilege first.
As a result, the calling of "getDisplayMedia" is from a callback handler.  We got the following error from the callback handler:

```
getDisplayMedia error: InvalidAccessError InvalidAccessError: getDisplayMedia must be called from a user gesture handler.
```

At least, the calling should not fail. I think a prompt for surface picker or asking permission is acceptable.


Could Safari loosen the restriction just like Chrome browser?

I wrote a example: https://www.fanyamin.com/webrtc/examples/desktop_sharing.html

You can try it by Safari and Chrome, it is ok by Chrome but failed to start sharing by Safari.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210702/b84afba6/attachment.htm>


More information about the webkit-unassigned mailing list