mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-05 16:03:29 +08:00
Revert "修复play-request-was-interrupted报错",重新发布
This reverts commit 088cd70e41.
This commit is contained in:
@@ -534,6 +534,9 @@ export default {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
if (this.xg && this.xg.hasStart) {
|
||||
this.xg.pause()
|
||||
}
|
||||
|
||||
if (this.video.iptv) {
|
||||
// 是直播源,直接播放
|
||||
@@ -595,6 +598,7 @@ export default {
|
||||
this.getPlayer(extRE[1])
|
||||
if (extRE[1] === 'flv') this.xg.config.isLive = true
|
||||
this.xg.src = channel.url
|
||||
this.xg.play()
|
||||
this.changingIPTV = false
|
||||
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'
|
||||
@@ -602,7 +606,7 @@ export default {
|
||||
getPlayer (playerType, force = false) {
|
||||
if (!force && this.playerType === playerType) return
|
||||
if (this.playerType !== 'flv') {
|
||||
this.xg.src = ''
|
||||
this.xg.src = '' // https://developers.google.com/web/updates/2017/06/play-request-was-interrupted#danger-zone
|
||||
this.config.url = ''
|
||||
}
|
||||
try {
|
||||
@@ -653,6 +657,7 @@ export default {
|
||||
this.xg.src = url
|
||||
const key = this.video.key + '@' + this.video.info.id
|
||||
const startTime = VIDEO_DETAIL_CACHE[key].startPosition || 0
|
||||
this.xg.play()
|
||||
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', () => {
|
||||
|
||||
Reference in New Issue
Block a user