Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d960e0221dda2a1db726c47230cbbdbcd3031be2
https://github.com/WebKit/WebKit/commit/d960e0221dda2a1db726c47230cbbdbcd3031be2
Author: Andy Estes <[email protected]>
Date: 2026-08-21 (Fri, 21 Aug 2026)
Changed paths:
A
LayoutTests/media/wireless-playback-media-player/ready-state-requires-seekable-range-expected.txt
A
LayoutTests/media/wireless-playback-media-player/ready-state-requires-seekable-range.html
M Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.cpp
M Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.h
M Source/WebCore/testing/cocoa/WebMockMediaDeviceRoute.mm
Log Message:
-----------
[iOS] Current time stops updating on youtube.com after switching playback to
an AVSystemRoute
https://bugs.webkit.org/show_bug.cgi?id=322256
rdar://184547900
Reviewed by Eric Carlson.
After switching to a MediaDeviceRoute,
WebKit issues a seek to the current playback position.
MediaPlayerPrivateWirelessPlayback::readyDidChange advanced the ready state to
HaveEnoughData as
soon as the route reported itself ready, without regard for whether the route
had yet published a
seekable time range. HTMLMediaElement::seekTask treats an empty seekable range
as "no seek required"
and returns early; since the target time differs from the current time, it does
so without firing
seeking, seeked, or timeupdate, so a page waiting on seeked stalls indefinitely.
Resolved this by gating the transition to HaveEnoughData on the route having
published a non-empty
seekable range in addition to being ready, and re-evaluate that condition from
both readyDidChange
and timeRangeDidChange so whichever arrives second completes the transition.
WebMockMediaDeviceRoute previously left timeRange default-initialized. Gave it
a valid default so
that existing tests which set `route.ready = true` without specifying a time
range
continue to
become playable.
Test:
media/wireless-playback-media-player/ready-state-requires-seekable-range.html
*
LayoutTests/media/wireless-playback-media-player/ready-state-requires-seekable-range-expected.txt:
Added.
*
LayoutTests/media/wireless-playback-media-player/ready-state-requires-seekable-range.html:
Added.
* Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.cpp:
(WebCore::MediaPlayerPrivateWirelessPlayback::updateReadyState):
(WebCore::MediaPlayerPrivateWirelessPlayback::timeRangeDidChange):
(WebCore::MediaPlayerPrivateWirelessPlayback::readyDidChange):
* Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.h:
* Source/WebCore/testing/cocoa/WebMockMediaDeviceRoute.mm:
(-[WebMockMediaDeviceRoute init]):
Canonical link:
https://flagged.apple.com:443/proxy?t2=Du9S6C0hC8&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE5NjEwQG1haW4=&emid=7dc76587-56ee-4c5c-b1b5-a0c8dbc62871&c=11
To unsubscribe from these emails, change your
notification settings at https://github.com/WebKit/WebKit/settings/notifications