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