From 334933ce82e98a6c3fafafa5f45336edba4170f0 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Wed, 20 Jan 2021 23:02:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E5=8D=A1=E9=A1=BF=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8D=A2=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 15 +++++++++++++++ src/components/Setting.vue | 4 ++++ src/lib/dexie/dexie.js | 4 ++++ src/lib/dexie/initData.js | 4 +++- 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 8e0fe5e..23104fe 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -1420,6 +1420,21 @@ export default { }) }, bindEvent () { + let stallIptvTimeout + this.xg.on('waiting', () => { + if (this.isLive && this.setting.autoChangeSourceWhenIptvStalling && this.right.sources.length > 1) { + stallIptvTimeout = setTimeout(() => { + let index = this.right.sources.indexOf(this.video.iptv) + 1 + if (index === this.right.sources.length) index = 0 + clearTimeout(stallIptvTimeout) + this.playChannel(this.right.sources[index]) + }, this.setting.waitingTimeInSec * 1000) + } + }) + this.xg.on('canplay', () => { + if (stallIptvTimeout) clearTimeout(stallIptvTimeout) + }) + this.xg.on('exitFullscreen', () => { if (this.miniMode) this.xg.getCssFullscreen() }) diff --git a/src/components/Setting.vue b/src/components/Setting.vue index 9857d8e..382aac7 100644 --- a/src/components/Setting.vue +++ b/src/components/Setting.vue @@ -75,6 +75,10 @@