添加首次加载事件

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

+6
View File
@@ -6,6 +6,7 @@ export default class Player {
this.art = art;
this.init();
this.eventBind();
this.firstLoad = false;
}
init() {
@@ -46,6 +47,11 @@ export default class Player {
});
this.art.on('video:canplay', () => {
if (!this.firstLoad) {
this.firstLoad = true;
this.art.emit('video:firstload');
}
this.art.controls.show();
this.art.mask.show();
this.art.loading.hide();