mirror of
https://github.com/bytedance/xgplayer.git
synced 2025-04-05 03:05:02 +08:00
fix: 🐛 allowedStreamTrackChange cause playnext failure
This commit is contained in:
parent
d3397fef24
commit
c945b03dae
@ -768,7 +768,7 @@ export class Hls extends EventEmitter {
|
||||
_onTimeupdate = () => {
|
||||
if (!this.media) return
|
||||
const cfg = this.config
|
||||
if (cfg.isLive && cfg.maxLatency && cfg.targetLatency && this.media) {
|
||||
if (cfg.isLive && cfg.maxLatency && cfg.targetLatency) {
|
||||
const liveEdge = this._playlist.liveEdge
|
||||
if (!liveEdge) return
|
||||
const latency = liveEdge - this.media.currentTime
|
||||
@ -782,10 +782,9 @@ export class Hls extends EventEmitter {
|
||||
this._seiService?.throw(this.media.currentTime)
|
||||
}
|
||||
|
||||
if (this.config.allowedStreamTrackChange && !this.config.softDecode) {
|
||||
if (cfg.allowedStreamTrackChange && !cfg.softDecode && this.media.readyState) {
|
||||
this._checkStreamTrackChange(this.media.currentTime)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_checkStreamTrackChange (time) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user