判断控制器是否可用

This commit is contained in:
Harvey Zack committed 2018-10-24 17:12:31 +08:00
1 parent cc078f0ebc
commit cc7e489ff6
5 files changed
+35 -20

No files matched your search

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