var myVid = $('#' + showImgId)[0]; if (myVid != null) { var duration; myVid.load(); myVid.oncanplay = function () { console.log("myVid.duration", myVid.duration); } }
var time = _audio.duration; //分钟 var minute = time / 60; var minutes = parseInt(minute); if (minutes < 10) { minutes = "0" + minutes; } //秒 var second = time % 60; var seconds = Math.round(second); if (seconds < 10) { seconds = "0" + seconds; }