Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7ec7b4de596e9bd0b42dba0732a47ce7e306afd7
https://github.com/WebKit/WebKit/commit/7ec7b4de596e9bd0b42dba0732a47ce7e306afd7
Author: Ryan Fuller <[email protected]>
Date: 2025-04-04 (Fri, 04 Apr 2025)
Changed paths:
M Source/WebCore/html/HTMLVideoElement.cpp
M Source/WebCore/html/HTMLVideoElement.h
M Source/WebCore/platform/cocoa/PlaybackSessionModel.h
M Source/WebCore/platform/cocoa/VideoPresentationModel.h
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
M Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.h
M Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm
M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm
M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h
M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h
M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.messages.in
M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm
Log Message:
-----------
[visionOS] Notify the media player when entering & exiting external playback
in LinearMediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=291029
rdar://148287113
Reviewed by Jean-Yves Avenard.
External playback mechanism in LinearMediaPlayer used to rely on setting the
videoReceiverEndpoint to NULL to trigger the media player to switch back to
layer based rendering.
Since 42991@main, we no longer get this behavior for free. Instead we need to
notify the media player when we enter/exit external playback similar to
fullscreen/PiP.
One particularly important point for the flow to work is that we must notify
WebGPU that inFullscreenOrPip changed ONLY after the video target changed.
For exiting external playback, this is trivial because LinearMediaPlayer is
setting the videoReceiverEndpoint to NULL directly.
For entering external playback, the video target is not set UNTIL LMK calls
back with setVideoReceiverEndpoint, which happens asynchronously after LMK is
configured for external playback. Thus VideoPresentationInterfaceLMK now waits
for a message that the video receiver endpoint was set before notifying the
media player that fullscreen/PiP state changed.
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::didEnterExternalPlayback):
(WebCore::HTMLVideoElement::didExitExternalPlayback):
* Source/WebCore/html/HTMLVideoElement.h:
* Source/WebCore/platform/cocoa/VideoPresentationModel.h:
(WebCore::VideoPresentationModel::didEnterExternalPlayback):
(WebCore::VideoPresentationModel::didExitExternalPlayback):
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm:
(WebKit::VideoPresentationInterfaceLMK::enterExternalPlayback):
(WebKit::VideoPresentationInterfaceLMK::exitExternalPlayback):
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationModelContext::didEnterExternalPlayback):
(WebKit::VideoPresentationModelContext::didExitExternalPlayback):
(WebKit::VideoPresentationManagerProxy::didEnterExternalPlayback):
(WebKit::VideoPresentationManagerProxy::didExitExternalPlayback):
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h:
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.messages.in:
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm:
(WebKit::VideoPresentationManager::didEnterExternalPlayback):
(WebKit::VideoPresentationManager::didExitExternalPlayback):
Canonical link: https://commits.webkit.org/293272@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