如何获取音频文件的持续时间?
function handleFileSelect(evt) {
evt.stopPropagation();
evt.preventDefault();
var files = evt.dataTransfer.files,
dur = files.duration;
document.getElementById('drop_zone-info').innerHTML = 'Duration: ' + dur + ' (h:m:s)';
}
测试:http: //jsfiddle.net/XSavU/1/