]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-edit/shared/video-edit.component.ts
refactor 404 page
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / shared / video-edit.component.ts
index 304bf7ed0286db89bfd993ff71367cc107f07ab0..de78a18cc6ba1319fc4185e0a70f836431d4f09a 100644 (file)
@@ -102,6 +102,16 @@ export class VideoEditComponent implements OnInit, OnDestroy {
                .map(c => c.language.id)
   }
 
+  isWaitTranscodingDisplayed () {
+    if (!this.waitTranscodingEnabled) return false
+
+    if (this.liveVideo) {
+      return this.form.value['saveReplay'] === true
+    }
+
+    return true
+  }
+
   updateForm () {
     const defaultValues: any = {
       nsfw: 'false',
@@ -127,7 +137,8 @@ export class VideoEditComponent implements OnInit, OnDestroy {
       support: VIDEO_SUPPORT_VALIDATOR,
       schedulePublicationAt: VIDEO_SCHEDULE_PUBLICATION_AT_VALIDATOR,
       originallyPublishedAt: VIDEO_ORIGINALLY_PUBLISHED_AT_VALIDATOR,
-      liveStreamKey: null
+      liveStreamKey: null,
+      saveReplay: null
     }
 
     this.formValidatorService.updateForm(
@@ -239,6 +250,10 @@ export class VideoEditComponent implements OnInit, OnDestroy {
     this.videoCaptionAddModal.show()
   }
 
+  isSaveReplayEnabled () {
+    return this.serverConfig.live.allowReplay
+  }
+
   private sortVideoCaptions () {
     this.videoCaptions.sort((v1, v2) => {
       if (v1.language.label < v2.language.label) return -1