源:https://blog.csdn.net/w6718189/article/details/87623129
微信小程序文檔:https://developers.weixin.qq.com/miniprogram/dev/component/video.html
微信小程序獲取音頻時長和實時獲取播放進度
通過 bindtimeupdate 可以獲取播放進度變化時觸發
<video bindtimeupdate="timeupdate" id="myVideo" class="video" src="{{ video.filePath }}" controls duration="{{ video.duration }}" title="{{ video.title }}" poster="{{ video.imageUrl }}" autoplay="false" />
timeupdate(res){ console.log('bindtimeupdate', parseInt(res.detail.currentTime), '時間總時長-->', parseInt(res.detail.duration)) },