diff --git a/client/src/assets/player/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/p2p-media-loader/hls-plugin.ts index 71c31696a..2aa691f05 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts @@ -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 })