[Webkit-unassigned] [Bug 280069] New: [WebVTT][GStreamer] WPT webvtt/api/VTTRegion/non-visible-cue-with-region.html isn't actually passing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 20 09:15:51 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=280069

            Bug ID: 280069
           Summary: [WebVTT][GStreamer] WPT
                    webvtt/api/VTTRegion/non-visible-cue-with-region.html
                    isn't actually passing
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: eocanha at igalia.com

Test LayoutTests/imported/w3c/web-platform-tests/webvtt/api/VTTRegion/non-visible-cue-with-region.html is currently passing, but just by sheer luck.

The test performs an initial seek to 0.8s on a live video, and our current MediaPlayerPrivateGStreamer implementation ignores that kind of seeks[1]. The result is that the webpage and the HTMLMediaElement still thinks that it's seeking, but no seek has happened at all. currentTime is always 0.8s, as if a seek was in place. In the end, playback starts internally (from the begining instead of from 0.8s) and eventually reaches the end of the video (6s) on its own. At that moment, a defined video duration is set (it was infinity before), timeChanged() is called, and that notifies HTMLMediaElement about having traversed the cue end time (so oncueexit is triggered) and having reached the end (so onend is triggered).

This is an excerpt of the backtrace of the call that generates oncueexit:

 WebCore::HTMLMediaElement::updateActiveTextTrackCues(WTF::MediaTime const&)
 WebCore::HTMLMediaElement::setReadyState(WebCore::MediaPlayerReadyState)
 WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged()
 WebCore::MediaPlayer::readyStateChanged()
 WebCore::MediaPlayerPrivateGStreamer::updateStates()
 WebCore::MediaPlayerPrivateGStreamer::timeChanged(WTF::MediaTime const&)
 WebCore::MediaPlayerPrivateGStreamer::didEnd()
 WebCore::MediaPlayerPrivateGStreamer::handleMessage(_GstMessage*)

And this is an excerpt of the backtrace of the call that generates onend:

 WebCore::HTMLMediaElement::mediaPlayerTimeChanged()
 WebCore::MediaPlayerPrivateGStreamer::timeChanged(WTF::MediaTime const&)
 WebCore::MediaPlayerPrivateGStreamer::didEnd()
 WebCore::MediaPlayerPrivateGStreamer::handleMessage(_GstMessage*)

In the current implementation, a lucky management of the ReadyState causes oncueexit to happen before onend, making the test pass, but it's just luck. Bug https://bugs.webkit.org/show_bug.cgi?id=275683 / PR https://github.com/WebKit/WebKit/pull/29998 intend to change the buffering implementation, and this test is the only regression remaining to have the patch ready.

My point is that it shouldn't actually be considered a regression, since the test was actually passing by chance. I'm creating this bug to track the debugging of this bug and the proper implementation of seek on live streams (if that's ever possible) in the future. Low priority by now, I guess.

[1] https://github.com/WebKit/WebKit/blob/4f4db5aea9b8871ed9daff946b54bf200c84e193/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp#L579

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240920/64f0a4ba/attachment.htm>


More information about the webkit-unassigned mailing list