Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 11396d078d47140ce14252adfadf5a19e777305c
https://github.com/WebKit/WebKit/commit/11396d078d47140ce14252adfadf5a19e777305c
Author: Jean-Yves Avenard <[email protected]>
Date: 2024-09-04 (Wed, 04 Sep 2024)
Changed paths:
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/HTMLMediaElement.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/ios/VideoPresentationInterfaceIOS.h
M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm
M Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.h
M Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.mm
M Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.h
M Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm
M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h
M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in
M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm
M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h
M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.messages.in
M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm
M Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaPlayer.swift
M Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaTypes.swift
M Source/WebKit/WebKitSwift/LinearMediaKit/WKSLinearMediaPlayer.h
M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h
M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm
M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm
Log Message:
-----------
[visionOS] add support for MV-HEVC spatial video playback
https://bugs.webkit.org/show_bug.cgi?id=278827
rdar://134896614
Reviewed by Jer Noble.
Following 282641@main, to support entering spatial mode in element fullscreen
we needed the UI process to determine if the video contained spatial metadata
prior entering fullscreen.
As such, we stop passing the metadata to the VideoPresentationManager when
entering
fullscreen, and instead synchronise the information through the
PlaybackSessionInterface
similar to how we synchronise other media's related data (such as the duration).
When entering spatial mode from element fullscreen, we will go straight to
immersive mode
while when entered from native video fullscreen we will enter "portal" mode
instead.
As there is no infrastructure in place for the video to determine if when
it entered native fullscreen it came from element fullscreen, we use the
same mechanism that sets the "docking" menu on the current view and assume
that if the button is displayed, we were in element fullscreen first.
Manually tested.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::spatialVideoMetadata const): Deleted.
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/platform/cocoa/PlaybackSessionModel.h:
(WebCore::PlaybackSessionModelClient::spatialVideoMetadataChanged):
* Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.h:
* Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm:
(WebCore::PlaybackSessionModelMediaElement::updateMediaSelectionOptions):
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.h:
(WebCore::VideoPresentationInterfaceIOS::setSpatialImmersive):
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm:
(WebCore::VideoPresentationInterfaceIOS::setSpatialVideoMetadata): Deleted.
* Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.h:
* Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.mm:
(WebKit::PlaybackSessionInterfaceLMK::spatialVideoMetadataChanged):
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.h:
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm:
(WebKit::VideoPresentationInterfaceLMK::setSpatialImmersive):
(WebKit::VideoPresentationInterfaceLMK::setSpatialVideoMetadata): Deleted.
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in:
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionModelContext::spatialVideoMetadataChanged):
(WebKit::PlaybackSessionManagerProxy::spatialVideoMetadataChanged):
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.messages.in:
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationManagerProxy::setupFullscreenWithID):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(-[WKFullScreenViewController invalidate]):
(-[WKFullScreenViewController videoControlsManagerDidChange]): Add convenience
method to retrieve the attached PlaybackSessionInterface and use it wherever
needed.
(-[WKFullScreenViewController configureEnvironmentPickerButtonView]):
(-[WKFullScreenViewController _didCleanupFullscreen]):
(-[WKFullScreenViewController _playbackSessionInterface]):
(-[WKFullScreenViewController _togglePiPAction:]):
* Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaPlayer.swift:
(SwiftOnlyData.spatialVideoMetadata):
(SwiftOnlyData.videoReceiverEndpointObserver):
(WKSLinearMediaPlayer.spatialVideoMetadata):
(WKSLinearMediaPlayer.enterFullscreen(_:(any Error)?) -> Void:)):
(WKSLinearMediaPlayer.maybeCreateSpatialEntity):
(WKSLinearMediaPlayer.maybeClearSpatialEntity):
(WKSLinearMediaPlayer.didCompleteExitFullscreen(_:any:)):
(WKSLinearMediaPlayer.makeDefaultEntity):
* Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaTypes.swift:
(WKSLinearMediaSpatialVideoMetadata.metadata):
* Source/WebKit/WebKitSwift/LinearMediaKit/WKSLinearMediaPlayer.h:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionInterfaceContext::spatialVideoMetadataChanged):
(WebKit::PlaybackSessionManager::spatialVideoMetadataChanged):
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm:
(WebKit::VideoPresentationManager::enterVideoFullscreenForVideoElement):
Canonical link: https://commits.webkit.org/283183@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