NEW 224369
[WebCompat] When seeking to the end of the video, ended attribute value is true
https://bugs.webkit.org/show_bug.cgi?id=224369
Summary [WebCompat] When seeking to the end of the video, ended attribute value is true
Jean-Yves Avenard [:jya]
Reported 2021-04-09 07:33:02 PDT
I can't get a clear perspective on the matter, so opening this bug to get a the issue looked into. STR: video.currentTime = video.duration + 1; testExpected(video.ended, true); // 1 await waitFor(video, 'seeked'); testExpected("video.ended", true); // 2 Now this will pass with WebKit. Both gecko and blink based browsers for the first test will fail. ended attribute is only set to true once the seek operation has completed (the seeked event has been fired) In the spec, in a non-informative section we read: https://html.spec.whatwg.org/multipage/media.html#event-media-ended "ended : Playback has stopped because the end of the media resource was reached | currentTime equals the end of the media resource; ended is true." However, we haven't completed the seek, are we really done yet to say it's ended? Both Chromium based browser and Firefox will return ended == false in step //1 Additional note: readyState once the element is ended is still showing as 4 (HAVE_FUTURE_DATA). I believe this is incorrect as we have reached the end of the content, there's no future data available, we're done. (Firefox will return 2 (HAVE_CURRENT_DATA))
Attachments
Jean-Yves Avenard [:jya]
Comment 1 2021-04-09 08:09:42 PDT
Note that if bug 224363 doesn't go as planned. The value returned for ended is definitely wrong. because here we would see: video.currentTime = video.duration + 1; testExpected(video.ended, true); testExpected(video.currentTime, video.duration +1); when the spec states: https://html.spec.whatwg.org/multipage/media.html#ended-playback "The current playback position is the end of the media resource, and " but here it's not, it's past the end of the media resource.
Radar WebKit Bug Importer
Comment 2 2021-04-16 07:33:14 PDT
Note You need to log in before you can comment on or make changes to this bug.