规范化play方法

This commit is contained in:
Harvey committed 2021-11-24 12:24:01 +08:00
1 parent 11e871ddc8
commit c5c4cf73eb
29 files changed
+81 -623

No files matched your search

+6 -2
View File
@@ -14,7 +14,7 @@ export default function eventInit(art, player) {
const maxReconnectTime = 5;
proxy($video, 'click', () => {
player.toggle = true;
player.toggle();
});
config.events.forEach((eventName) => {
@@ -54,7 +54,11 @@ export default function eventInit(art, player) {
art.on('video:ended', () => {
if (option.loop) {
player.seek = 0;
player.play = player.playing;
if (player.playing) {
player.play();
} else {
player.pause();
}
art.controls.show = false;
art.mask.show = false;
} else {