mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 21:31:20 -08:00
优化生命周期
This commit is contained in:
1 parent
637a0ec98f
commit
1939f33703
4 files changed
+4405
-11
No files matched your search
@@ -29,12 +29,12 @@ export default function eventInit(art, player) {
|
||||
|
||||
art.on('video:canplay', () => {
|
||||
reconnectTime = 0;
|
||||
art.controls.show = true;
|
||||
art.mask.show = true;
|
||||
art.loading.show = false;
|
||||
});
|
||||
|
||||
art.once('video:canplay', () => {
|
||||
art.controls.show = true;
|
||||
art.mask.show = true;
|
||||
art.emit('ready');
|
||||
});
|
||||
|
||||
@@ -54,6 +54,8 @@ export default function eventInit(art, player) {
|
||||
if (option.loop) {
|
||||
player.seek = 0;
|
||||
player.play = true;
|
||||
art.controls.show = false;
|
||||
art.mask.show = false;
|
||||
} else {
|
||||
art.controls.show = true;
|
||||
art.mask.show = true;
|
||||
|
||||
Reference in new issue
Block a user