[meta] Implement a ScreenCaptureKit backend for desktop capture, with SCContentSharingPicker for selecting source
Categories
(Core :: WebRTC: Audio/Video, task, P3)
Tracking
()
People
(Reporter: padenot, Assigned: pehrsons)
References
(Depends on 3 open bugs, Blocks 1 open bug)
Details
(Keywords: meta)
It's better in every capacity: https://developer.apple.com/documentation/screencapturekit/
![]() |
||
Updated•1 years ago
|
Comment 1•8 months ago
|
||
The old CGDisplayStream
APIs have been made deprecated on macOS 15, compiling with --enable-macos-target=15.0
now fails with:
0:08.81 In file included from Unified_mm_ktop_capture_objc_gn0.mm:11:
0:08.81 /Volumes/BertalanD/mozilla-unified/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_cgimage.mm:24:45: error: 'CGDisplayCreateImage' is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.
0:08.81 24 | rtc::ScopedCFTypeRef<CGImageRef> cg_image(CGDisplayCreateImage(display_id));
0:08.81 | ^
0:08.81 /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:383:33: note: 'CGDisplayCreateImage' has been explicitly marked unavailable here
0:08.81 383 | CG_EXTERN CGImageRef __nullable CGDisplayCreateImage(CGDirectDisplayID displayID)
0:08.81 | ^
[... lots of other errors like this ...]
The getDisplayMedia WebRTC sample test fails with the following error: getDisplayMedia error: NotFoundError
, unless permission has been granted via Settings > Privacy & Security > Screen & System Audio Recording.
Support to use ScreenCaptureKit has been added to the upstream WebRTC library:
- https://webrtc.googlesource.com/src/+/d4a6c3f76fc3b187115d1cd65f4d1fffd7bebb7c
- https://webrtc.googlesource.com/src/+/3069c60adafff3a40ec679c29f9e685f9ac59a45
- https://webrtc.googlesource.com/src/+/2086ff5d33facefe4624d65ad0d1e96c7b872f57
- https://webrtc.googlesource.com/src/+/c2f02608946e393367edf31bc7d4888c23002576
Assignee | ||
Comment 2•7 months ago
|
||
Thanks for the note. We have also noticed the deprecation and will use this bug to track the switch to an SCK backend. That there is one in libwebrtc is good news, then we don't have to contribute one from scratch. It looks like we will need to add window capture at a minimum before making the switch though.
Assignee | ||
Updated•7 months ago
|
Assignee | ||
Updated•6 months ago
|
Assignee | ||
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 days ago
|
Description
•