Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 469467e53afbf8f02646e57d3523a38dcdcc5e1e
      
https://github.com/WebKit/WebKit/commit/469467e53afbf8f02646e57d3523a38dcdcc5e1e
  Author: Youenn Fablet <[email protected]>
  Date:   2026-05-12 (Tue, 12 May 2026)

  Changed paths:
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    A LayoutTests/webrtc/getDisplayMedia-pc-resolution-expected.txt
    A LayoutTests/webrtc/getDisplayMedia-pc-resolution.html
    M Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp
    M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.h
    M Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.cpp
    M Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h

  Log Message:
  -----------
  Safari WebRTC screen sharing via getDisplayMedia starts at extremely low 
quality and takes ~30 seconds to become legible for remote participants
rdar://175425085
https://bugs.webkit.org/show_bug.cgi?id=312472

Reviewed by Jean-Yves Avenard.

By default, peer connection should favour resolution for screenshare and frame 
rate for camera content.
We make sure to let know the libwebrtc backend that sent content is screenshare 
by implementing RealtimeOutgoingVideoSource::is_screencast based on the capture 
device type.

We also make sure to pipe content hint information to the libwebrtc backend, 
which can allow canvas tracks to select easily between the two behaviors.

Covered by added test.

Test: webrtc/getDisplayMedia-pc-resolution.html
* LayoutTests/webrtc/getDisplayMedia-pc-resolution-expected.txt: Added.
* LayoutTests/webrtc/getDisplayMedia-pc-resolution.html: Added.
* Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp:
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::addTrack):
(WebCore::LibWebRTCMediaEndpoint::createSourceAndRTCTrack):
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
(WebCore::LibWebRTCRtpSenderBackend::replaceTrack):
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
(WebCore::toWebRTCContentHint):
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
* Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.cpp:
(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):
(WebCore::RealtimeOutgoingVideoSource::is_screencast const):
* Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h:

Canonical link: https://commits.webkit.org/313072@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to