1
0
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:
Ahmed Saber 2023-08-11 16:04:06 +03:00
parent 4610a2f520
commit 9d71e8abab

View File

@ -29,10 +29,8 @@ export function bufferedPercent(buffered, duration) {
for (let i = 0; i < buffered.length; i++) {
const start = buffered.start(i);
const end = buffered.end(i);
// 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;
}