]>
Commit | Line | Data |
---|---|---|
63347a0f | 1 | <div class="video-edit" [formGroup]="form"> |
45c6bcf3 | 2 | <div ngbNav #nav="ngbNav" class="nav-tabs"> |
63347a0f | 3 | |
45c6bcf3 C |
4 | <ng-container ngbNavItem> |
5 | <a ngbNavLink i18n>Basic info</a> | |
6 | ||
7 | <ng-template ngbNavContent> | |
ce4b4495 | 8 | <div class="form-columns"> |
6f02515e | 9 | <div class="col-video-edit"> |
63347a0f C |
10 | <div class="form-group"> |
11 | <label i18n for="name">Title</label> | |
a6d5ff76 | 12 | <input type="text" id="name" class="form-control" formControlName="name" /> |
63347a0f C |
13 | <div *ngIf="formErrors.name" class="form-error"> |
14 | {{ formErrors.name }} | |
15 | </div> | |
16 | </div> | |
17 | ||
18 | <div class="form-group"> | |
b0c36821 | 19 | <label i18n class="label-tags">Tags</label> |
421d935d C |
20 | |
21 | <my-help> | |
22 | <ng-template ptTemplate="customHtml"> | |
23 | <ng-container i18n> | |
24 | Tags could be used to suggest relevant recommendations. <br /> | |
47594fd7 | 25 | There is a maximum of 5 tags. <br /> |
9e8929d6 | 26 | Press <kbd>Enter</kbd> to add a new tag. |
421d935d C |
27 | </ng-container> |
28 | </ng-template> | |
29 | </my-help> | |
30 | ||
02c01341 RK |
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> | |
63347a0f C |
35 | </div> |
36 | ||
37 | <div class="form-group"> | |
38 | <label i18n for="description">Description</label> | |
421d935d C |
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 | ||
be27ef3b | 48 | <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="true"></my-markdown-textarea> |
63347a0f C |
49 | |
50 | <div *ngIf="formErrors.description" class="form-error"> | |
51 | {{ formErrors.description }} | |
52 | </div> | |
53 | </div> | |
6de36768 | 54 | </div> |
6de36768 | 55 | |
6f02515e | 56 | <div class="col-video-edit"> |
63347a0f | 57 | <div class="form-group"> |
02c01341 RK |
58 | <label i18n for="channel">Channel</label> |
59 | <my-select-channel labelForId="channel" [items]="userVideoChannels" formControlName="channelId"></my-select-channel> | |
63347a0f C |
60 | </div> |
61 | ||
62 | <div class="form-group"> | |
63 | <label i18n for="category">Category</label> | |
02c01341 RK |
64 | <my-select-options |
65 | labelForId="category" [items]="videoCategories" formControlName="category" [clearable]="true" | |
66 | ></my-select-options> | |
63347a0f C |
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> | |
2b8d7a7d FS |
75 | |
76 | <my-help> | |
77 | <ng-template ptTemplate="customHtml"> | |
78 | <ng-container i18n> | |
7e6bdb5a | 79 | <a href="https://chooser-beta.creativecommons.org/" target="_blank" rel="noopener noreferrer">Choose</a> the appropriate licence for your work. |
2b8d7a7d FS |
80 | </ng-container> |
81 | </ng-template> | |
82 | </my-help> | |
83 | ||
02c01341 RK |
84 | <my-select-options |
85 | labelForId="licence" [items]="videoLicences" formControlName="licence" [clearable]="true" | |
86 | ></my-select-options> | |
63347a0f C |
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> | |
02c01341 RK |
95 | <my-select-options |
96 | labelForId="language" [items]="videoLanguages" formControlName="language" | |
97 | [clearable]="true" [searchable]="true" [groupBy]="'group'" | |
98 | ></my-select-options> | |
63347a0f C |
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> | |
02c01341 RK |
107 | <my-select-options |
108 | labelForId="privacy" [items]="videoPrivacies" formControlName="privacy" [clearable]="false" | |
109 | ></my-select-options> | |
63347a0f C |
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" | |
8e0a2f2a | 120 | [firstDayOfWeek]="0" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true" |
63347a0f C |
121 | > |
122 | </p-calendar> | |
123 | ||
124 | <div *ngIf="formErrors.schedulePublicationAt" class="form-error"> | |
125 | {{ formErrors.schedulePublicationAt }} | |
126 | </div> | |
127 | </div> | |
128 | ||
421d935d C |
129 | <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right"> |
130 | <ng-template ptTemplate="label"> | |
02c01341 | 131 | <ng-container i18n>Contains sensitive content</ng-container> |
421d935d C |
132 | </ng-template> |
133 | ||
134 | <ng-template ptTemplate="help"> | |
2d6f28a2 | 135 | <ng-container i18n>Some instances hide videos containing mature or explicit content by default.</ng-container> |
421d935d C |
136 | </ng-template> |
137 | </my-peertube-checkbox> | |
138 | ||
ddb62a85 | 139 | <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right"> |
421d935d | 140 | <ng-template ptTemplate="label"> |
02c01341 | 141 | <ng-container i18n>Publish after transcoding</ng-container> |
421d935d C |
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> | |
6de36768 | 148 | |
6de36768 C |
149 | </div> |
150 | </div> | |
63347a0f | 151 | </ng-template> |
45c6bcf3 C |
152 | </ng-container> |
153 | ||
b5b68755 | 154 | <ng-container ngbNavItem *ngIf="!liveVideo"> |
45c6bcf3 | 155 | <a ngbNavLink i18n>Captions</a> |
63347a0f | 156 | |
45c6bcf3 | 157 | <ng-template ngbNavContent> |
63347a0f C |
158 | <div class="captions"> |
159 | ||
160 | <div class="captions-header"> | |
161 | <a (click)="openAddCaptionModal()" class="create-caption"> | |
6ad971d5 | 162 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> |
63347a0f C |
163 | <ng-container i18n>Add another caption</ng-container> |
164 | </a> | |
6de36768 | 165 | </div> |
6de36768 | 166 | |
63347a0f | 167 | <div class="form-group" *ngFor="let videoCaption of videoCaptions"> |
6de36768 | 168 | |
63347a0f C |
169 | <div class="caption-entry"> |
170 | <ng-container *ngIf="!videoCaption.action"> | |
171 | <a | |
172 | i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer" | |
173 | [href]="videoCaption.captionPath" | |
174 | >{{ videoCaption.language.label }}</a> | |
6de36768 | 175 | |
cc3d1dce | 176 | <div i18n class="caption-entry-state">Already uploaded ✔</div> |
6de36768 | 177 | |
63347a0f C |
178 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span> |
179 | </ng-container> | |
6de36768 | 180 | |
63347a0f C |
181 | <ng-container *ngIf="videoCaption.action === 'CREATE'"> |
182 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
6de36768 | 183 | |
cc3d1dce | 184 | <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div> |
6de36768 | 185 | |
63347a0f C |
186 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span> |
187 | </ng-container> | |
6de36768 | 188 | |
63347a0f C |
189 | <ng-container *ngIf="videoCaption.action === 'REMOVE'"> |
190 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
6de36768 | 191 | |
cc3d1dce | 192 | <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div> |
bbe0f064 | 193 | |
63347a0f C |
194 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span> |
195 | </ng-container> | |
196 | </div> | |
bbe0f064 | 197 | </div> |
bbe0f064 | 198 | |
cc3d1dce | 199 | <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0"> |
63347a0f | 200 | No captions for now. |
40e87e9e | 201 | </div> |
40e87e9e | 202 | |
6de36768 | 203 | </div> |
63347a0f | 204 | </ng-template> |
45c6bcf3 C |
205 | </ng-container> |
206 | ||
a5cf76af | 207 | <ng-container ngbNavItem *ngIf="liveVideo"> |
c6c0fa6c C |
208 | <a ngbNavLink i18n>Live settings</a> |
209 | ||
210 | <ng-template ngbNavContent> | |
211 | <div class="row live-settings"> | |
212 | <div class="col-md-12"> | |
cd5dc718 C |
213 | <div class="alert alert-info"> |
214 | <my-live-documentation-link></my-live-documentation-link> | |
215 | </div> | |
c6c0fa6c C |
216 | |
217 | <div class="form-group"> | |
a5cf76af | 218 | <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label> |
1916c966 | 219 | <my-input-toggle-hidden inputId="liveVideoRTMPUrl" [value]="liveVideo.rtmpUrl" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden> |
c6c0fa6c C |
220 | </div> |
221 | ||
222 | <div class="form-group"> | |
a5cf76af | 223 | <label for="liveVideoStreamKey" i18n>Live stream key</label> |
1916c966 | 224 | <my-input-toggle-hidden inputId="liveVideoStreamKey" [value]="liveVideo.streamKey" [withCopy]="true" [readonly]="true"></my-input-toggle-hidden> |
c29039e7 C |
225 | |
226 | <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div> | |
c6c0fa6c | 227 | </div> |
b5b68755 | 228 | |
bb4ba6d9 C |
229 | <div class="form-group"> |
230 | <my-peertube-checkbox inputName="liveVideoPermanentLive" formControlName="permanentLive"> | |
231 | <ng-template ptTemplate="label"> | |
232 | <ng-container i18n>This is a permanent live</ng-container> | |
233 | </ng-template> | |
234 | ||
235 | <ng-container ngProjectAs="description"> | |
236 | <span i18n>You can stream multiple times in a permanent live. The URL for your viewers won't change but you cannot save replays of your lives</span> | |
237 | </ng-container> | |
238 | </my-peertube-checkbox> | |
239 | </div> | |
240 | ||
b5b68755 C |
241 | <div class="form-group" *ngIf="isSaveReplayEnabled()"> |
242 | <my-peertube-checkbox inputName="liveVideoSaveReplay" formControlName="saveReplay"> | |
243 | <ng-template ptTemplate="label"> | |
244 | <ng-container i18n>Automatically publish a replay when your live ends</ng-container> | |
245 | </ng-template> | |
246 | ||
247 | <ng-container ngProjectAs="description"> | |
248 | <span i18n>⚠️ If you enable this option, your live will be terminated if you exceed your video quota</span> | |
249 | </ng-container> | |
250 | </my-peertube-checkbox> | |
251 | </div> | |
c6c0fa6c C |
252 | </div> |
253 | </div> | |
254 | </ng-template> | |
255 | ||
256 | </ng-container> | |
257 | ||
258 | ||
45c6bcf3 C |
259 | <ng-container ngbNavItem> |
260 | <a ngbNavLink i18n>Advanced settings</a> | |
63347a0f | 261 | |
45c6bcf3 | 262 | <ng-template ngbNavContent> |
6913f691 C |
263 | <div class="row advanced-settings"> |
264 | <div class="col-md-12 col-xl-8"> | |
6de36768 | 265 | |
6913f691 | 266 | <div class="form-group"> |
7b992a86 C |
267 | <label i18n for="previewfile">Video preview</label> |
268 | ||
269 | <my-preview-upload | |
270 | i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile" | |
6913f691 | 271 | previewWidth="360px" previewHeight="200px" |
7b992a86 | 272 | ></my-preview-upload> |
6913f691 | 273 | </div> |
07fa4c97 | 274 | |
6913f691 C |
275 | <div class="form-group"> |
276 | <label i18n for="support">Support</label> | |
9e8929d6 RK |
277 | <my-help helpType="markdownEnhanced"> |
278 | <ng-template ptTemplate="preHtml"> | |
279 | <ng-container i18n> | |
280 | Short text to tell people how they can support you (membership platform...). | |
281 | </ng-container> | |
282 | </ng-template> | |
283 | </my-help> | |
6913f691 | 284 | <my-markdown-textarea |
b15fe00f | 285 | id="support" formControlName="support" markdownType="enhanced" |
6913f691 C |
286 | [classes]="{ 'input-error': formErrors['support'] }" |
287 | ></my-markdown-textarea> | |
288 | <div *ngIf="formErrors.support" class="form-error"> | |
289 | {{ formErrors.support }} | |
290 | </div> | |
63347a0f | 291 | </div> |
07fa4c97 | 292 | </div> |
501e9611 | 293 | |
6913f691 C |
294 | <div class="col-md-12 col-xl-4"> |
295 | <div class="form-group originally-published-at"> | |
296 | <label i18n for="originallyPublishedAt">Original publication date</label> | |
9e8929d6 RK |
297 | <my-help> |
298 | <ng-template ptTemplate="preHtml"> | |
299 | <ng-container i18n> | |
300 | This is the date when the content was originally published (e.g. the release date for a film) | |
301 | </ng-container> | |
302 | </ng-template> | |
303 | </my-help> | |
6913f691 | 304 | <p-calendar |
8e0a2f2a C |
305 | id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" [firstDayOfWeek]="0" |
306 | [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange" | |
6913f691 C |
307 | > |
308 | </p-calendar> | |
309 | ||
310 | <div *ngIf="formErrors.originallyPublishedAt" class="form-error"> | |
311 | {{ formErrors.originallyPublishedAt }} | |
312 | </div> | |
313 | </div> | |
314 | ||
315 | <my-peertube-checkbox | |
316 | inputName="commentsEnabled" formControlName="commentsEnabled" | |
317 | i18n-labelText labelText="Enable video comments" | |
318 | ></my-peertube-checkbox> | |
501e9611 | 319 | |
6913f691 C |
320 | <my-peertube-checkbox |
321 | inputName="downloadEnabled" formControlName="downloadEnabled" | |
322 | i18n-labelText labelText="Enable download" | |
323 | ></my-peertube-checkbox> | |
324 | </div> | |
07fa4c97 | 325 | </div> |
63347a0f | 326 | </ng-template> |
45c6bcf3 | 327 | </ng-container> |
ff249f49 | 328 | |
7294aab0 C |
329 | <ng-container ngbNavItem *ngIf="pluginFields.length !== 0"> |
330 | <a ngbNavLink i18n>Plugin settings</a> | |
331 | ||
332 | <ng-template ngbNavContent> | |
333 | <div class="row plugin-settings"> | |
334 | ||
335 | <div class="col-md-12 col-xl-8"> | |
0f319334 | 336 | <div *ngFor="let pluginSetting of pluginFields" class="form-group" [hidden]="isPluginFieldHidden(pluginSetting)"> |
7294aab0 C |
337 | <my-dynamic-form-field [form]="pluginDataFormGroup" [formErrors]="formErrors" [setting]="pluginSetting.commonOptions"></my-dynamic-form-field> |
338 | </div> | |
339 | </div> | |
340 | ||
341 | </div> | |
342 | </ng-template> | |
343 | </ng-container> | |
45c6bcf3 | 344 | </div> |
47564bbe | 345 | |
45c6bcf3 | 346 | <div [ngbNavOutlet]="nav"></div> |
ff249f49 | 347 | </div> |
40e87e9e C |
348 | |
349 | <my-video-caption-add-modal | |
ddb62a85 | 350 | #videoCaptionAddModal [existingCaptions]="getExistingCaptions()" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)" |
b0c36821 | 351 | ></my-video-caption-add-modal> |