mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 12:41:20 -08:00
分离工具函数
This commit is contained in:
1 parent
7a84c262da
commit
8ef582f714
22 files changed
+724
-687
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user