Video Player: rework frame renderer
Opened this issue · 0 comments
Currently we're using setIntervall
at a set intervall of a couple ms.
This is bad, because it doesn't fit for all videos we have and is currently not variable between frames.
I suggest refactoring it to replace our use of setIntervall
.
Thus we would continously have a loop checking where it would have to be in the video and then update the frame, if the one that is currentlly displayed isn't the correct one. That way, if a certain system isn't fast enough (or is too fast) videos will be the same across the board.
Alternatively we could have a loop itterate through and do this proactively with setTimeout
. https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
My guess is that the second implementation might be easier.
Or maybe there is a better or more elegant way of doing this? I'm not sure.