From d91439648c212f9bca527cbcb05ba2e233b56deb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 21 Dec 2022 10:56:48 +0100 Subject: Prevent grey live button when loading the live --- client/src/assets/player/shared/control-bar/peertube-live-display.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client/src/assets/player/shared/control-bar') diff --git a/client/src/assets/player/shared/control-bar/peertube-live-display.ts b/client/src/assets/player/shared/control-bar/peertube-live-display.ts index 8724ff294..cc5927473 100644 --- a/client/src/assets/player/shared/control-bar/peertube-live-display.ts +++ b/client/src/assets/player/shared/control-bar/peertube-live-display.ts @@ -62,6 +62,9 @@ class PeerTubeLiveDisplay extends ClickableComponent { const hlsjs = this.getHLSJS() if (!hlsjs) return + // Not loaded yet + if (this.player().currentTime() === 0) return + const isSync = Math.abs(this.player().currentTime() - hlsjs.liveSyncPosition) < 10 this.updateSync(isSync) } -- cgit v1.2.3