Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix live duration in player

Chocobozzz51d811751f1a
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 2aa691f05f..421ce4934d 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