WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
227608
the method getDisplayMedia only can be called from a user gesture handler
https://bugs.webkit.org/show_bug.cgi?id=227608
Summary
the method getDisplayMedia only can be called from a user gesture handler
walter
Reported
2021-07-01 22:32:09 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-07-08 22:33:15 PDT
<
rdar://problem/80360292
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug