From 51d811751f1a299c61d64e11fbe600edeb6d586d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 7 Dec 2021 11:32:19 +0100 Subject: [PATCH] Fix live duration in player --- client/src/assets/player/p2p-media-loader/hls-plugin.ts | 1 + 1 file changed, 1 insertion(+) 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 2aa691f05..421ce4934 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts @@ -146,6 +146,7 @@ class Html5Hlsjs { } duration () { + if (this._duration === Infinity) return Infinity if (!isNaN(this.videoElement.duration)) return this.videoElement.duration return this._duration || 0