Bug 186294 - Implement getDisplayMedia, the Screen Capture API
Summary: Implement getDisplayMedia, the Screen Capture API
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 11
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-04 17:52 PDT by Lee Ho
Modified: 2019-04-12 14:31 PDT (History)
18 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Ho 2018-06-04 17:52:05 PDT
This is a request for implementing getDisplayMedia, the Screen Capture API that is an extension to the Media Capture API. This allows a display surface to be used as a source for a media stream.

Examples of display surfaces that may be supported include: monitor, window, application (entire collection of windows for an application), or browser (single browser window). Having the ability to capture and share a monitor display would be a great start.

The specification is here: https://w3c.github.io/mediacapture-screen-share/

Microsoft Edge (EdgeHTML 17) added support for the Screen Capture API as part of the Windows 10 April 2018 update: https://blogs.windows.com/msedgedev/2018/05/02/bringing-screen-capture-to-microsoft-edge-media-capture-api/
Google Chrome and Mozilla Firefox have already had support for non-standard screen capture APIs for years. They have bugs tracking migrations to the standard getDisplayMedia API (Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=326740, Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1321221).
Comment 1 Eric Carlson 2018-06-05 13:50:37 PDT
getDisplayMedia is implemented (for displays only, not window, or application) on macOS behind the ScreenCapture runtime flag (off by default). See bugs 181070, 181291, and 181333.
Comment 2 Lee Ho 2018-06-05 21:50:39 PDT
That's great to hear! How do we go about enabling this ScreenCapture runtime flag? What (minimum) version of Safari is required?
Comment 3 Eric Carlson 2018-06-06 09:28:59 PDT
There is no UI to enable this setting yet because the (complex) user prompt for getDisplayMedia hasn't been added to Safari yet.
Comment 4 wilhelm.wanecek 2018-08-15 01:22:38 PDT
Are there any plans to extend the implementation to include window or application? If possible, it would also be really valuable to get any sort of estimate about when the UI work for Safari is planned.
Comment 5 Adam Szmyd 2018-11-01 00:36:12 PDT
(In reply to Eric Carlson from comment #1)
> getDisplayMedia is implemented (for displays only, not window, or
> application) on macOS behind the ScreenCapture runtime flag (off by
> default). See bugs 181070, 181291, and 181333.

How to enable this `ScreenCapture` runtime flag to prepare code for this implementation and see how it works for now?
Comment 6 Eric Carlson 2018-11-01 04:58:00 PDT
(In reply to Adam Szmyd from comment #5)
> How to enable this `ScreenCapture` runtime flag to prepare code for this
> implementation and see how it works for now?

It can only be enabled at build time currently.
Comment 7 Raship Shah 2018-11-10 22:47:25 PST
+1
Comment 8 Octavian Naicu 2018-11-23 07:47:57 PST
+1
Comment 9 m.kurz+webkitbugs 2019-01-30 12:59:00 PST
Please ship this!

Chrome 72 supports it by default since yesterday: https://addpipe.com/blog/standards-compliant-screen-capture-in-chrome-72/

Firefox 66 supports this too:
https://bugzilla.mozilla.org/show_bug.cgi?id=1321221

Edge supports this already since EdgeHTML 17: https://blogs.windows.com/msedgedev/2018/05/02/bringing-screen-capture-to-microsoft-edge-media-capture-api/#Amr4BHB73ZQfDKLq.97
Comment 10 Skip 2019-03-25 22:29:53 PDT
+1
Comment 11 netemowihe 2019-04-11 05:02:24 PDT
Even Edge has this functionality. Please implement!
Comment 12 Jon Lee 2019-04-12 13:08:30 PDT
It is now available as an experimental feature in Safari Technology Preview. Please give it a try. We welcome your feedback!
Comment 13 netemowihe 2019-04-12 14:31:51 PDT
I tried it out. Works great for sharing the entire screen! 

Would be nice if the feature allowed the user to select whether they want to share their entire screen(s), a particular window or a safari browser tab. Similar functionality exists in Chrome, Firefox and Edge.