hi have created function converts hours, minutes , frames per second ->
function tohhmmss(seconds) { var sec_num = parseint(seconds); var hours = math.floor(sec_num / 3600); var parshours = parseint(hours); var minutes = math.floor((sec_num - (hours * 3600)) / 60); var parsmin = parseint(minutes); var seconds = sec_num - (hours * 3600) - (minutes * 60); var parssec = parseint(seconds); if (parshours < 10) { parshours = "0" + parshours; } if (parsmin < 10) { parsmin = "0" + parsmin; } if (parssec < 10) { parssec = "0" + parssec; } // calculation frames var vidframes = document.getelementbyid('video'); timefloat = parseint(vidframes.currenttime * 25).toprecision(4) / 60; if (timefloat > 25) { timefloat = 0; } frametestout = timefloatout - timefloat; frames = frametestout * framerate; var time = parshours + ':' + parsmin + ':' + parssec + ':' + timefloat; return time; } var timefloat; var timefloatout; function getcurtime(e) { var vid = document.getelementbyid('video'); timefloat = parseint(vid.currenttime); var timeintime = document.getelementbyid('timein').innerhtml = tohhmmss(timefloat); } function getouttime(e) { var vid = document.getelementbyid('video'); timefloatout = parseint(vid.currenttime); var timeouttime = document.getelementbyid('timeout').innerhtml = tohhmmss(timefloatout); var framecount = document.getelementbyid('framecount').innerhtml = frames; } $("#btntime").kendobutton({ click: getcurtime }); $("#btntimeout").kendobutton({ click: getouttime });
}
the issue need frames reset after each second. rather continuously incrementing.
any appreciated.
wouldn't trick?
settimeout(function(){ frames = 0; },1000);
Comments
Post a Comment