From 4e0f73a3de2e9fd6b5f6440123f0a62b87dbcb73 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Fri, 22 Jan 2021 17:05:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E8=B0=83=E6=95=B4=E9=BB=91?= =?UTF-8?q?=E5=B1=8F=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 0111470..6d343f8 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -603,10 +603,12 @@ export default { this.xg.src = channel.url this.xg.play() this.changingIPTV = false - if (!document.getElementById('xgplayer').querySelector('video')) { - this.getPlayer(this.playerType, true) - this.playChannel(channel) - } + setTimeout(() => { + if (!document.getElementById('xgplayer').querySelector('video')) { + this.getPlayer(this.playerType, true) + this.playChannel(channel) + } + }, 1000) if (document.querySelector('xg-btn-showhistory')) document.querySelector('xg-btn-showhistory').style.display = 'none' if (document.querySelector('.xgplayer-playbackrate')) document.querySelector('.xgplayer-playbackrate').style.display = 'none' }, @@ -665,10 +667,12 @@ export default { const key = this.video.key + '@' + this.video.info.id const startTime = VIDEO_DETAIL_CACHE[key].startPosition || 0 this.xg.play() - if (!document.getElementById('xgplayer').querySelector('video')) { - this.getPlayer(this.playerType, true) - this.getUrls() - } + setTimeout(() => { + if (!document.getElementById('xgplayer').querySelector('video')) { + this.getPlayer(this.playerType, true) + this.getUrls() + } + }, 1000) if (document.querySelector('xg-btn-showhistory')) document.querySelector('xg-btn-showhistory').style.display = 'block' if (document.querySelector('.xgplayer-playbackrate')) document.querySelector('.xgplayer-playbackrate').style.display = 'inline-block' this.xg.once('playing', () => {