[webkit-changes] [WebKit/WebKit] 81afed: REGRESSION (274873 at main): Audio is not anchored to...

aestes noreply at github.com
Wed Mar 13 23:45:14 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 81afed49cdfeb190a1004c3665002e81d129b6da
      https://github.com/WebKit/WebKit/commit/81afed49cdfeb190a1004c3665002e81d129b6da
  Author: Andy Estes <aestes at apple.com>
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
    M Source/WTF/wtf/text/WTFString.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm

  Log Message:
  -----------
  REGRESSION (274873 at main): Audio is not anchored to WKWebView's spatial location
https://bugs.webkit.org/show_bug.cgi?id=270919
rdar://123800596

Reviewed by Jer Noble.

In 274873 at main we added the infrastructure for passing a spatial tracking label from the UI process
to the GPU process. Because a null WTF::String is implicitly converted to @"", this change had the
unintended side effect of setting AVSampleBufferVidoRenderer and AVPlayer's spatial tracking label
to the empty string rather than the default value of nil, breaking spatial tracking for the audio
emitted from WKWebView.

Resolved this by introducing nsStringNilIfNull -- returning nil if the WTF::String is null otherwise
converting it as-is to NSString -- and using it to set spatial tracking labels in MediaPlayerPrivate.

* Source/WTF/wtf/text/WTFString.h:
(WTF::nsStringNilIfNull):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setSpatialTrackingLabel):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateSpatialTrackingLabel):

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



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


More information about the webkit-changes mailing list