Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7eb36e38f352976b39cc87c1483937c58129a01d https://github.com/WebKit/WebKit/commit/7eb36e38f352976b39cc87c1483937c58129a01d Author: Jer Noble <jer.no...@apple.com> Date: 2024-05-17 (Fri, 17 May 2024)
Changed paths: A LayoutTests/media/airplay-target-availability-disableremoteplayback-expected.txt A LayoutTests/media/airplay-target-availability-disableremoteplayback.html M LayoutTests/platform/ios/TestExpectations M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h Log Message: ----------- "targetavailabilitychanged" event fired even when media element has disabledRemotePlayback = true https://bugs.webkit.org/show_bug.cgi?id=274220 rdar://128137977 Reviewed by Eric Carlson. The expectation is that `disableRemotePlayback = true` should cause all remote playback events to not fire. Instead, disabling remote playback seems to have no effect on disabling these events, and default media controls remote playback buttons still appear. Add some utility methods to HTMLMediaElement to make it a bit cheaper to check whether remote playback is disabled, and whether remote playback event listeners exist. When changing the state of `disableRemotePlayback`, ensure that an event is fired saying no remote playback targets exist, which cause media controls (including the native ones) to hide the remote playback button. * LayoutTests/media/airplay-target-availability-disableremoteplayback-expected.txt: Added. * LayoutTests/media/airplay-target-availability-disableremoteplayback.html: Added. * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::~HTMLMediaElement): (WebCore::HTMLMediaElement::attributeChanged): (WebCore::HTMLMediaElement::setReadyState): (WebCore::HTMLMediaElement::clearMediaPlayer): (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): (WebCore::HTMLMediaElement::remoteHasAvailabilityCallbacksChanged): (WebCore::HTMLMediaElement::hasTargetAvailabilityListeners): (WebCore::HTMLMediaElement::hasEnabledTargetAvailabilityListeners): (WebCore::HTMLMediaElement::isWirelessPlaybackTargetDisabledChanged): (WebCore::HTMLMediaElement::isWirelessPlaybackTargetDisabled const): (WebCore::HTMLMediaElement::addEventListener): (WebCore::HTMLMediaElement::removeEventListener): * Source/WebCore/html/HTMLMediaElement.h: Canonical link: https://commits.webkit.org/278933@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