| Summary: | REGRESSION(267279@main): [ macOS wk2 ] imported/w3c/web-platform-tests/media-source/mediasource-play-then-seek-back.html is a consistent text failure. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ben Schwartz <ben_schwartz> |
| Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | jean-yves.avenard, webkit-bot-watchers-bugzilla, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=260742 https://bugs.webkit.org/show_bug.cgi?id=260185 https://bugs.webkit.org/show_bug.cgi?id=260867 |
||
|
Description
Ben Schwartz
2023-08-28 16:49:40 PDT
Test gardening commit 267375@main (cae1cdb5b828): <https://commits.webkit.org/267375@main> Reviewed commits have been landed. Closing PR #17157 and removing active labels. The issue occurs because the web content process always assumes a seek is completed once the GPU process sends a `timeChanged` call. But a `timeChanged` call doesn't always happen following a seek operation. consider the following: MediaPlayer (WP) start playback and immediately starts seeking. The GPU process upon starting playback will call back `timeChanged` as soon as the time progresses. The MediaPlayer (WP) now assumes that seeking has completed and fire the seeked event. The WPT tests waits for the `seeking` event to be fired to set a `seeked` event listener, and it does so by calling setTimeout(0). So the `seeked` is listener is only set at the next event loop. By the time, in the above scenario) the seeked event has already been fired. And so the test timeout waiting for another `seeked` event that will never come. So we have two issues at hand: - We fire the `seeked` event too early, before the seek operation has completed when we do: video.play() video.currentTime = 0; - The WPT test shouldn't wait for another event loop to set an event listener. The latter is done everywhere, and appears incorrect in this case. The spec indicates that within the `seeking` event being fired and the `seeked` event, we are only to await a stable state. https://html.spec.whatwg.org/#seeking A stable state occurs through a micro task, it isn't dependent on a new event loop. So the firing for `seeking` and `seeked` could be all done within the same event loop. If so, the test here will timeout. Pull request: https://github.com/WebKit/WebKit/pull/17480 Committed 267723@main (939ec6849c62): <https://commits.webkit.org/267723@main> Reviewed commits have been landed. Closing PR #17480 and removing active labels. |