From 0e7c4b03c3908ad81427921c96b06c1efae4da54 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 20 Dec 2022 16:28:15 +0100 Subject: Add back to live feature --- .../manager-options/control-bar-options-builder.ts | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'client/src/assets/player/shared/manager-options') diff --git a/client/src/assets/player/shared/manager-options/control-bar-options-builder.ts b/client/src/assets/player/shared/manager-options/control-bar-options-builder.ts index 27f366732..df1e8eabe 100644 --- a/client/src/assets/player/shared/manager-options/control-bar-options-builder.ts +++ b/client/src/assets/player/shared/manager-options/control-bar-options-builder.ts @@ -30,10 +30,7 @@ export class ControlBarOptionsBuilder { } Object.assign(children, { - currentTimeDisplay: {}, - timeDivider: {}, - durationDisplay: {}, - liveDisplay: {}, + ...this.getTimeControls(), flexibleWidthSpacer: {}, @@ -90,7 +87,23 @@ export class ControlBarOptionsBuilder { } } + private getTimeControls () { + if (this.options.isLive) { + return { + peerTubeLiveDisplay: {} + } + } + + return { + currentTimeDisplay: {}, + timeDivider: {}, + durationDisplay: {} + } + } + private getProgressControl () { + if (this.options.isLive) return {} + const loadProgressBar = this.mode === 'webtorrent' ? 'peerTubeLoadProgressBar' : 'loadProgressBar' -- cgit v1.2.3