WebRTC screen sharing

300 views
Skip to first unread message

Neil Young

unread,
Mar 16, 2023, 11:09:56 AM3/16/23
to discuss-webrtc
I'm having two questions regarding this, both verified agains "WebRTC samples" (https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/)

1) getDisplayMedia seems to be not supported at iOS, neither in Chrome nor in Safari. Partly confirmed here: https://contest-server.cs.uchicago.edu/ref/JavaScript/developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia.html
Is this true and if, is there any change to be expected?

2) The same sample code fails in Firefox with an exception on attempting to "getDisplayMedia". There is a shim for that, which seems to fail with getDisplayMedia error: NotFoundError. Any comments on that? Known issue?

Philipp Hancke

unread,
Mar 16, 2023, 12:22:51 PM3/16/23
to discuss...@googlegroups.com
Am Do., 16. März 2023 um 16:10 Uhr schrieb 'Neil Young' via discuss-webrtc <discuss...@googlegroups.com>:
I'm having two questions regarding this, both verified agains "WebRTC samples" (https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/)

1) getDisplayMedia seems to be not supported at iOS, neither in Chrome nor in Safari. Partly confirmed here: https://contest-server.cs.uchicago.edu/ref/JavaScript/developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia.html
Is this true and if, is there any change to be expected?

Apple never comments on their plans, no? Given how complex screensharing is from iOS native applications (requiring an extension) I doubt we'll see it any time soon however (same for Android/Chrome if I recall correctly)
 
2) The same sample code fails in Firefox with an exception on attempting to "getDisplayMedia". There is a shim for that, which seems to fail with getDisplayMedia error: NotFoundError. Any comments on that? Known issue?

Works here and Firefox has supported getDisplayMedia without any shims for a couple of years.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/ae43af0e-4667-46f7-b704-c083a07c989an%40googlegroups.com.

Neil Young

unread,
Mar 16, 2023, 12:34:44 PM3/16/23
to discuss-webrtc
> Apple never comments on their plans, no? 

Well certainly not. It was just knocking on the bush.

> Firefox has supported getDisplayMedia

True. Both tests suggested in the blog entry return true. However, look at this please: https://user-images.githubusercontent.com/731020/225689130-76411762-efa1-4e7b-b249-5dab0cd6029d.png

Mac OS Ventura



Philipp Hancke

unread,
Mar 16, 2023, 12:40:03 PM3/16/23
to discuss...@googlegroups.com, Jan-Ivar Bruaroey
is this using StageManager which is a known problem in Chrome on Ventura:

Jan-Ivar may know...

Neil Young

unread,
Mar 16, 2023, 12:42:34 PM3/16/23
to discuss-webrtc
Hehe, never heard of "Stage Manager" before. But checking in the settings: It is off.

Neil Young

unread,
Mar 16, 2023, 12:45:18 PM3/16/23
to discuss-webrtc
But nice feature, this Stage Manager :)

Neil Young

unread,
Mar 16, 2023, 12:47:24 PM3/16/23
to discuss-webrtc
But I confirm: Not an issue with FF on Linux (Ubuntu). So that's fine. Who on earth will use FF on Mac...

jib

unread,
Mar 16, 2023, 1:36:12 PM3/16/23
to discuss-webrtc
Hi Neil, macOS requires the user to give the Firefox and Chrome apps "Screen Recording" permission first. NotFoundError means Firefox doesn't have it. Normally, an OS prompt should have popped up here (see attachment) when you first pick a window in Firefox, but the OS may throttle those prompts, so it's not shown always. Unfortunately, we don't have a good way around that.

If you missed the prompt, you need to go to System Settings -> Privacy & Security -> Screen Recording, and turn it on for Firefox.

We do get these reports from time to time, so we're not sure if the OS prompts appear as often as they should.

Hope that helps!
ScreenRecordingPromptInMacOS.png

Neil Young

unread,
Mar 16, 2023, 1:41:44 PM3/16/23
to discuss-webrtc
Yepp, that was it. Gave the permission and it works now. Thanks for the pointer
Reply all
Reply to author
Forward
0 new messages