fix:直播时上下切换频道时的bug

This commit is contained in:
buvta
2020-11-21 23:20:17 +08:00
parent 39edb9ce35
commit a8b0e7e6a8

View File

@@ -673,7 +673,7 @@ export default {
},
prevEvent () {
if (this.video.iptv) {
var index = this.channelList.findIndex(obj => obj.prefer === this.video.iptv.id)
var index = this.channelList.findIndex(obj => obj.id === this.video.iptv.channelID)
if (index >= 1) {
var channel = this.channelList[index - 1]
this.playChannel(channel)
@@ -691,7 +691,7 @@ export default {
},
nextEvent () {
if (this.video.iptv) {
var index = this.channelList.findIndex(obj => obj.prefer === this.video.iptv.id)
var index = this.channelList.findIndex(obj => obj.id === this.video.iptv.channelID)
if (index < (this.channelList.length - 1)) {
var channel = this.channelList[index + 1]
this.playChannel(channel)