From e9f81faf708b7e500dc4e45098c332c0de7ae405 Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Mon, 14 Dec 2020 16:26:47 +0100 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B7=B3=E8=BF=87=E7=89=87?= =?UTF-8?q?=E5=A4=B4=E7=89=87=E5=B0=BE=E9=87=8C=E7=9A=84=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 12ecf27..425eea3 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -353,8 +353,7 @@ export default { children: 'children' }, startPosition: { min: '00', sec: '00' }, // 对应调略输入框 - endPosition: { min: '00', sec: '00' }, - skipendStatus: false // 是否跳过了片尾 + endPosition: { min: '00', sec: '00' } } }, filters: { @@ -582,7 +581,6 @@ export default { if (VIDEO_DETAIL_CACHE[key].endPosition) this.xg.addProgressDot(this.xg.duration - VIDEO_DETAIL_CACHE[key].endPosition, '片尾') }) this.videoPlaying() - this.skipendStatus = false this.xg.once('ended', () => { if (m3u8Arr.length > 1 && (m3u8Arr.length - 1 > index)) { this.video.info.time = 0 @@ -1347,11 +1345,8 @@ export default { const key = this.video.key + '@' + this.video.info.id if (VIDEO_DETAIL_CACHE[key] && VIDEO_DETAIL_CACHE[key].endPosition) { const time = this.xg.duration - VIDEO_DETAIL_CACHE[key].endPosition - this.xg.currentTime - if (time > 0 && time < 0.3) { // timeupdate每0.25秒触发一次,只有自然播放到该点时才会跳过片尾 - if (!this.skipendStatus) { - this.skipendStatus = true - this.xg.emit('ended') - } + if (time <= 0) { + this.xg.emit('ended') } } })