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