I'm trying to work out a percentage from 0 - 100 from a part of HTML video
When the HTML video hits 5.89 secs I would like the animation to complete on 10.05 im having troubles doing this so far i have worked out the percentage of the time below
So there is 4.16 inbetween the times stated and it works out to be 1% is 0.041600000000000005
I have added the current time into the function becuase i need to work out what percent the video is on while its playing
var animationOneStart = 5.89;
var animationOneEnd = 10.05;
function perentageTime(animationStart,animationEnd,currentTime){
var timeInbetween = animationEnd - animationStart;
a = 1/100;
b = a*timeInbetween;
return b;
}
I'm having troubles working out the percentage while it playing would anyone be able to help me please?
Thanks