Open Bug 1854382 Opened 1 years ago Updated 6 days ago

[meta] Implement a ScreenCaptureKit backend for desktop capture, with SCContentSharingPicker for selecting source

Categories

(Core :: WebRTC: Audio/Video, task, P3)

Desktop
macOS
task

Tracking

()

ASSIGNED

People

(Reporter: padenot, Assigned: pehrsons)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

(Keywords: meta)

Severity: -- → S3
Type: defect → enhancement
OS: Unspecified → macOS
Hardware: Unspecified → Desktop
Version: unspecified → Trunk

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:

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: nobody → apehrson
Status: NEW → ASSIGNED
Severity: S3 → N/A
Type: enhancement → task
Priority: -- → P2
Depends on: 1914196
Blocks: 1842237
Depends on: 1914835
Depends on: 1914837
Depends on: 1915082
Depends on: 1915106
Summary: Implement a ScreenCaptureKit backend for screen capture → Implement a ScreenCaptureKit backend for screen capture, with SCContentSharingPicker for selecting screen
Keywords: meta
Summary: Implement a ScreenCaptureKit backend for screen capture, with SCContentSharingPicker for selecting screen → Implement a ScreenCaptureKit backend for desktop capture, with SCContentSharingPicker for selecting source
Depends on: 1915562
Summary: Implement a ScreenCaptureKit backend for desktop capture, with SCContentSharingPicker for selecting source → [meta] Implement a ScreenCaptureKit backend for desktop capture, with SCContentSharingPicker for selecting source
Depends on: 1917191
Depends on: 1918096
Depends on: 1918648
Depends on: 1918746
Depends on: 1918996
Depends on: 1938065
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.