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