通过js获取视频/音频时长
const url = window.URL.createObjectURL(file) const audioElement = new Audio(url) audioElement.addEventListener('loadedmetadata', () => { const duration = audioElement.duration })