Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 16c6a9971daca74d3b6bdddba6daf8d2c4c57d8c
      
https://github.com/WebKit/WebKit/commit/16c6a9971daca74d3b6bdddba6daf8d2c4c57d8c
  Author: Andy Estes <[email protected]>
  Date:   2026-08-23 (Sun, 23 Aug 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.cpp
    M Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.h

  Log Message:
  -----------
  REGRESSION (319455@main): 
media/wireless-playback-media-player/route-deactivate-pauses-playback.html fails
https://bugs.webkit.org/show_bug.cgi?id=322323
rdar://185565496

Reviewed by Jean-Yves Avenard.

When the active route changes to local, MediaSessionHelper pauses playback. When
MediaPlayerPrivateWirelessPlayback::pause() is called, the playing property on 
the route is set to
false. Later, MediaDeviceRoute receives a KVO notification of this change and 
notifies the MediaPlayer
and its client via rateChanged() and playbackStateChanged(). However, since a 
route change is
occurring, the route may have been cleared from 
MediaPlayerPrivateWirelessPlayback prior to the KVO
notification being received. As a result, the HTMLMediaElement thinks the media 
should still be
playing despite MediaSessionHelper attempting to pause it.

319455@main did not introduce this bug, but it changed the timing of how route 
changes are
propagated to the media player such that it exposed this underlying issue.

Resolved this by dispatching rateChanged() and playbackStateChanged() when
MediaPlayerPrivateWirelessPlayback loses its route, and changing
MediaPlayerPrivateWirelessPlayback::paused() to return true when there is no 
route.

No new tests. Covered by existing tests.

* Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.cpp:
(WebCore::MediaPlayerPrivateWirelessPlayback::setWirelessPlaybackTarget):
(WebCore::MediaPlayerPrivateWirelessPlayback::setShouldPlayToPlaybackTarget):
(WebCore::MediaPlayerPrivateWirelessPlayback::notifyRateAndPlaybackStateChanged):
(WebCore::MediaPlayerPrivateWirelessPlayback::hasRoute const):
(WebCore::MediaPlayerPrivateWirelessPlayback::paused const):
* Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to