Recover HLS video with duration inconsistency
With audio longer than video
This commit is contained in:
parent
51e9e152f7
commit
22f25c740b
|
@ -146,7 +146,9 @@ class Html5Hlsjs {
|
|||
}
|
||||
|
||||
duration () {
|
||||
return this._duration || this.videoElement.duration || 0
|
||||
if (!isNaN(this.videoElement.duration)) return this.videoElement.duration
|
||||
|
||||
return this._duration || 0
|
||||
}
|
||||
|
||||
seekable () {
|
||||
|
@ -366,6 +368,7 @@ class Html5Hlsjs {
|
|||
|
||||
this.isLive = data.details.live
|
||||
this.dvrDuration = data.details.totalduration
|
||||
|
||||
this._duration = this.isLive ? Infinity : data.details.totalduration
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue