You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In web-platform-tests/wpt#32832@muan has reported an interop issue between browsers when setting video.currentTime to a value larger than video.duration. I haven't tested and verified today, but I believe Chrome and Firefox clamp it to the duration, while Safari returns back the set value. I'm not sure exactly when Safari clamps and starts returning the clamped value.
Safari matches the current spec as far as I can tell, because the currentTime setter updates the official playback positions and then seeks.
However, it seems like a relatively small change to the spec is possible that would allow browsers to align here.
The seeking algorithm already determines a new playback position synchronously, but it is not observable to script synchronously. We could set the official playback position in this algorithm, and not set it in the currentTime setter.
I have one doubt, which is that per the current spec, an implementation could arrange for currentTime to start returning the new value right before the seeking event is fired, guaranteeing that the change isn't seen before then. If Safari actually does that, then I think my proposal isn't as good.
cc @whatwg/media
The text was updated successfully, but these errors were encountered:
I have also brought this up to @eric-carlson in person at TPAC and got some clarification hence my follow-up comment in WPT. I think what you summarized here is essentially my takeaway. But interop issue remains so thank you @foolip for opening this!
In web-platform-tests/wpt#32832 @muan has reported an interop issue between browsers when setting
video.currentTime
to a value larger thanvideo.duration
. I haven't tested and verified today, but I believe Chrome and Firefox clamp it to the duration, while Safari returns back the set value. I'm not sure exactly when Safari clamps and starts returning the clamped value.Safari matches the current spec as far as I can tell, because the
currentTime
setter updates the official playback positions and then seeks.However, it seems like a relatively small change to the spec is possible that would allow browsers to align here.
The seeking algorithm already determines a new playback position synchronously, but it is not observable to script synchronously. We could set the official playback position in this algorithm, and not set it in the
currentTime
setter.I have one doubt, which is that per the current spec, an implementation could arrange for
currentTime
to start returning the new value right before the seeking event is fired, guaranteeing that the change isn't seen before then. If Safari actually does that, then I think my proposal isn't as good.cc @whatwg/media
The text was updated successfully, but these errors were encountered: