aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.html12
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts24
2 files changed, 36 insertions, 0 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html
index bf8b0b267..f62464d35 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.html
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html
@@ -223,6 +223,18 @@
223 <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div> 223 <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div>
224 </div> 224 </div>
225 225
226 <div class="form-group">
227 <my-peertube-checkbox inputName="liveVideoPermanentLive" formControlName="permanentLive">
228 <ng-template ptTemplate="label">
229 <ng-container i18n>This is a permanent live</ng-container>
230 </ng-template>
231
232 <ng-container ngProjectAs="description">
233 <span i18n>You can stream multiple times in a permanent live. The URL for your viewers won't change but you cannot save replays of your lives</span>
234 </ng-container>
235 </my-peertube-checkbox>
236 </div>
237
226 <div class="form-group" *ngIf="isSaveReplayEnabled()"> 238 <div class="form-group" *ngIf="isSaveReplayEnabled()">
227 <my-peertube-checkbox inputName="liveVideoSaveReplay" formControlName="saveReplay"> 239 <my-peertube-checkbox inputName="liveVideoSaveReplay" formControlName="saveReplay">
228 <ng-template ptTemplate="label"> 240 <ng-template ptTemplate="label">
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 }