diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-07 11:32:19 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-07 11:32:19 +0100 |
commit | 51d811751f1a299c61d64e11fbe600edeb6d586d (patch) | |
tree | 7c1eca82a2b871a0cedb887e75b70e8c32ce153e /client/src/assets/player/p2p-media-loader | |
parent | bdf70330e4d74091ccc9d64534d3f780d5ee8ef4 (diff) | |
download | PeerTube-51d811751f1a299c61d64e11fbe600edeb6d586d.tar.gz PeerTube-51d811751f1a299c61d64e11fbe600edeb6d586d.tar.zst PeerTube-51d811751f1a299c61d64e11fbe600edeb6d586d.zip |
Fix live duration in player
Diffstat (limited to 'client/src/assets/player/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/p2p-media-loader/hls-plugin.ts | 1 |
1 files changed, 1 insertions, 0 deletions
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 { | |||
146 | } | 146 | } |
147 | 147 | ||
148 | duration () { | 148 | duration () { |
149 | if (this._duration === Infinity) return Infinity | ||
149 | if (!isNaN(this.videoElement.duration)) return this.videoElement.duration | 150 | if (!isNaN(this.videoElement.duration)) return this.videoElement.duration |
150 | 151 | ||
151 | return this._duration || 0 | 152 | return this._duration || 0 |