diff options
Diffstat (limited to 'client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts')
-rw-r--r-- | client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts | 14 |
1 files changed, 12 insertions, 2 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 83a6b2229..904492994 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 | |||
@@ -8,7 +8,15 @@ import { Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared | |||
8 | import { LiveVideoService } from '@app/shared/shared-video-live' | 8 | import { LiveVideoService } from '@app/shared/shared-video-live' |
9 | import { LoadingBarService } from '@ngx-loading-bar/core' | 9 | import { LoadingBarService } from '@ngx-loading-bar/core' |
10 | import { logger } from '@root-helpers/logger' | 10 | import { logger } from '@root-helpers/logger' |
11 | import { LiveVideo, LiveVideoCreate, LiveVideoLatencyMode, LiveVideoUpdate, PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' | 11 | import { |
12 | LiveVideo, | ||
13 | LiveVideoCreate, | ||
14 | LiveVideoLatencyMode, | ||
15 | LiveVideoUpdate, | ||
16 | PeerTubeProblemDocument, | ||
17 | ServerErrorCode, | ||
18 | VideoPrivacy | ||
19 | } from '@shared/models' | ||
12 | import { VideoSend } from './video-send' | 20 | import { VideoSend } from './video-send' |
13 | 21 | ||
14 | @Component({ | 22 | @Component({ |
@@ -79,11 +87,12 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView | |||
79 | permanentLive: this.firstStepPermanentLive, | 87 | permanentLive: this.firstStepPermanentLive, |
80 | latencyMode: LiveVideoLatencyMode.DEFAULT, | 88 | latencyMode: LiveVideoLatencyMode.DEFAULT, |
81 | saveReplay: this.isReplayAllowed(), | 89 | saveReplay: this.isReplayAllowed(), |
90 | replaySettings: { privacy: VideoPrivacy.PRIVATE }, | ||
82 | channelId: this.firstStepChannelId | 91 | channelId: this.firstStepChannelId |
83 | } | 92 | } |
84 | 93 | ||
85 | // Go live in private mode, but correctly fill the update form with the first user choice | 94 | // Go live in private mode, but correctly fill the update form with the first user choice |
86 | const toPatch = { ...video, privacy: this.firstStepPrivacyId } | 95 | const toPatch = { ...video, privacy: this.firstStepPrivacyId, replayPrivacy: video.replaySettings.privacy } |
87 | this.form.patchValue(toPatch) | 96 | this.form.patchValue(toPatch) |
88 | 97 | ||
89 | this.liveVideoService.goLive(video) | 98 | this.liveVideoService.goLive(video) |
@@ -130,6 +139,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView | |||
130 | 139 | ||
131 | const liveVideoUpdate: LiveVideoUpdate = { | 140 | const liveVideoUpdate: LiveVideoUpdate = { |
132 | saveReplay: this.form.value.saveReplay, | 141 | saveReplay: this.form.value.saveReplay, |
142 | replaySettings: { privacy: this.form.value.replayPrivacy }, | ||
133 | latencyMode: this.form.value.latencyMode, | 143 | latencyMode: this.form.value.latencyMode, |
134 | permanentLive: this.form.value.permanentLive | 144 | permanentLive: this.form.value.permanentLive |
135 | } | 145 | } |