REQUEST_RANGE_NOT_SATISFIABLE When setting currentTime in video

So I made some code that if it gets to 4 seconds in the video it sets the currentTime to 2 so that it loops the two seconds. This works fine on multiple web browsers, but doesnt in fivem. i noticed it takes longer to fully load the video so i tried setting a timeout of a minute which gave enough time to download it fully but still got errors. I have also tried event listeners (canplaythough, network state idle, playing, etc.) but still get the same errors.
No idea what I’m doing wrong and been driving me nuts so if anyone has any ideas i would greatly appreciate it. :smiley:
heres the code:

    setTimeout(function() {
        console.log("hi");
        video.play();
        setInterval(function() {
            if(video.networkState == 1){
                tempBoost = (boostRate.value) < 0 ? boost.value * -1 : boost.value;
                boostData = searchFrames(tempBoost)
                if (video.currentTime >= (boostData.end)) {
                    if (boostRate.value == 0){
                        if (boost.value == 0){
                            video.pause();
                        }
                        else{
                            video.currentTime = 2;
                            video.play();
                        }
                    }
                }
            }  
            }, 100)
    }, 60000);
});

And this is the log:

Solution ?