I made that javascript script
function videoplayer (frameamt) {
var frameamount = frameamt + 1
var frame = 1
var video = document.getElementsByClassName("vidplyr");
while (frame < frameamount) {
var frame = frame + 1
video.src = frame + ".png"
}
if (frame > frameamount) {
video.src = "1.png"
}
}
But I want to make the while loop execute every 50 miliseconds if the condition matches
I want to make a video player that is based in images that represent frames and is 20 fps
meaning that i need to execute every 50 miliseconds to change the image
New contributor
Arthur Yoshikasu Arakaki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.