源: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))
},