mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 11:21:20 -08:00
添加首次加载事件
This commit is contained in:
1 parent
cc7e489ff6
commit
dcedb802ee
6 files changed
+34
-37
No files matched your search
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user