| Summary: | When seeking past the duration, currentTime will return the unadjusted seek time. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||||||
| Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||||||
| Status: | RESOLVED INVALID | ||||||||||
| Severity: | Normal | CC: | calvaris, cdumez, changseok, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, philipj, sergio, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| URL: | https://jyavenard.github.io/htmltests/tests/seekPastDuration.html | ||||||||||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=134116 https://bugs.webkit.org/show_bug.cgi?id=224369 |
||||||||||
| Attachments: |
|
||||||||||
|
Description
Jean-Yves Avenard [:jya]
2021-04-09 02:12:26 PDT
To add, both Firefox and Chromium based browsers will do as expected. Created attachment 425617 [details]
Patch
Created attachment 425716 [details]
Patch
Created attachment 425717 [details]
Patch
Ok. Upon more considerations, Safari's behaviour is correct. When setting the currentTime attribute, we can read: ``` The currentTime attribute must, on getting, return the media element’s default playback start position, unless that is zero, in which case it must return the element’s official playback position. The returned value must be expressed in seconds. On setting, if the media element’s readyState is HAVE_NOTHING, then it must set the media element’s default playback start position to the new value; otherwise, it must set the official playback position to the new value and then seek to the new value. The new value must be interpreted as being in seconds. ``` [1] But during seeking, step 11: ``` Set the current playback position to the new playback position.``` [2] So it's the current playback position that can be set asynchronously (or as in the new language: "in parallel") the official playback position is to be set: ``` Any time the user agent provides a stable state, the official playback position must be set to the current playback position. ``` So step 11 must not immediately change the official playback position. [1] https://html.spec.whatwg.org/multipage/media.html#dom-media-currenttime [2] https://html.spec.whatwg.org/multipage/media.html#seeking I opened https://github.com/web-platform-tests/wpt/issues/28437 against the web-platform-test that checked this behaviour. |