Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0f366de9b96d578965afac64a8db342121b91f0f
https://github.com/WebKit/WebKit/commit/0f366de9b96d578965afac64a8db342121b91f0f
Author: Jean-Yves Avenard <[email protected]>
Date: 2026-07-05 (Sun, 05 Jul 2026)
Changed paths:
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/platform/LogMessages.in
M Source/WebCore/platform/graphics/MediaPlayer.cpp
M Source/WebCore/platform/graphics/MediaPlayer.h
M Source/WebCore/platform/graphics/MediaPlayerPrivate.h
M Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.cpp
M Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.h
M Source/WebCore/platform/graphics/avfoundation/AudioVideoRendererAVFObjC.mm
M
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
M
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h
M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h
M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
M
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
M
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h
M Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h
M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h
M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp
M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in
M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in
Log Message:
-----------
imported/w3c/web-platform-tests/media-source/mediasource-seek-beyond-duration.html
is a permanent failure
https://bugs.webkit.org/show_bug.cgi?id=303468
rdar://165752722
Reviewed by Jer Noble and Philippe Normand.
The completion of a seek was assumed to occur once the MediaPlayerPrivate
issued a timeChanged(). There was no specific tracking of a seek operation
and we couldn't distinguish whichever came first: a seek completing or
playback reaching the end.
This lead to the `seeked` event often being fired after the `ended` event
when we seeked to the end or after the end of the video contrary to the spec.
We now track each MediaPlayer's seeking operation by having
MediaPlayer::seekToTarget returns a NativePromise.
The logic to issue the `seeked` event is now made to occur when this seeking
promise is resolved.
Note that the MediaPlayerPrivateAVFoundation isn't in full spec compliance
https://html.spec.whatwg.org/multipage/media.html#seeking
step 12. Wait until the user agent has established whether or not the media
data for the new playback position is available, and, if it is, until it has
decoded enough data to play back that position.
which would change the readyState accordingly
firing the seeked event being the last step:
step 17. Queue a media element task given the media element to fire an event
named seeked at the element.
step 12 isn't happening, and the readyState doesn't change. This will be
handled in a future change and is tracked in webkit.org/b/303528
Fly-By: When the AVSampleBufferRenderSynchronizer started with a negative audio
we used to
release the startup gate immediately. As the time was negative the currentTime
and effective rate were
set at 0. The prevented the time from ever progressing until another operation
was performed.
We now only release the startup gate when it has moved from 0 or the last seek
time.
Re-enabling test, covered by existing tests.
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::seekTask):
(WebCore::HTMLMediaElement::finishSeek):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::mediaPlayerSeeked): Deleted.
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/platform/LogMessages.in:
* Source/WebCore/platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::seekToTarget):
(WebCore::MediaPlayer::seeked): Deleted.
(WebCore::MediaPlayer::seeking const): Deleted.
* Source/WebCore/platform/graphics/MediaPlayer.h:
* Source/WebCore/platform/graphics/MediaPlayerPrivate.h:
* Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.cpp:
(WebCore::MediaPlayerPrivateWirelessPlayback::seekToTarget):
(WebCore::MediaPlayerPrivateWirelessPlayback::playbackPositionDidChange):
* Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.h:
* Source/WebCore/platform/graphics/avfoundation/AudioVideoRendererAVFObjC.mm:
(WebCore::AudioVideoRendererAVFObjC::handleEffectiveRateChanged):
*
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seekToTarget):
(WebCore::MediaPlayerPrivateAVFoundation::seekInternal):
(WebCore::MediaPlayerPrivateAVFoundation::setReadyState):
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
(WebCore::MediaPlayerPrivateAVFoundation::resolveSeekPromiseIfNeeded):
*
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekToTarget):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::completeSeek):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking const):
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h:
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::MediaPlayerPrivateWebM::seekToTarget):
(WebCore::MediaPlayerPrivateWebM::completeSeek):
(WebCore::MediaPlayerPrivateWebM::didProvideMediaDataForTrackId):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::seekToTarget):
(WebCore::MediaPlayerPrivateGStreamer::prepareSeek):
(WebCore::MediaPlayerPrivateGStreamer::timeChanged):
(WebCore::MediaPlayerPrivateGStreamer::finishSeek):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
*
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::seekToTarget):
(WebCore::MediaPlayerPrivateGStreamerMSE::propagateReadyStateToPlayer):
(WebCore::MediaPlayerPrivateGStreamerMSE::didPreroll):
*
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
* Source/WebCore/platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h:
* Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::seekToTarget):
(WebCore::MediaPlayerPrivateMediaFoundation::onSessionStarted):
(WebCore::MediaPlayerPrivateMediaFoundation::seeking const): Deleted.
* Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
* Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::seekToTarget):
(WebCore::MockMediaPlayerMediaSource::seeking const): Deleted.
* Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::timeUpdateData):
(WebKit::RemoteMediaPlayerProxy::seekToTarget):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerSeeked): Deleted.
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::seekToTarget):
(WebKit::MediaPlayerPrivateRemote::seeked): Deleted.
(WebKit::MediaPlayerPrivateRemote::seeking const): Deleted.
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in:
Canonical link: https://commits.webkit.org/316528@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications