mirror of
https://github.com/videojs/video.js.git
synced 2024-12-21 01:39:04 +02:00
Fix issue related to reassigning value to constant
This commit is contained in:
parent
4610a2f520
commit
9d71e8abab
@ -29,10 +29,8 @@ export function bufferedPercent(buffered, duration) {
|
|||||||
|
|
||||||
for (let i = 0; i < buffered.length; i++) {
|
for (let i = 0; i < buffered.length; i++) {
|
||||||
const start = buffered.start(i);
|
const start = buffered.start(i);
|
||||||
const end = buffered.end(i);
|
|
||||||
|
|
||||||
// buffered end can be bigger than duration by a very small fraction
|
// buffered end can be bigger than duration by a very small fraction
|
||||||
end = Math.min(end, duration);
|
const end = Math.min(buffered.end(i), duration);
|
||||||
|
|
||||||
bufferedDuration += end - start;
|
bufferedDuration += end - start;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user