]>
Commit | Line | Data |
---|---|---|
63347a0f | 1 | <div class="video-edit" [formGroup]="form"> |
45c6bcf3 | 2 | <div ngbNav #nav="ngbNav" class="nav-tabs"> |
63347a0f | 3 | |
087fc5da C |
4 | <ng-template #pluginSettingTemplate let-pluginSetting> |
5 | <div class="form-group" [hidden]="isPluginFieldHidden(pluginSetting)"> | |
6 | <my-dynamic-form-field [form]="pluginDataFormGroup" [formErrors]="formErrors['pluginData']" [setting]="pluginSetting.commonOptions"></my-dynamic-form-field> | |
7 | </div> | |
8 | </ng-template> | |
9 | ||
45c6bcf3 C |
10 | <ng-container ngbNavItem> |
11 | <a ngbNavLink i18n>Basic info</a> | |
12 | ||
13 | <ng-template ngbNavContent> | |
ce4b4495 | 14 | <div class="form-columns"> |
6f02515e | 15 | <div class="col-video-edit"> |
63347a0f C |
16 | <div class="form-group"> |
17 | <label i18n for="name">Title</label> | |
a6d5ff76 | 18 | <input type="text" id="name" class="form-control" formControlName="name" /> |
63347a0f C |
19 | <div *ngIf="formErrors.name" class="form-error"> |
20 | {{ formErrors.name }} | |
21 | </div> | |
22 | </div> | |
23 | ||
24 | <div class="form-group"> | |
b0c36821 | 25 | <label i18n class="label-tags">Tags</label> |
421d935d C |
26 | |
27 | <my-help> | |
28 | <ng-template ptTemplate="customHtml"> | |
29 | <ng-container i18n> | |
30 | Tags could be used to suggest relevant recommendations. <br /> | |
47594fd7 | 31 | There is a maximum of 5 tags. <br /> |
9e8929d6 | 32 | Press <kbd>Enter</kbd> to add a new tag. |
421d935d C |
33 | </ng-container> |
34 | </ng-template> | |
35 | </my-help> | |
36 | ||
02c01341 RK |
37 | <my-select-tags labelForId="label-tags" formControlName="tags"></my-select-tags> |
38 | <div *ngIf="formErrors.tags" class="form-error"> | |
39 | {{ formErrors.tags }} | |
40 | </div> | |
63347a0f C |
41 | </div> |
42 | ||
43 | <div class="form-group"> | |
44 | <label i18n for="description">Description</label> | |
421d935d C |
45 | |
46 | <my-help helpType="markdownText"> | |
47 | <ng-template ptTemplate="preHtml"> | |
ef19c8ae C |
48 | <ng-container i18n>Video descriptions are truncated by default and require manual action to expand them.</ng-container> |
49 | ||
50 | <br /> | |
51 | ||
52 | <ng-container i18n>A timestamp (<i>00:05</i> for example) is automatically converted into a link to a part of the video.</ng-container> | |
421d935d C |
53 | </ng-template> |
54 | </my-help> | |
55 | ||
9bc36223 C |
56 | <my-markdown-textarea |
57 | formControlName="description" [markdownVideo]="videoToUpdate" | |
58 | [formError]="formErrors.description" [truncate]="250" | |
59 | ></my-markdown-textarea> | |
63347a0f | 60 | </div> |
6de36768 | 61 | </div> |
6de36768 | 62 | |
6f02515e | 63 | <div class="col-video-edit"> |
63347a0f | 64 | <div class="form-group"> |
02c01341 RK |
65 | <label i18n for="channel">Channel</label> |
66 | <my-select-channel labelForId="channel" [items]="userVideoChannels" formControlName="channelId"></my-select-channel> | |
63347a0f C |
67 | </div> |
68 | ||
69 | <div class="form-group"> | |
70 | <label i18n for="category">Category</label> | |
02c01341 RK |
71 | <my-select-options |
72 | labelForId="category" [items]="videoCategories" formControlName="category" [clearable]="true" | |
73 | ></my-select-options> | |
63347a0f C |
74 | |
75 | <div *ngIf="formErrors.category" class="form-error"> | |
76 | {{ formErrors.category }} | |
77 | </div> | |
78 | </div> | |
79 | ||
80 | <div class="form-group"> | |
81 | <label i18n for="licence">Licence</label> | |
2b8d7a7d FS |
82 | |
83 | <my-help> | |
84 | <ng-template ptTemplate="customHtml"> | |
85 | <ng-container i18n> | |
7e6bdb5a | 86 | <a href="https://chooser-beta.creativecommons.org/" target="_blank" rel="noopener noreferrer">Choose</a> the appropriate licence for your work. |
2b8d7a7d FS |
87 | </ng-container> |
88 | </ng-template> | |
89 | </my-help> | |
90 | ||
02c01341 RK |
91 | <my-select-options |
92 | labelForId="licence" [items]="videoLicences" formControlName="licence" [clearable]="true" | |
93 | ></my-select-options> | |
63347a0f C |
94 | |
95 | <div *ngIf="formErrors.licence" class="form-error"> | |
96 | {{ formErrors.licence }} | |
97 | </div> | |
98 | </div> | |
99 | ||
100 | <div class="form-group"> | |
101 | <label i18n for="language">Language</label> | |
02c01341 RK |
102 | <my-select-options |
103 | labelForId="language" [items]="videoLanguages" formControlName="language" | |
104 | [clearable]="true" [searchable]="true" [groupBy]="'group'" | |
105 | ></my-select-options> | |
63347a0f C |
106 | |
107 | <div *ngIf="formErrors.language" class="form-error"> | |
108 | {{ formErrors.language }} | |
109 | </div> | |
110 | </div> | |
111 | ||
112 | <div class="form-group"> | |
113 | <label i18n for="privacy">Privacy</label> | |
02c01341 RK |
114 | <my-select-options |
115 | labelForId="privacy" [items]="videoPrivacies" formControlName="privacy" [clearable]="false" | |
116 | ></my-select-options> | |
63347a0f C |
117 | |
118 | <div *ngIf="formErrors.privacy" class="form-error"> | |
119 | {{ formErrors.privacy }} | |
120 | </div> | |
121 | </div> | |
122 | ||
123 | <div *ngIf="schedulePublicationEnabled" class="form-group"> | |
124 | <label i18n for="schedulePublicationAt">Schedule publication ({{ calendarTimezone }})</label> | |
125 | <p-calendar | |
126 | id="schedulePublicationAt" formControlName="schedulePublicationAt" [dateFormat]="calendarDateFormat" | |
8e0a2f2a | 127 | [firstDayOfWeek]="0" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true" |
63347a0f C |
128 | > |
129 | </p-calendar> | |
130 | ||
131 | <div *ngIf="formErrors.schedulePublicationAt" class="form-error"> | |
132 | {{ formErrors.schedulePublicationAt }} | |
133 | </div> | |
134 | </div> | |
135 | ||
421d935d C |
136 | <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right"> |
137 | <ng-template ptTemplate="label"> | |
02c01341 | 138 | <ng-container i18n>Contains sensitive content</ng-container> |
421d935d C |
139 | </ng-template> |
140 | ||
141 | <ng-template ptTemplate="help"> | |
2d6f28a2 | 142 | <ng-container i18n>Some instances hide videos containing mature or explicit content by default.</ng-container> |
421d935d C |
143 | </ng-template> |
144 | </my-peertube-checkbox> | |
145 | ||
080f1402 | 146 | <my-peertube-checkbox *ngIf="!hideWaitTranscoding" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right"> |
421d935d | 147 | <ng-template ptTemplate="label"> |
02c01341 | 148 | <ng-container i18n>Publish after transcoding</ng-container> |
421d935d C |
149 | </ng-template> |
150 | ||
151 | <ng-template ptTemplate="help"> | |
0582b4f9 | 152 | <ng-container i18n>The video may be unplayable during the transcoding process. It's the reason why we prefer to publish publicly the video after transcoding.</ng-container> |
421d935d C |
153 | </ng-template> |
154 | </my-peertube-checkbox> | |
6de36768 | 155 | |
087fc5da C |
156 | <ng-container |
157 | *ngFor="let pluginSetting of getPluginsFields('main')" | |
158 | [ngTemplateOutlet]="pluginSettingTemplate" [ngTemplateOutletContext]="{ $implicit: pluginSetting }" | |
159 | > | |
3c065fe3 | 160 | </ng-container> |
6de36768 C |
161 | </div> |
162 | </div> | |
63347a0f | 163 | </ng-template> |
45c6bcf3 C |
164 | </ng-container> |
165 | ||
b5b68755 | 166 | <ng-container ngbNavItem *ngIf="!liveVideo"> |
45c6bcf3 | 167 | <a ngbNavLink i18n>Captions</a> |
63347a0f | 168 | |
45c6bcf3 | 169 | <ng-template ngbNavContent> |
63347a0f C |
170 | <div class="captions"> |
171 | ||
172 | <div class="captions-header"> | |
173 | <a (click)="openAddCaptionModal()" class="create-caption"> | |
6ad971d5 | 174 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> |
63347a0f C |
175 | <ng-container i18n>Add another caption</ng-container> |
176 | </a> | |
6de36768 | 177 | </div> |
6de36768 | 178 | |
63347a0f | 179 | <div class="form-group" *ngFor="let videoCaption of videoCaptions"> |
6de36768 | 180 | |
63347a0f C |
181 | <div class="caption-entry"> |
182 | <ng-container *ngIf="!videoCaption.action"> | |
183 | <a | |
184 | i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer" | |
185 | [href]="videoCaption.captionPath" | |
186 | >{{ videoCaption.language.label }}</a> | |
6de36768 | 187 | |
4f50475c | 188 | <div i18n class="caption-entry-state">Already uploaded on {{ videoCaption.updatedAt | date }} ✔</div> |
6de36768 | 189 | |
2873a53e | 190 | <span i18n class="caption-entry-edit" (click)="openEditCaptionModal(videoCaption)">Edit</span> |
63347a0f C |
191 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span> |
192 | </ng-container> | |
6de36768 | 193 | |
63347a0f C |
194 | <ng-container *ngIf="videoCaption.action === 'CREATE'"> |
195 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
6de36768 | 196 | |
cc3d1dce | 197 | <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div> |
6de36768 | 198 | |
63347a0f C |
199 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span> |
200 | </ng-container> | |
6de36768 | 201 | |
57d74ec8 | 202 | <ng-container *ngIf="videoCaption.action === 'UPDATE'"> |
203 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
204 | ||
205 | <div i18n class="caption-entry-state caption-entry-state-create">Will be edited on update</div> | |
206 | ||
207 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel edition</span> | |
208 | </ng-container> | |
209 | ||
63347a0f C |
210 | <ng-container *ngIf="videoCaption.action === 'REMOVE'"> |
211 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
6de36768 | 212 | |
cc3d1dce | 213 | <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div> |
bbe0f064 | 214 | |
63347a0f C |
215 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span> |
216 | </ng-container> | |
217 | </div> | |
bbe0f064 | 218 | </div> |
bbe0f064 | 219 | |
cc3d1dce | 220 | <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0"> |
63347a0f | 221 | No captions for now. |
40e87e9e | 222 | </div> |
40e87e9e | 223 | |
6de36768 | 224 | </div> |
63347a0f | 225 | </ng-template> |
45c6bcf3 C |
226 | </ng-container> |
227 | ||
a5cf76af | 228 | <ng-container ngbNavItem *ngIf="liveVideo"> |
c6c0fa6c C |
229 | <a ngbNavLink i18n>Live settings</a> |
230 | ||
231 | <ng-template ngbNavContent> | |
232 | <div class="row live-settings"> | |
233 | <div class="col-md-12"> | |
b13a0a48 | 234 | <div class="alert pt-alert-primary"> |
cd5dc718 C |
235 | <my-live-documentation-link></my-live-documentation-link> |
236 | </div> | |
c6c0fa6c | 237 | |
df1db951 | 238 | <div *ngIf="liveVideo.rtmpUrl" class="form-group"> |
a5cf76af | 239 | <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label> |
a70bf3bd | 240 | <my-input-text inputId="liveVideoRTMPUrl" [value]="liveVideo.rtmpUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-text> |
c6c0fa6c C |
241 | </div> |
242 | ||
df1db951 C |
243 | <div *ngIf="liveVideo.rtmpsUrl" class="form-group"> |
244 | <label for="liveVideoRTMPSUrl" i18n>Live RTMPS Url</label> | |
a70bf3bd | 245 | <my-input-text inputId="liveVideoRTMPSUrl" [value]="liveVideo.rtmpsUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-text> |
df1db951 C |
246 | </div> |
247 | ||
c6c0fa6c | 248 | <div class="form-group"> |
a5cf76af | 249 | <label for="liveVideoStreamKey" i18n>Live stream key</label> |
a70bf3bd | 250 | <my-input-text inputId="liveVideoStreamKey" [value]="liveVideo.streamKey" [withCopy]="true" [readonly]="true"></my-input-text> |
c29039e7 C |
251 | |
252 | <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div> | |
c6c0fa6c | 253 | </div> |
b5b68755 | 254 | |
bb4ba6d9 | 255 | <div class="form-group"> |
3eb7ee65 C |
256 | <div class="peertube-radio-container"> |
257 | <input type="radio" formControlName="permanentLive" id="permanentLiveFalse" [value]="false"> | |
258 | <label i18n for="permanentLiveFalse" class="radio">This is a normal live</label> | |
259 | ||
260 | <span class="form-group-description" i18n> | |
47830672 | 261 | You can stream only once in a normal live. If you enable replay, it will be saved under the same URL as your live |
3eb7ee65 C |
262 | </span> |
263 | </div> | |
264 | ||
265 | <div class="peertube-radio-container"> | |
266 | <input type="radio" formControlName="permanentLive" id="permanentLiveTrue" [value]="true"> | |
267 | <label i18n for="permanentLiveTrue" class="radio">This is a permanent/recurring live</label> | |
bb4ba6d9 | 268 | |
3eb7ee65 | 269 | <span class="form-group-description" i18n> |
47830672 | 270 | You can stream multiple times in a permanent/recurring live. If you enable replays, they will be saved as separate videos |
3eb7ee65 C |
271 | </span> |
272 | </div> | |
bb4ba6d9 C |
273 | </div> |
274 | ||
05a60d85 | 275 | <div class="form-group" *ngIf="isSaveReplayAllowed()"> |
b5b68755 C |
276 | <my-peertube-checkbox inputName="liveVideoSaveReplay" formControlName="saveReplay"> |
277 | <ng-template ptTemplate="label"> | |
278 | <ng-container i18n>Automatically publish a replay when your live ends</ng-container> | |
279 | </ng-template> | |
280 | ||
281 | <ng-container ngProjectAs="description"> | |
282 | <span i18n>⚠️ If you enable this option, your live will be terminated if you exceed your video quota</span> | |
283 | </ng-container> | |
284 | </my-peertube-checkbox> | |
285 | </div> | |
f443a746 | 286 | |
05a60d85 W |
287 | <div class="form-group mx-4" *ngIf="isSaveReplayEnabled()"> |
288 | <label i18n for="replayPrivacy">Privacy of the new replay</label> | |
289 | <my-select-options | |
290 | labelForId="replayPrivacy" [items]="videoPrivacies" [clearable]="false" formControlName="replayPrivacy" | |
291 | ></my-select-options> | |
292 | </div> | |
293 | ||
f443a746 C |
294 | <div class="form-group" *ngIf="isLatencyModeEnabled()"> |
295 | <label i18n for="latencyMode">Latency mode</label> | |
296 | <my-select-options | |
297 | labelForId="latencyMode" [items]="latencyModes" formControlName="latencyMode" [clearable]="true" | |
298 | ></my-select-options> | |
299 | ||
300 | <div *ngIf="formErrors.latencyMode" class="form-error"> | |
301 | {{ formErrors.latencyMode }} | |
302 | </div> | |
303 | </div> | |
c6c0fa6c C |
304 | </div> |
305 | </div> | |
306 | </ng-template> | |
307 | ||
308 | </ng-container> | |
309 | ||
310 | ||
45c6bcf3 C |
311 | <ng-container ngbNavItem> |
312 | <a ngbNavLink i18n>Advanced settings</a> | |
63347a0f | 313 | |
45c6bcf3 | 314 | <ng-template ngbNavContent> |
6913f691 C |
315 | <div class="row advanced-settings"> |
316 | <div class="col-md-12 col-xl-8"> | |
6de36768 | 317 | |
6913f691 | 318 | <div class="form-group"> |
437f277a | 319 | <label i18n for="previewfile">Video thumbnail</label> |
7b992a86 C |
320 | |
321 | <my-preview-upload | |
322 | i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile" | |
6913f691 | 323 | previewWidth="360px" previewHeight="200px" |
7b992a86 | 324 | ></my-preview-upload> |
6913f691 | 325 | </div> |
07fa4c97 | 326 | |
6913f691 C |
327 | <div class="form-group"> |
328 | <label i18n for="support">Support</label> | |
9e8929d6 RK |
329 | <my-help helpType="markdownEnhanced"> |
330 | <ng-template ptTemplate="preHtml"> | |
331 | <ng-container i18n> | |
332 | Short text to tell people how they can support you (membership platform...). | |
333 | </ng-container> | |
334 | </ng-template> | |
335 | </my-help> | |
9bc36223 | 336 | |
6913f691 | 337 | <my-markdown-textarea |
b15fe00f | 338 | id="support" formControlName="support" markdownType="enhanced" |
9bc36223 | 339 | [formError]="formErrors['support']" |
6913f691 | 340 | ></my-markdown-textarea> |
63347a0f | 341 | </div> |
07fa4c97 | 342 | </div> |
501e9611 | 343 | |
6913f691 | 344 | <div class="col-md-12 col-xl-4"> |
2e401e85 | 345 | |
346 | <div *ngIf="videoSource" class="form-group"> | |
347 | <label i18n for="filename">Filename</label> | |
348 | ||
349 | <my-help> | |
350 | <ng-template ptTemplate="preHtml"> | |
351 | <ng-container i18n> | |
352 | Name of the uploaded file | |
353 | </ng-container> | |
354 | </ng-template> | |
355 | </my-help> | |
356 | ||
357 | <input type="text" [disabled]="true" id="filename" class="form-control" [value]="videoSource.filename" /> | |
358 | </div> | |
359 | ||
6913f691 C |
360 | <div class="form-group originally-published-at"> |
361 | <label i18n for="originallyPublishedAt">Original publication date</label> | |
9e8929d6 RK |
362 | <my-help> |
363 | <ng-template ptTemplate="preHtml"> | |
364 | <ng-container i18n> | |
365 | This is the date when the content was originally published (e.g. the release date for a film) | |
366 | </ng-container> | |
367 | </ng-template> | |
368 | </my-help> | |
6913f691 | 369 | <p-calendar |
8e0a2f2a C |
370 | id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" [firstDayOfWeek]="0" |
371 | [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange" | |
6913f691 C |
372 | > |
373 | </p-calendar> | |
374 | ||
375 | <div *ngIf="formErrors.originallyPublishedAt" class="form-error"> | |
376 | {{ formErrors.originallyPublishedAt }} | |
377 | </div> | |
378 | </div> | |
379 | ||
380 | <my-peertube-checkbox | |
381 | inputName="commentsEnabled" formControlName="commentsEnabled" | |
382 | i18n-labelText labelText="Enable video comments" | |
383 | ></my-peertube-checkbox> | |
501e9611 | 384 | |
6913f691 C |
385 | <my-peertube-checkbox |
386 | inputName="downloadEnabled" formControlName="downloadEnabled" | |
387 | i18n-labelText labelText="Enable download" | |
388 | ></my-peertube-checkbox> | |
389 | </div> | |
07fa4c97 | 390 | </div> |
63347a0f | 391 | </ng-template> |
45c6bcf3 | 392 | </ng-container> |
ff249f49 | 393 | |
3c065fe3 | 394 | <ng-container ngbNavItem *ngIf="getPluginsFields('plugin-settings').length !== 0"> |
7294aab0 C |
395 | <a ngbNavLink i18n>Plugin settings</a> |
396 | ||
397 | <ng-template ngbNavContent> | |
398 | <div class="row plugin-settings"> | |
399 | ||
400 | <div class="col-md-12 col-xl-8"> | |
087fc5da C |
401 | <ng-container |
402 | *ngFor="let pluginSetting of getPluginsFields('plugin-settings')" | |
403 | [ngTemplateOutlet]="pluginSettingTemplate" [ngTemplateOutletContext]="{ $implicit: pluginSetting }" | |
404 | > | |
405 | </ng-container> | |
7294aab0 C |
406 | </div> |
407 | ||
408 | </div> | |
409 | </ng-template> | |
410 | </ng-container> | |
45c6bcf3 | 411 | </div> |
47564bbe | 412 | |
45c6bcf3 | 413 | <div [ngbNavOutlet]="nav"></div> |
ff249f49 | 414 | </div> |
40e87e9e C |
415 | |
416 | <my-video-caption-add-modal | |
57d74ec8 | 417 | #videoCaptionAddModal [existingCaptions]="getExistingCaptions()" [serverConfig]="serverConfig" (captionAdded)="onCaptionEdited($event)" |
b0c36821 | 418 | ></my-video-caption-add-modal> |