黑屏有声音时尽量避免手动操作

This commit is contained in:
buvta
2021-01-21 22:28:12 +08:00
parent 2c93d755c7
commit ec4980a4b6

View File

@@ -600,6 +600,10 @@ export default {
this.xg.src = channel.url
this.xg.play()
this.changingIPTV = false
if (!document.getElementById('xgplayer').querySelector('video')) {
this.getPlayer(this.playerType, true)
this.playChannel(channel)
}
if (document.querySelector('xg-btn-showhistory')) document.querySelector('xg-btn-showhistory').style.display = 'none'
if (document.querySelector('.xgplayer-playbackrate')) document.querySelector('.xgplayer-playbackrate').style.display = 'none'
},
@@ -658,6 +662,10 @@ export default {
const key = this.video.key + '@' + this.video.info.id
const startTime = VIDEO_DETAIL_CACHE[key].startPosition || 0
this.xg.play()
if (!document.getElementById('xgplayer').querySelector('video')) {
this.getPlayer(this.playerType, true)
this.getUrls()
}
if (document.querySelector('xg-btn-showhistory')) document.querySelector('xg-btn-showhistory').style.display = 'block'
if (document.querySelector('.xgplayer-playbackrate')) document.querySelector('.xgplayer-playbackrate').style.display = 'inline-block'
this.xg.once('playing', () => {