aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared/video-edit.component.ts')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index de78a18cc..5294a57a1 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -138,6 +138,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
138 schedulePublicationAt: VIDEO_SCHEDULE_PUBLICATION_AT_VALIDATOR, 138 schedulePublicationAt: VIDEO_SCHEDULE_PUBLICATION_AT_VALIDATOR,
139 originallyPublishedAt: VIDEO_ORIGINALLY_PUBLISHED_AT_VALIDATOR, 139 originallyPublishedAt: VIDEO_ORIGINALLY_PUBLISHED_AT_VALIDATOR,
140 liveStreamKey: null, 140 liveStreamKey: null,
141 permanentLive: null,
141 saveReplay: null 142 saveReplay: null
142 } 143 }
143 144
@@ -158,6 +159,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
158 159
159 this.trackChannelChange() 160 this.trackChannelChange()
160 this.trackPrivacyChange() 161 this.trackPrivacyChange()
162 this.trackLivePermanentFieldChange()
161 } 163 }
162 164
163 ngOnInit () { 165 ngOnInit () {
@@ -254,6 +256,10 @@ export class VideoEditComponent implements OnInit, OnDestroy {
254 return this.serverConfig.live.allowReplay 256 return this.serverConfig.live.allowReplay
255 } 257 }
256 258
259 isPermanentLiveEnabled () {
260 return this.form.value['permanentLive'] === true
261 }
262
257 private sortVideoCaptions () { 263 private sortVideoCaptions () {
258 this.videoCaptions.sort((v1, v2) => { 264 this.videoCaptions.sort((v1, v2) => {
259 if (v1.language.label < v2.language.label) return -1 265 if (v1.language.label < v2.language.label) return -1
@@ -362,6 +368,24 @@ export class VideoEditComponent implements OnInit, OnDestroy {
362 ) 368 )
363 } 369 }
364 370
371 private trackLivePermanentFieldChange () {
372 // We will update the "support" field depending on the channel
373 this.form.controls['permanentLive']
374 .valueChanges
375 .subscribe(
376 permanentLive => {
377 const saveReplayControl = this.form.controls['saveReplay']
378
379 if (permanentLive === true) {
380 saveReplayControl.setValue(false)
381 saveReplayControl.disable()
382 } else {
383 saveReplayControl.enable()
384 }
385 }
386 )
387 }
388
365 private updateSupportField (support: string) { 389 private updateSupportField (support: string) {
366 return this.form.patchValue({ support: support || '' }) 390 return this.form.patchValue({ support: support || '' })
367 } 391 }