From 9fd3e5e2ed9fc041d4497db2958431ad416608fb Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Wed, 20 Jan 2021 22:22:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dflv=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E5=81=9C=E6=AD=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 848875f..8e0fe5e 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -607,8 +607,8 @@ export default { 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.config.url = '' } - this.config.url = '' try { this.xg.destroy() } catch (err) { } @@ -618,9 +618,7 @@ export default { this.xg = new Player(this.config) break case 'flv': - this.config.videoStop = false this.xg = new FlvJsPlayer(this.config) - this.config.videoStop = true break default: this.xg = new HlsJsPlayer(this.config) @@ -1521,7 +1519,12 @@ export default { this.state.showTimespanSetting = false this.right.list = [] this.getAllhistory() - this.getPlayer(this.playerType, true) + if (this.playerType !== 'flv') { + this.getPlayer(this.playerType, true) + } else { + this.xg.destroy() + this.getPlayer('hls', true) + } }, minMaxEvent () { win.on('minimize', () => {