Prevent grey live button when loading the live

This commit is contained in:
Chocobozzz 2022-12-21 10:56:48 +01:00
parent f50bff17f5
commit d91439648c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -62,6 +62,9 @@ class PeerTubeLiveDisplay extends ClickableComponent {
const hlsjs = this.getHLSJS() const hlsjs = this.getHLSJS()
if (!hlsjs) return if (!hlsjs) return
// Not loaded yet
if (this.player().currentTime() === 0) return
const isSync = Math.abs(this.player().currentTime() - hlsjs.liveSyncPosition) < 10 const isSync = Math.abs(this.player().currentTime() - hlsjs.liveSyncPosition) < 10
this.updateSync(isSync) this.updateSync(isSync)
} }