Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 8f86af059bbbe6383dc4a6ee7e37a63e103afa71 https://github.com/WebKit/WebKit/commit/8f86af059bbbe6383dc4a6ee7e37a63e103afa71 Author: Eric Carlson <eric.carl...@apple.com> Date: 2025-04-10 (Thu, 10 Apr 2025)
Changed paths: M Source/WebCore/Headers.cmake M Source/WebCore/Modules/webaudio/AudioContext.cpp M Source/WebCore/Modules/webaudio/AudioContext.h M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/html/MediaElementSession.cpp M Source/WebCore/html/MediaElementSession.h M Source/WebCore/platform/audio/MediaSessionManagerInterface.h M Source/WebCore/platform/audio/PlatformMediaSession.cpp M Source/WebCore/platform/audio/PlatformMediaSession.h A Source/WebCore/platform/audio/PlatformMediaSessionInterface.h M Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp M Source/WebCore/platform/audio/PlatformMediaSessionManager.h M Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h M Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm M Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp M Source/WebCore/platform/audio/glib/MediaSessionGLib.h M Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp M Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.h M Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h M Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm M Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.mm Log Message: ----------- Define a virtual PlatformMediaSession interface and have PlatformMediaSession derive from it https://bugs.webkit.org/show_bug.cgi?id=291374 rdar://148988705 Reviewed by Andy Estes. * Source/WebCore/Headers.cmake * Source/WebCore/Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::selectBestMediaSession): * Source/WebCore/Modules/webaudio/AudioContext.h: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initializeMediaSession): (WebCore::HTMLMediaElement::selectBestMediaSession): (WebCore::HTMLMediaElement::virtualHasPendingActivity const): (WebCore::HTMLMediaElement::displayType const): (WebCore::HTMLMediaElement::protectedLogger const): Deleted. * Source/WebCore/html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::mediaSessionIfExists const): (WebCore::HTMLMediaElement::isTemporarilyAllowingInlinePlaybackAfterFullscreen const): * Source/WebCore/html/MediaElementSession.cpp: (WebCore::MediaElementSession::MediaElementSession): * Source/WebCore/html/MediaElementSession.h: (isType): * Source/WebCore/platform/audio/MediaSessionManagerInterface.h: (WebCore::MediaSessionManagerInterface::sessionDidEndRemoteScrubbing): (WebCore::MediaSessionManagerInterface::clientCharacteristicsChanged): * Source/WebCore/platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::setState): (WebCore::PlatformMediaSession::pauseSession): (WebCore::PlatformMediaSession::stopSession): (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand): (WebCore::PlatformMediaSession::canPlayConcurrently const): (WebCore::PlatformMediaSession::selectBestMediaSession): (WebCore::PlatformMediaSession::create): Deleted. (WebCore::PlatformMediaSession::PlatformMediaSession): Deleted. (WebCore::PlatformMediaSession::mediaType const): Deleted. (WebCore::PlatformMediaSession::presentationType const): Deleted. (WebCore::PlatformMediaSession::canReceiveRemoteControlCommands const): Deleted. (WebCore::PlatformMediaSession::supportsSeeking const): Deleted. (WebCore::PlatformMediaSession::isSuspended const): Deleted. (WebCore::PlatformMediaSession::isPlaying const): Deleted. (WebCore::PlatformMediaSession::isAudible const): Deleted. (WebCore::PlatformMediaSession::isEnded const): Deleted. (WebCore::PlatformMediaSession::duration const): Deleted. (WebCore::PlatformMediaSession::shouldOverrideBackgroundLoadingRestriction const): Deleted. (WebCore::PlatformMediaSession::displayType const): Deleted. (WebCore::PlatformMediaSession::canProduceAudio const): Deleted. (WebCore::PlatformMediaSession::hasMediaStreamSource const): Deleted. (WebCore::PlatformMediaSession::shouldOverridePauseDuringRouteChange const): Deleted. (WebCore::PlatformMediaSession::nowPlayingInfo const): Deleted. (WebCore::PlatformMediaSession::isNowPlayingEligible const): Deleted. (WebCore::PlatformMediaSession::presentingApplicationPID const): Deleted. (WebCore::PlatformMediaSessionClient::mediaSessionDuration const): Deleted. (WebCore::PlatformMediaSessionClient::nowPlayingInfo const): Deleted. * Source/WebCore/platform/audio/PlatformMediaSession.h: (WebCore::PlatformMediaSession::create): (WebCore::PlatformMediaSession::PlatformMediaSession): (WebCore::PlatformMediaSession::state const): Deleted. (WebCore::PlatformMediaSession::stateToRestore const): Deleted. (WebCore::PlatformMediaSession::suspendBuffering): Deleted. (WebCore::PlatformMediaSession::resumeBuffering): Deleted. (WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTarget const): Deleted. (WebCore::PlatformMediaSession::requiresPlaybackTargetRouteMonitoring const): Deleted. (WebCore::PlatformMediaSession::resetPlaybackSessionState): Deleted. (WebCore::PlatformMediaSession::hasPlayedAudiblySinceLastInterruption const): Deleted. (WebCore::PlatformMediaSession::clearHasPlayedAudiblySinceLastInterruption): Deleted. (WebCore::PlatformMediaSession::preparingToPlay const): Deleted. (WebCore::PlatformMediaSession::updateMediaUsageIfChanged): Deleted. (WebCore::PlatformMediaSession::isLongEnoughForMainContent const): Deleted. (WebCore::PlatformMediaSession::mediaSessionIdentifier const): Deleted. (WebCore::PlatformMediaSession::isActiveNowPlayingSession const): Deleted. (WebCore::PlatformMediaSession::audioSessionCategoryChanged): Deleted. (WebCore::PlatformMediaSession::client const): Deleted. (WebCore::PlatformMediaSessionClient::displayType const): Deleted. (WebCore::PlatformMediaSessionClient::resumeAutoplaying): Deleted. (WebCore::PlatformMediaSessionClient::canProduceAudio const): Deleted. (WebCore::PlatformMediaSessionClient::isSuspended const): Deleted. (WebCore::PlatformMediaSessionClient::isPlaying const): Deleted. (WebCore::PlatformMediaSessionClient::isAudible const): Deleted. (WebCore::PlatformMediaSessionClient::isEnded const): Deleted. (WebCore::PlatformMediaSessionClient::shouldOverrideBackgroundLoadingRestriction const): Deleted. (WebCore::PlatformMediaSessionClient::wirelessRoutesAvailableDidChange): Deleted. (WebCore::PlatformMediaSessionClient::setWirelessPlaybackTarget): Deleted. (WebCore::PlatformMediaSessionClient::isPlayingToWirelessPlaybackTarget const): Deleted. (WebCore::PlatformMediaSessionClient::setShouldPlayToPlaybackTarget): Deleted. (WebCore::PlatformMediaSessionClient::playbackTargetPickerWasDismissed): Deleted. (WebCore::PlatformMediaSessionClient::isPlayingOnSecondScreen const): Deleted. (WebCore::PlatformMediaSessionClient::hasMediaStreamSource const): Deleted. (WebCore::PlatformMediaSessionClient::processIsSuspendedChanged): Deleted. (WebCore::PlatformMediaSessionClient::shouldOverridePauseDuringRouteChange const): Deleted. (WebCore::PlatformMediaSessionClient::isNowPlayingEligible const): Deleted. (WebCore::PlatformMediaSessionClient::selectBestMediaSession): Deleted. * Source/WebCore/platform/audio/PlatformMediaSessionInterface.h: (WebCore::PlatformMediaSessionClient::displayType const): (WebCore::PlatformMediaSessionClient::resumeAutoplaying): (WebCore::PlatformMediaSessionClient::canProduceAudio const): (WebCore::PlatformMediaSessionClient::isSuspended const): (WebCore::PlatformMediaSessionClient::isPlaying const): (WebCore::PlatformMediaSessionClient::isAudible const): (WebCore::PlatformMediaSessionClient::isEnded const): (WebCore::PlatformMediaSessionClient::mediaSessionDuration const): (WebCore::PlatformMediaSessionClient::shouldOverrideBackgroundLoadingRestriction const): (WebCore::PlatformMediaSessionClient::wirelessRoutesAvailableDidChange): (WebCore::PlatformMediaSessionClient::setWirelessPlaybackTarget): (WebCore::PlatformMediaSessionClient::isPlayingToWirelessPlaybackTarget const): (WebCore::PlatformMediaSessionClient::setShouldPlayToPlaybackTarget): (WebCore::PlatformMediaSessionClient::playbackTargetPickerWasDismissed): (WebCore::PlatformMediaSessionClient::isPlayingOnSecondScreen const): (WebCore::PlatformMediaSessionClient::hasMediaStreamSource const): (WebCore::PlatformMediaSessionClient::processIsSuspendedChanged): (WebCore::PlatformMediaSessionClient::shouldOverridePauseDuringRouteChange const): (WebCore::PlatformMediaSessionClient::isNowPlayingEligible const): (WebCore::PlatformMediaSessionClient::nowPlayingInfo const): (WebCore::PlatformMediaSessionClient::selectBestMediaSession): (WebCore::PlatformMediaSessionClient::protectedLogger const): (WebCore::PlatformMediaSessionInterface::mediaType const): (WebCore::PlatformMediaSessionInterface::presentationType const): (WebCore::PlatformMediaSessionInterface::suspendBuffering): (WebCore::PlatformMediaSessionInterface::resumeBuffering): (WebCore::PlatformMediaSessionInterface::canReceiveRemoteControlCommands const): (WebCore::PlatformMediaSessionInterface::displayType const): (WebCore::PlatformMediaSessionInterface::supportsSeeking const): (WebCore::PlatformMediaSessionInterface::isSuspended const): (WebCore::PlatformMediaSessionInterface::isPlaying const): (WebCore::PlatformMediaSessionInterface::isAudible const): (WebCore::PlatformMediaSessionInterface::isEnded const): (WebCore::PlatformMediaSessionInterface::duration const): (WebCore::PlatformMediaSessionInterface::shouldOverrideBackgroundLoadingRestriction const): (WebCore::PlatformMediaSessionInterface::isPlayingToWirelessPlaybackTarget const): (WebCore::PlatformMediaSessionInterface::setPlaybackTarget): (WebCore::PlatformMediaSessionInterface::externalOutputDeviceAvailableDidChange): (WebCore::PlatformMediaSessionInterface::setShouldPlayToPlaybackTarget): (WebCore::PlatformMediaSessionInterface::playbackTargetPickerWasDismissed): (WebCore::PlatformMediaSessionInterface::requiresPlaybackTargetRouteMonitoring const): (WebCore::PlatformMediaSessionInterface::canProduceAudio const): (WebCore::PlatformMediaSessionInterface::hasMediaStreamSource const): (WebCore::PlatformMediaSessionInterface::resetPlaybackSessionState): (WebCore::PlatformMediaSessionInterface::hasPlayedAudiblySinceLastInterruption const): (WebCore::PlatformMediaSessionInterface::setHasPlayedAudiblySinceLastInterruption): (WebCore::PlatformMediaSessionInterface::shouldOverridePauseDuringRouteChange const): (WebCore::PlatformMediaSessionInterface::nowPlayingInfo const): (WebCore::PlatformMediaSessionInterface::isNowPlayingEligible const): (WebCore::PlatformMediaSessionInterface::updateMediaUsageIfChanged): (WebCore::PlatformMediaSessionInterface::isLongEnoughForMainContent const): (WebCore::PlatformMediaSessionInterface::mediaSessionIdentifier const): (WebCore::PlatformMediaSessionInterface::presentingApplicationPID const): (WebCore::PlatformMediaSessionInterface::audioSessionCategoryChanged): (WebCore::PlatformMediaSessionInterface::client const): (WebCore::PlatformMediaSessionInterface::protectedLogger const): (WebCore::PlatformMediaSessionInterface::PlatformMediaSessionInterface): * Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::addSession): (WebCore::PlatformMediaSessionManager::removeSession): (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback): (WebCore::PlatformMediaSessionManager::sessionWillEndPlayback): (WebCore::PlatformMediaSessionManager::sessionStateChanged): (WebCore::PlatformMediaSessionManager::setCurrentSession): (WebCore::PlatformMediaSessionManager::currentSession const): (WebCore::PlatformMediaSessionManager::sessionIsPlayingToWirelessPlaybackTargetChanged): (WebCore::PlatformMediaSessionManager::computeSupportsSeeking const): (WebCore::PlatformMediaSessionManager::sessionsMatching const): (WebCore::PlatformMediaSessionManager::firstSessionMatching const): (WebCore::PlatformMediaSessionManager::forEachMatchingSession): (WebCore::PlatformMediaSessionManager::forEachSessionInGroup): (WebCore::PlatformMediaSessionManager::forEachSession): (WebCore::PlatformMediaSessionManager::anyOfSessions const): (WebCore::PlatformMediaSessionManager::bestEligibleSessionForRemoteControls): * Source/WebCore/platform/audio/PlatformMediaSessionManager.h: * Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h: * Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::beginInterruption): (WebCore::MediaSessionManagerCocoa::sessionWillBeginPlayback): (WebCore::MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing): (WebCore::MediaSessionManagerCocoa::addSession): (WebCore::MediaSessionManagerCocoa::removeSession): (WebCore::MediaSessionManagerCocoa::setCurrentSession): (WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback): (WebCore::MediaSessionManagerCocoa::clientCharacteristicsChanged): (WebCore::MediaSessionManagerCocoa::nowPlayingEligibleSession): (WebCore::MediaSessionManagerCocoa::updateActiveNowPlayingSession): (WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): * Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp: (WebCore::MediaSessionGLib::getPlaybackStatusAsGVariant): (WebCore::MediaSessionGLib::playbackStatusChanged): * Source/WebCore/platform/audio/glib/MediaSessionGLib.h: * Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp: (WebCore::MediaSessionManagerGLib::sessionWillBeginPlayback): (WebCore::MediaSessionManagerGLib::sessionDidEndRemoteScrubbing): (WebCore::MediaSessionManagerGLib::addSession): (WebCore::MediaSessionManagerGLib::removeSession): (WebCore::MediaSessionManagerGLib::setCurrentSession): (WebCore::MediaSessionManagerGLib::sessionWillEndPlayback): (WebCore::MediaSessionManagerGLib::sessionStateChanged): (WebCore::MediaSessionManagerGLib::clientCharacteristicsChanged): (WebCore::MediaSessionManagerGLib::setPrimarySessionIfNeeded): (WebCore::MediaSessionManagerGLib::unregisterAllOtherSessions): * Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.h: * Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h: * Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm: (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): (WebCore::MediaSessionManageriOS::sessionWillEndPlayback): (WebCore::MediaSessionManageriOS::activeVideoRouteDidChange): * Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.mm: (WebCore::VideoPresentationModelVideoElement::videoInteractedWith): Canonical link: https://commits.webkit.org/293547@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes