[webkit-changes] [WebKit/WebKit] fecabc: [Cocoa] Implement LinearMediaKit versions of Playb...

aestes noreply at github.com
Thu Feb 15 10:30:03 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fecabc2385988b2c0e4ba5397bf8d6c3f9e5721a
      https://github.com/WebKit/WebKit/commit/fecabc2385988b2c0e4ba5397bf8d6c3f9e5721a
  Author: Andy Estes <aestes at apple.com>
  Date:   2024-02-15 (Thu, 15 Feb 2024)

  Changed paths:
    M Source/WTF/wtf/PlatformEnable.h
    M Source/WebCore/DerivedSources-input.xcfilelist
    M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
    A Source/WebCore/PAL/pal/spi/vision/LinearMediaKitSPI.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/PlatformPlaybackSessionInterface.h
    M Source/WebCore/platform/graphics/PlatformVideoPresentationInterface.h
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.h
    M Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.mm
    M Source/WebCore/platform/ios/VideoPresentationInterfaceAVKit.h
    M Source/WebCore/platform/ios/VideoPresentationInterfaceAVKit.mm
    M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.h
    M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm
    M Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
    M Source/WebKit/DerivedSources-input.xcfilelist
    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.mm
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/Cocoa/WebKitSwiftSoftLink.h
    M Source/WebKit/UIProcess/Cocoa/WebKitSwiftSoftLink.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaPlayer.swift
    M Source/WebKit/WebKitSwift/LinearMediaKit/WKSLinearMediaPlayer.h
    M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h
    M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.messages.in
    M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm

  Log Message:
  -----------
  [Cocoa] Implement LinearMediaKit versions of PlaybackSessionInterface and VideoPresentationInterface
https://bugs.webkit.org/show_bug.cgi?id=269442
rdar://problem/122995773

Reviewed by Jer Noble.

Provided implementations of PlaybackSessionInterfaceLMK and VideoPresentationInterfaceLMK backed by
LMPlayableViewController and WKSLinearMediaPlayer.

* Source/WebCore/platform/cocoa/PlaybackSessionModel.h:
* Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.h:
* Source/WebCore/platform/cocoa/PlaybackSessionModelMediaElement.mm:
* Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.messages.in:
* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm:
Implemented toggleFullscreen by setting the media element's presentation mode.

* Source/WebCore/platform/graphics/PlatformPlaybackSessionInterface.h:
* Source/WebCore/platform/graphics/PlatformVideoPresentationInterface.h:
Defined PlatformPlaybackSessionInterface to PlaybackSessionInterfaceIOS and
PlatformVideoPresentationInterface to VideoPresentationInterfaceIOS on platforms with
ENABLE(LINEAR_MEDIA_PLAYER). Using abstract base classes allow us to vary the implementation based
on the setting of the LinearMediaPlayer runtime preference.

* Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h:
* Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.h:
* Source/WebCore/platform/ios/PlaybackSessionInterfaceIOS.mm:
Added a virtual linearMediaPlayer() and moved m_playerIdentifier from VideoPresentationInterfaceIOS.

* Source/WebCore/platform/ios/VideoPresentationInterfaceAVKit.h:
* Source/WebCore/platform/ios/VideoPresentationInterfaceAVKit.mm:
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.h:
* Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm:
Added a virtual isExternalPlaybackActive() and moved m_playerIdentifier to PlaybackSessionInterfaceIOS.

* Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.h:
* Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.mm:
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.h:
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm:
Implemented in terms of WKSLinearMediaPlayer.

* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
Created either VideoPresentationInterfaceLMK or VideoPresentationInterfaceAVKit based on the value
of the LinearMediaPlayer runtime preference.

* Source/WebKit/UIProcess/Cocoa/WebKitSwiftSoftLink.mm:
Soft-linked WKSLinearMediaPlayer and WKSLinearMediaTimeRange.

* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaPlayer.swift:
Worked around known issues in Playable.

* Source/WebKit/WebKitSwift/LinearMediaKit/WKSLinearMediaPlayer.h:
Used scalars instead of NSValues where possible. Declared -makeViewController.

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




More information about the webkit-changes mailing list