mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-13 07:25:01 +08:00
删除跳过片头片尾里的无用代码
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user