添加首次加载事件

This commit is contained in:
Harvey Zack committed 2018-10-24 17:31:10 +08:00
1 parent cc7e489ff6
commit dcedb802ee
6 files changed
+34 -37

No files matched your search

+3 -7
View File
@@ -15,13 +15,9 @@ export default class Controls {
constructor(art) {
this.art = art;
this.$map = {};
this.isVideoCanplay = false;
this.art.on('video:canplay', () => {
if (!this.isVideoCanplay) {
this.isVideoCanplay = true;
this.init();
this.mount();
}
this.art.on('video:firstload', () => {
this.init();
this.mount();
});
}