Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 778e409cfeb9f52381f185896296c2d14b3cceed
      
https://github.com/WebKit/WebKit/commit/778e409cfeb9f52381f185896296c2d14b3cceed
  Author: Jer Noble <[email protected]>
  Date:   2024-04-02 (Tue, 02 Apr 2024)

  Changed paths:
    M Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/html/HTMLMediaElement.h
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/Page.h
    M Source/WebCore/platform/cocoa/PlaybackSessionModel.h
    M Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.h
    M Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm
    M Source/WebCore/platform/graphics/MediaPlayer.cpp
    M Source/WebCore/platform/graphics/MediaPlayer.h
    M Source/WebCore/platform/graphics/MediaPlayerPrivate.h
    M 
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
    M 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
    M 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
    M 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
    M 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.h
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.mm
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h
    M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/WKContentView.h
    M Source/WebKit/UIProcess/ios/WKContentView.mm
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
    M Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h
    M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.messages.in
    M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm

  Log Message:
  -----------
  [visionOS] Audio-only playback does not appear to originate from its hosted 
window
https://bugs.webkit.org/show_bug.cgi?id=271492
rdar://125259675

Reviewed by Andy Estes.

Introduce the concept of a "default spatial tracking label" by creating a label 
in the UI process
and adding it to a new UIView child of WKContentView. That label is passed down 
to the WebContent
process and GPU process, where it is consumed by MediaPlayerPrivate objects in 
the GPU process.

When the page is visible, and the MediaPlayerPrivate has no video 
representation, this new "default"
label is used. Otherwise, allow the platform to determine the label itself, and 
assign it to both
the video and audio presentations automatically.

When the page is _not_ visible, use the AVAudioSession's spatial tracking label.

* Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::defaultSpatialTrackingLabel const):
(WebCore::Document::defaultSpatialTrackingLabelChanged):
(WebCore::Document::addDefaultSpatialTrackingLabelChangedObserver):
* Source/WebCore/dom/Document.h:
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::m_defaultSpatialTrackingLabelChangedObserver):
(WebCore::HTMLMediaElement::visibilityStateChanged):
(WebCore::HTMLMediaElement::updateSpatialTrackingLabel):
(WebCore::HTMLMediaElement::spatialTrackingLabel const):
(WebCore::HTMLMediaElement::setSpatialTrackingLabel):
(WebCore::HTMLMediaElement::defaultSpatialTrackingLabelChanged):
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setDefaultSpatialTrackingLabel):
* Source/WebCore/page/Page.h:
(WebCore::Page::defaultSpatialTrackingLabel const):
* Source/WebCore/platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::defaultSpatialTrackingLabel const):
(WebCore::MediaPlayer::setDefaultSpatialTrackingLabel):
(WebCore::MediaPlayer::spatialTrackingLabel const):
(WebCore::MediaPlayer::setSpatialTrackingLabel):
* Source/WebCore/platform/graphics/MediaPlayer.h:
* Source/WebCore/platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::defaultSpatialTrackingLabel const):
(WebCore::MediaPlayerPrivateInterface::setDefaultSpatialTrackingLabel):
* 
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::isVisible const):
* 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformSetVisible):
(WebCore::MediaPlayerPrivateAVFoundationObjC::defaultSpatialTrackingLabel 
const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setDefaultSpatialTrackingLabel):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setSpatialTrackingLabel):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateSpatialTrackingLabel):
* 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::defaultSpatialTrackingLabel 
const):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setDefaultSpatialTrackingLabel):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateSpatialTrackingLabel):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.h:
* Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.mm:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::setDefaultSpatialTrackingLabel):
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _fullScreenPlaceholderView]):
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionModelContext::setSpatialTrackingLabel):
(WebKit::PlaybackSessionManagerProxy::setSpatialTrackingLabel):
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSpatialTrackingLabel):
(WebKit::WebPageProxy::spatialTrackingLabel const):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::spatialTrackingLabel const):
* Source/WebKit/UIProcess/ios/WKContentView.h:
* Source/WebKit/UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView spatialTrackingLabel]):
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::defaultSpatialTrackingLabel const):
(WebKit::MediaPlayerPrivateRemote::setDefaultSpatialTrackingLabel):
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setDefaultSpatialTrackingLabel):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.messages.in:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionManager::setSpatialTrackingLabel):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to