From c8fa571f32b10c083fab07f28d2ef55895ef40af Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 22 Jul 2022 15:22:21 +0200 Subject: Clearer live session Get the save replay setting when the session started to prevent inconsistent behaviour when the setting changed before the session was processed by the live ending job Display more information about the potential session replay in live modal information --- .../shared-video-live/live-stream-information.component.html | 1 + .../shared/shared-video-live/live-stream-information.component.ts | 7 +++++++ .../shared-video-miniature/video-actions-dropdown.component.ts | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'client/src') diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.html b/client/src/app/shared/shared-video-live/live-stream-information.component.html index 99c7dbd4c..cf30c1ce1 100644 --- a/client/src/app/shared/shared-video-live/live-stream-information.component.html +++ b/client/src/app/shared/shared-video-live/live-stream-information.component.html @@ -42,6 +42,7 @@ Started on {{ session.startDate | date:'medium' }} Ended on {{ session.endDate | date:'medium' }} Go to replay + Replay is being processed... diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.ts b/client/src/app/shared/shared-video-live/live-stream-information.component.ts index c60f7fe2f..3dd59bb57 100644 --- a/client/src/app/shared/shared-video-live/live-stream-information.component.ts +++ b/client/src/app/shared/shared-video-live/live-stream-information.component.ts @@ -49,6 +49,13 @@ export class LiveStreamInformationComponent { return errors[session.error] } + isReplayBeingProcessed (session: LiveVideoSession) { + // Running live + if (!session.endDate) return false + + return session.saveReplay && !session.endingProcessed + } + private loadLiveInfo (video: Video) { this.liveVideoService.getVideoLive(video.id) .subscribe(live => this.live = live) diff --git a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts index ed6a4afc0..56527ddfa 100644 --- a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts @@ -230,7 +230,7 @@ export class VideoActionsDropdownComponent implements OnChanges { let message = $localize`Do you really want to delete ${this.video.name}?` if (this.video.isLive) { - message += ' ' + $localize`The live stream will be automatically terminated.` + message += ' ' + $localize`The live stream will be automatically terminated and replays won't be saved.` } const res = await this.confirmService.confirm(message, $localize`Delete ${this.video.name}`) -- cgit v1.2.3