hilongjw / vue-video

A HTML5 video player component for Vue.js
https://hilongjw.github.io/vue-video
327 stars 94 forks source link

411行progress事件需要加判断 #11

Open zyp199737 opened 7 years ago

zyp199737 commented 7 years ago

this.$video.addEventListener('progress', (e) => { if(this.$video.onprogress){ this.video.loaded = (-1 + (this.$video.buffered.end(0) / this.$video.duration)) * 100 } })

加上this.$video.onprogress判断,否则会报错,因为超出范围了。

hilongjw commented 7 years ago

@zyp199737 欢迎提交 PR