Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cf7ea924ed644fa09867e08eee263362ff798c91
https://github.com/WebKit/WebKit/commit/cf7ea924ed644fa09867e08eee263362ff798c91
Author: Jean-Yves Avenard <[email protected]>
Date: 2025-11-27 (Thu, 27 Nov 2025)
Changed paths:
A LayoutTests/media/media-source/media-source-ended-expected.txt
A LayoutTests/media/media-source/media-source-ended.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebCore/Modules/mediasource/MediaSource.cpp
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Log Message:
-----------
[MSE] ended event may never be fired
https://bugs.webkit.org/show_bug.cgi?id=303126
rdar://165430052
Reviewed by Youenn Fablet.
We had two issues:
1- If the duration was changed which resulted in an updated buffered range (as
per spec
https://www.w3.org/TR/media-source-2/#htmlmediaelement-extensions-buffered)
we wouldn't have notified the media player that the buffered range got updated.
2- The gap observer used to stop playback at the start of a gap, was only
updated once the buffered changed,
if the currentTime wasn't included in the existing range, we assumed playback
was already stalled and didn't need
to set a time observer. But when we start playback (currentTime == 0), and the
video didn't exactly start at 0
(which is commonly the case with video), we would assume the above, even though
we would skip this start gap.
We now set the time observer to be of the video's duration should the video
not start precisely at zero.
Test: media/media-source/media-source-ended.html
* LayoutTests/media/media-source/media-source-ended-expected.txt: Added.
* LayoutTests/media/media-source/media-source-ended.html: Added.
* LayoutTests/platform/glib/TestExpectations: New test failing on GStreamer
based player webkit.org/b/303130
* LayoutTests/platform/mac-wk1/TestExpectations: WK1 doesn't have support for
MSE webm
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setDurationInternal): Refresh buffered attribute as
needed.
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::bufferedChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
Canonical link: https://commits.webkit.org/303596@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications