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