function handleProgress() {
    const percent = (video.currentTime / video.duration) * 100;
    progressBar.style.flexBasis = `${percent}%`;
    var current = document.getElementById("current");
    var timeDuration = document.getElementById("duration");
    // curr mins spend
    var currmins = Math.floor(video.currentTime / 60);

    // curr secs spend
    var currsecs = Math.floor(video.currentTime - currmins * 60);

    // total mins 
    var durmins = video.currentTime==0?0:Math.floor(video.duration / 60);

    //total secs
    var dursecs = video.currentTime==0?0:Math.floor(video.duration - durmins * 60);

    if (currsecs < 10) {
        currsecs = "0" + currsecs;
    }
    if (dursecs < 10) {
        dursecs = "0" + dursecs;
    }
    if (currmins < 10) {
        currmins = "0" + currmins;
    }
    if (durmins < 10) {
        durmins = "0" + durmins;
    }
    current.innerHTML = currmins + ":" + currsecs + " / ";
    timeDuration.innerHTML = durmins + ":" + dursecs;
}
// handle progress and timer on time update event
handle progress and timer on time update event
handle progress and timer on time update event
function handleProgress() {
    const percent = (video.currentTime / video.duration) * 100;
    progressBar.style.flexBasis = `${percent}%`;
    var current = document.getElementById("current");
    var timeDuration = document.getElementById("duration");
    var currmins = Math.floor(video.currentTime / 60);
    var currsecs = Math.floor(video.currentTime - currmins * 60);
    var durmins = video.currentTime==0?0:Math.floor(video.duration / 60);
    var dursecs = video.currentTime==0?0:Math.floor(video.duration - durmins * 60);
    if (currsecs < 10) {
        currsecs = "0" + currsecs;
    }
    if (dursecs < 10) {
        dursecs = "0" + dursecs;
    }
    if (currmins < 10) {
        currmins = "0" + currmins;
    }
    if (durmins < 10) {
        durmins = "0" + durmins;
    }
    current.innerHTML = currmins + ":" + currsecs + " / ";
    timeDuration.innerHTML = durmins + ":" + dursecs;
}
function handleProgress ( ) { const percent = ( video . currentTime / video . duration ) * 100 ; progressBar . style . flexBasis = ` ${ percent } ` ; var current = document . getElementById ( "current" ) ; var timeDuration = document . getElementById ( "duration" ) ; var currmins = Math . floor ( video . currentTime / 60 ) ; var currsecs = Math . floor ( video . currentTime - currmins * 60 ) ; var durmins = video . currentTime == 0 ? 0 : Math . floor ( video . duration / 60 ) ; var dursecs = video . currentTime == 0 ? 0 : Math . floor ( video . duration - durmins * 60 ) ; if ( currsecs < 10 ) { currsecs = "0" + currsecs ; } if ( dursecs < 10 ) { dursecs = "0" + dursecs ; } if ( currmins < 10 ) { currmins = "0" + currmins ; } if ( durmins < 10 ) { durmins = "0" + durmins ; } current . innerHTML = currmins + ":" + currsecs + " / " ; timeDuration . innerHTML = durmins + ":" + dursecs ; }
handle progress and timer on time update event
handle progress and timer on time update event
// curr mins spend // curr secs spend // total mins  //total secs