aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-10-26 16:44:23 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commitb5b687550d8ef8beafdf706e45d6556fb5f4c876 (patch)
tree232412d463c78af1f7ab5797db5aecf1096d08da /client/src/app/+videos/+video-edit/shared
parentef680f68351ec10ab73a1131570a6d14ce14c195 (diff)
downloadPeerTube-b5b687550d8ef8beafdf706e45d6556fb5f4c876.tar.gz
PeerTube-b5b687550d8ef8beafdf706e45d6556fb5f4c876.tar.zst
PeerTube-b5b687550d8ef8beafdf706e45d6556fb5f4c876.zip
Add ability to save live replay
Diffstat (limited to 'client/src/app/+videos/+video-edit/shared')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.html14
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts7
2 files changed, 19 insertions, 2 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 0802e906d..d9e09c453 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
@@ -142,7 +142,7 @@
142 </ng-template> 142 </ng-template>
143 </ng-container> 143 </ng-container>
144 144
145 <ng-container ngbNavItem> 145 <ng-container ngbNavItem *ngIf="!liveVideo">
146 <a ngbNavLink i18n>Captions</a> 146 <a ngbNavLink i18n>Captions</a>
147 147
148 <ng-template ngbNavContent> 148 <ng-template ngbNavContent>
@@ -211,6 +211,18 @@
211 <label for="liveVideoStreamKey" i18n>Live stream key</label> 211 <label for="liveVideoStreamKey" i18n>Live stream key</label>
212 <my-input-readonly-copy id="liveVideoStreamKey" [value]="liveVideo.streamKey"></my-input-readonly-copy> 212 <my-input-readonly-copy id="liveVideoStreamKey" [value]="liveVideo.streamKey"></my-input-readonly-copy>
213 </div> 213 </div>
214
215 <div class="form-group" *ngIf="isSaveReplayEnabled()">
216 <my-peertube-checkbox inputName="liveVideoSaveReplay" formControlName="saveReplay">
217 <ng-template ptTemplate="label">
218 <ng-container i18n>Automatically publish a replay when your live ends</ng-container>
219 </ng-template>
220
221 <ng-container ngProjectAs="description">
222 <span i18n>⚠️ If you enable this option, your live will be terminated if you exceed your video quota</span>
223 </ng-container>
224 </my-peertube-checkbox>
225 </div>
214 </div> 226 </div>
215 </div> 227 </div>
216 </ng-template> 228 </ng-template>
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 304bf7ed0..26d871e59 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
@@ -127,7 +127,8 @@ export class VideoEditComponent implements OnInit, OnDestroy {
127 support: VIDEO_SUPPORT_VALIDATOR, 127 support: VIDEO_SUPPORT_VALIDATOR,
128 schedulePublicationAt: VIDEO_SCHEDULE_PUBLICATION_AT_VALIDATOR, 128 schedulePublicationAt: VIDEO_SCHEDULE_PUBLICATION_AT_VALIDATOR,
129 originallyPublishedAt: VIDEO_ORIGINALLY_PUBLISHED_AT_VALIDATOR, 129 originallyPublishedAt: VIDEO_ORIGINALLY_PUBLISHED_AT_VALIDATOR,
130 liveStreamKey: null 130 liveStreamKey: null,
131 saveReplay: null
131 } 132 }
132 133
133 this.formValidatorService.updateForm( 134 this.formValidatorService.updateForm(
@@ -239,6 +240,10 @@ export class VideoEditComponent implements OnInit, OnDestroy {
239 this.videoCaptionAddModal.show() 240 this.videoCaptionAddModal.show()
240 } 241 }
241 242
243 isSaveReplayEnabled () {
244 return this.serverConfig.live.allowReplay
245 }
246
242 private sortVideoCaptions () { 247 private sortVideoCaptions () {
243 this.videoCaptions.sort((v1, v2) => { 248 this.videoCaptions.sort((v1, v2) => {
244 if (v1.language.label < v2.language.label) return -1 249 if (v1.language.label < v2.language.label) return -1