Chromium Code Reviews
DescriptionMedia Controls: Fix seek to end when max attr is rounded up
When seeking to the end of an audio/video element, by clicking slightly
past the end of the track, sometimes the scrubber would move but the
current playing time wouldn't be updated.
This happened because https://codereview.chromium.org/614263002
(https://crbug.com/412562) made the scrubber only call
mediaElement().setCurrentTime if the |value| of the underlying
<input type="range"> is contained within the mediaElement().seekable()
TimeRanges.
But the |max| attribute of the <input type="range"> can sometimes be
rounded up slightly, for example a duration of 596.586667 results in a
|max| attribute of 596.587, and so seeking to this |max| value fails to
update currentTime.
This patch updates the seekable() contains check to take this floating
point error into account.
BUG=695065
Review-Url: https://codereview.chromium.org/2707043004
Cr-Commit-Position: refs/heads/master@{#453689}
Committed: https://chromium.googlesource.com/chromium/src/+/6d7ae217f9f1a7772046c5447f73bc8cdff8cbed
Patch Set 1 #
Total comments: 2
Patch Set 2 : Simplify time>duration check #
Messages
Total messages: 10 (4 generated)
|
||||||||||||||||||||||||||||