分离工具函数

This commit is contained in:
Harvey committed 2019-11-14 11:24:02 +08:00
1 parent 7a84c262da
commit 8ef582f714
22 files changed
+724 -687

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
import config from '../config';
import { sleep } from '../utils';
import { sleep, addClass } from '../utils';
export default function eventInit(art, player) {
const {
@@ -69,7 +69,7 @@ export default function eventInit(art, player) {
} else {
art.loading.show = false;
art.controls.show = false;
$player.classList.add('artplayer-error');
addClass($player, 'artplayer-error');
sleep(1000).then(() => {
notice.show(i18n.get('Video load failed'), false);
art.destroy();