提交 580d4868 编写于 作者: Q qiang

feat: h5 video 增加 loadedmetadata 事件

上级 c342ba26
......@@ -526,11 +526,17 @@ export default {
onDurationChange ({ target }) {
this.durationTime = target.duration
},
onLoadedMetadata ({ target }) {
onLoadedMetadata ($event) {
const initialTime = Number(this.initialTime) || 0
const video = $event.target
if (initialTime > 0) {
target.currentTime = initialTime
video.currentTime = initialTime
}
this.$trigger('loadedmetadata', $event, {
width: video.videoWidth,
height: video.videoHeight,
duration: video.duration
})
},
onProgress ({ target }) {
const buffered = target.buffered
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册