<script>
let mySong = new
Audio("_Dard_Dilo_Ke_Full_Song_(Audio)__Himesh_Reshammiya,_Yo_Yo_Honey_Singh(128k).m4a");
console.log((mySong.duration)/60);
</script>
This song is of 4.24 minutes but when i console log the the same song's duration is shows 4.40 minutes . How to deal with this
Not sure why you are dividing it by 60 (you want to convert it to minutes). There is no need to. You simply can get the duration by this
`var obj = document.createElement('video');
console.log(obj.duration); `
Or if you want to update the time:
duration = parseInt( audio.duration ),
currentTime = parseInt( audio.currentTime ),
timeLeft = duration - currentTime,
You can convert it to minutes and second like this one:
second = timeLeft % 60;
mintues = Math.floor( timeLeft / 60 ) % 60;