Ну, мэ-э, обошёлся без массива. Примерно, так:
progresBar.addEventListener('mousemove', (e) => {
if (video.paused || video.ended) {
progresBar.focus();
var rect = progresBar.getBoundingClientRect(),
posX = e.clientX - rect.left,
perc = posX / rect.width,
time = perc * video.duration;
if (isFinite(time) && !isNaN(time) && time >= 0) {
video.currentTime = time;
}
}
});
Не совсем то, что хотелось-бы.