| Summary: | Calling getDisplayMedia() the first time results in an error. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | mawojtcz | ||||
| Component: | WebRTC | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Major | CC: | eric.carlson, jer.noble, js-webkit, mkrens, saghul, webkit-bug-importer, youennf | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 16 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | macOS 13 | ||||||
| Attachments: |
|
||||||
|
Description
mawojtcz
2023-08-04 03:59:34 PDT
(In reply to mawojtcz from comment #0) > Also, it usually take a long time for getDisplayMedia() to resolve with the > error (up to 1 minute). WebKit sets a 60 second watchdog timer when the system prompt is shown, so this suggests that ScreenCaptureKit.framework isn't calling WebKit's delegate after the user chooses a screen or window (see https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm#L380). It would be extremely helpful for us to examine a sysdiagnose taken after such a failure. If it is possible to get one, please send it directly to me at eric.carlson@apple.com. In my case I never get a prompt to share the screen and can consistently reproduce this.
navigator.mediaDevices.getDisplayMedia({
video: true,
audio: true,
})
always results in: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Simple fiddle example: https://jsfiddle.net/9uLcgb0d/
This also does not work for example: https://www.webrtc-experiment.com/RecordRTC/
I've submitted Feedback + sysdiagnose under: FB13222093
Please let me know if I can help.
Version 17.0 (17616.1.27.111.22, 17616)
Created attachment 468007 [details]
repeated requests to navigator.mediaDevices.getDisplayMedia always results in error
Hello, any update on this, please? We have sent sysdiagnose files over email to Eric as requested on Aug 23rd and also a screen recording with another sysdiagnose on Aug 30th and then resent them again on Sept 19th. I can reproduce this 100% in macOS Monterrey with Safari 17. Not so on Sonoma. I have the same problem as Michael all the time, see https://bugs.webkit.org/show_bug.cgi?id=259823#c3 and https://bug-259823-attachments.webkit.org/attachment.cgi?id=468007. Screen capturing does not work in any web app. My system version is macOS 12.7.1 (21G920). My Safari version is 17.1.2 (17616.2.9.11.12, 17616). |