From 73ef4b54aa6d687575502b4d0297fd2cbee8826a Mon Sep 17 00:00:00 2001 From: Wicklow Date: Wed, 19 Apr 2023 15:18:44 +0200 Subject: Don't send replay settings on not replayed lives --- .../+video-edit/video-add-components/video-go-live.component.ts | 9 +++++++-- client/src/app/+videos/+video-edit/video-update.component.ts | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts index 904492994..ba612f553 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts @@ -137,9 +137,14 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView video.uuid = this.videoUUID video.shortUUID = this.videoShortUUID + const saveReplay = this.form.value.saveReplay + const replaySettings = saveReplay + ? { privacy: this.form.value.replayPrivacy } + : undefined + const liveVideoUpdate: LiveVideoUpdate = { - saveReplay: this.form.value.saveReplay, - replaySettings: { privacy: this.form.value.replayPrivacy }, + saveReplay, + replaySettings, latencyMode: this.form.value.latencyMode, permanentLive: this.form.value.permanentLive } diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts index b70270261..ad71162b8 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.ts +++ b/client/src/app/+videos/+video-edit/video-update.component.ts @@ -127,9 +127,14 @@ export class VideoUpdateComponent extends FormReactive implements OnInit { switchMap(() => { if (!this.liveVideo) return of(undefined) + const saveReplay = !!this.form.value.saveReplay + const replaySettings = saveReplay + ? { privacy: this.form.value.replayPrivacy } + : undefined + const liveVideoUpdate: LiveVideoUpdate = { - saveReplay: !!this.form.value.saveReplay, - replaySettings: { privacy: this.form.value.replayPrivacy }, + saveReplay, + replaySettings, permanentLive: !!this.form.value.permanentLive, latencyMode: this.form.value.latencyMode } -- cgit v1.2.3