<video id="audioView" playsinline controls></video>
var audio = document.getElementById('audioView')
audio.src = window.URL.createObjectURL(file)
setTimeout(() => {
this.audioTime = audio.duration //获取视频时长
}, 1000)
<video id="audioView" playsinline controls></video>
var audio = document.getElementById('audioView')
audio.src = window.URL.createObjectURL(file)
setTimeout(() => {
this.audioTime = audio.duration //获取视频时长
}, 1000)
本文标题:上传文件并播放视频
本文链接:https://www.haomeiwen.com/subject/zucvqhtx.html
网友评论