From 088cd70e41fd96e3559e0a4691008167f6595f26 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Thu, 21 Jan 2021 15:47:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dplay-request-was-interrupted?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index e1f90de..659f3e4 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -534,9 +534,6 @@ export default { clearInterval(this.timer) this.timer = null } - if (this.xg && this.xg.hasStart) { - this.xg.pause() - } if (this.video.iptv) { // 是直播源,直接播放 @@ -598,7 +595,6 @@ export default { this.getPlayer(extRE[1]) if (extRE[1] === 'flv') this.xg.config.isLive = true this.xg.src = channel.url - this.xg.play() this.changingIPTV = false 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' @@ -606,7 +602,7 @@ export default { getPlayer (playerType, force = false) { if (!force && this.playerType === playerType) return if (this.playerType !== 'flv') { - this.xg.src = '' // https://developers.google.com/web/updates/2017/06/play-request-was-interrupted#danger-zone + this.xg.src = '' this.config.url = '' } try { @@ -657,7 +653,6 @@ export default { this.xg.src = url const key = this.video.key + '@' + this.video.info.id const startTime = VIDEO_DETAIL_CACHE[key].startPosition || 0 - this.xg.play() 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', () => {