]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-edit/shared/video-edit.component.html
Live streaming implementation first step
[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
45c6bcf3
C
4 <ng-container ngbNavItem>
5 <a ngbNavLink i18n>Basic info</a>
6
7 <ng-template ngbNavContent>
63347a0f 8 <div class="row">
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>
02c01341
RK
75 <my-select-options
76 labelForId="licence" [items]="videoLicences" formControlName="licence" [clearable]="true"
77 ></my-select-options>
63347a0f
C
78
79 <div *ngIf="formErrors.licence" class="form-error">
80 {{ formErrors.licence }}
81 </div>
82 </div>
83
84 <div class="form-group">
85 <label i18n for="language">Language</label>
02c01341
RK
86 <my-select-options
87 labelForId="language" [items]="videoLanguages" formControlName="language"
88 [clearable]="true" [searchable]="true" [groupBy]="'group'"
89 ></my-select-options>
63347a0f
C
90
91 <div *ngIf="formErrors.language" class="form-error">
92 {{ formErrors.language }}
93 </div>
94 </div>
95
96 <div class="form-group">
97 <label i18n for="privacy">Privacy</label>
02c01341
RK
98 <my-select-options
99 labelForId="privacy" [items]="videoPrivacies" formControlName="privacy" [clearable]="false"
100 ></my-select-options>
63347a0f
C
101
102 <div *ngIf="formErrors.privacy" class="form-error">
103 {{ formErrors.privacy }}
104 </div>
105 </div>
106
107 <div *ngIf="schedulePublicationEnabled" class="form-group">
108 <label i18n for="schedulePublicationAt">Schedule publication ({{ calendarTimezone }})</label>
109 <p-calendar
110 id="schedulePublicationAt" formControlName="schedulePublicationAt" [dateFormat]="calendarDateFormat"
111 [locale]="calendarLocale" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true"
112 >
113 </p-calendar>
114
115 <div *ngIf="formErrors.schedulePublicationAt" class="form-error">
116 {{ formErrors.schedulePublicationAt }}
117 </div>
118 </div>
119
421d935d
C
120 <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right">
121 <ng-template ptTemplate="label">
02c01341 122 <ng-container i18n>Contains sensitive content</ng-container>
421d935d
C
123 </ng-template>
124
125 <ng-template ptTemplate="help">
126 <ng-container i18n>Some instances do not list videos containing mature or explicit content by default.</ng-container>
127 </ng-template>
128 </my-peertube-checkbox>
129
130 <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
131 <ng-template ptTemplate="label">
02c01341 132 <ng-container i18n>Publish after transcoding</ng-container>
421d935d
C
133 </ng-template>
134
135 <ng-template ptTemplate="help">
136 <ng-container i18n>If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends.</ng-container>
137 </ng-template>
138 </my-peertube-checkbox>
6de36768 139
6de36768
C
140 </div>
141 </div>
63347a0f 142 </ng-template>
45c6bcf3
C
143 </ng-container>
144
145 <ng-container ngbNavItem>
146 <a ngbNavLink i18n>Captions</a>
63347a0f 147
45c6bcf3 148 <ng-template ngbNavContent>
63347a0f
C
149 <div class="captions">
150
151 <div class="captions-header">
152 <a (click)="openAddCaptionModal()" class="create-caption">
6ad971d5 153 <my-global-icon iconName="add" aria-hidden="true"></my-global-icon>
63347a0f
C
154 <ng-container i18n>Add another caption</ng-container>
155 </a>
6de36768 156 </div>
6de36768 157
63347a0f 158 <div class="form-group" *ngFor="let videoCaption of videoCaptions">
6de36768 159
63347a0f
C
160 <div class="caption-entry">
161 <ng-container *ngIf="!videoCaption.action">
162 <a
163 i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer"
164 [href]="videoCaption.captionPath"
165 >{{ videoCaption.language.label }}</a>
6de36768 166
cc3d1dce 167 <div i18n class="caption-entry-state">Already uploaded &#10004;</div>
6de36768 168
63347a0f
C
169 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span>
170 </ng-container>
6de36768 171
63347a0f
C
172 <ng-container *ngIf="videoCaption.action === 'CREATE'">
173 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
6de36768 174
cc3d1dce 175 <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div>
6de36768 176
63347a0f
C
177 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span>
178 </ng-container>
6de36768 179
63347a0f
C
180 <ng-container *ngIf="videoCaption.action === 'REMOVE'">
181 <span class="caption-entry-label">{{ videoCaption.language.label }}</span>
6de36768 182
cc3d1dce 183 <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div>
bbe0f064 184
63347a0f
C
185 <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span>
186 </ng-container>
187 </div>
bbe0f064 188 </div>
bbe0f064 189
cc3d1dce 190 <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0">
63347a0f 191 No captions for now.
40e87e9e 192 </div>
40e87e9e 193
6de36768 194 </div>
63347a0f 195 </ng-template>
45c6bcf3
C
196 </ng-container>
197
c6c0fa6c
C
198 <ng-container ngbNavItem *ngIf="videoLive">
199 <a ngbNavLink i18n>Live settings</a>
200
201 <ng-template ngbNavContent>
202 <div class="row live-settings">
203 <div class="col-md-12">
204
205 <div class="form-group">
206 <label for="videoLiveRTMPUrl" i18n>Live RTMP Url</label>
207 <my-input-readonly-copy id="videoLiveRTMPUrl" [value]="videoLive.rtmpUrl"></my-input-readonly-copy>
208 </div>
209
210 <div class="form-group">
211 <label for="videoLiveStreamKey" i18n>Live stream key</label>
212 <my-input-readonly-copy id="videoLiveStreamKey" [value]="videoLive.streamKey"></my-input-readonly-copy>
213 </div>
214 </div>
215 </div>
216 </ng-template>
217
218 </ng-container>
219
220
45c6bcf3
C
221 <ng-container ngbNavItem>
222 <a ngbNavLink i18n>Advanced settings</a>
63347a0f 223
45c6bcf3 224 <ng-template ngbNavContent>
6913f691
C
225 <div class="row advanced-settings">
226 <div class="col-md-12 col-xl-8">
6de36768 227
6913f691 228 <div class="form-group">
7b992a86
C
229 <label i18n for="previewfile">Video preview</label>
230
231 <my-preview-upload
232 i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile"
6913f691 233 previewWidth="360px" previewHeight="200px"
7b992a86 234 ></my-preview-upload>
6913f691 235 </div>
07fa4c97 236
6913f691
C
237 <div class="form-group">
238 <label i18n for="support">Support</label>
9e8929d6
RK
239 <my-help helpType="markdownEnhanced">
240 <ng-template ptTemplate="preHtml">
241 <ng-container i18n>
242 Short text to tell people how they can support you (membership platform...).
243 </ng-container>
244 </ng-template>
245 </my-help>
6913f691 246 <my-markdown-textarea
b15fe00f 247 id="support" formControlName="support" markdownType="enhanced"
6913f691
C
248 [classes]="{ 'input-error': formErrors['support'] }"
249 ></my-markdown-textarea>
250 <div *ngIf="formErrors.support" class="form-error">
251 {{ formErrors.support }}
252 </div>
63347a0f 253 </div>
07fa4c97 254 </div>
501e9611 255
6913f691
C
256 <div class="col-md-12 col-xl-4">
257 <div class="form-group originally-published-at">
258 <label i18n for="originallyPublishedAt">Original publication date</label>
9e8929d6
RK
259 <my-help>
260 <ng-template ptTemplate="preHtml">
261 <ng-container i18n>
262 This is the date when the content was originally published (e.g. the release date for a film)
263 </ng-container>
264 </ng-template>
265 </my-help>
6913f691
C
266 <p-calendar
267 id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat"
268 [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange"
269 >
270 </p-calendar>
271
272 <div *ngIf="formErrors.originallyPublishedAt" class="form-error">
273 {{ formErrors.originallyPublishedAt }}
274 </div>
275 </div>
276
277 <my-peertube-checkbox
278 inputName="commentsEnabled" formControlName="commentsEnabled"
279 i18n-labelText labelText="Enable video comments"
280 ></my-peertube-checkbox>
501e9611 281
6913f691
C
282 <my-peertube-checkbox
283 inputName="downloadEnabled" formControlName="downloadEnabled"
284 i18n-labelText labelText="Enable download"
285 ></my-peertube-checkbox>
286 </div>
07fa4c97 287 </div>
63347a0f 288 </ng-template>
45c6bcf3 289 </ng-container>
ff249f49 290
7294aab0
C
291 <ng-container ngbNavItem *ngIf="pluginFields.length !== 0">
292 <a ngbNavLink i18n>Plugin settings</a>
293
294 <ng-template ngbNavContent>
295 <div class="row plugin-settings">
296
297 <div class="col-md-12 col-xl-8">
298 <div *ngFor="let pluginSetting of pluginFields" class="form-group">
299 <my-dynamic-form-field [form]="pluginDataFormGroup" [formErrors]="formErrors" [setting]="pluginSetting.commonOptions"></my-dynamic-form-field>
300 </div>
301 </div>
302
303 </div>
304 </ng-template>
305 </ng-container>
45c6bcf3 306 </div>
47564bbe 307
45c6bcf3 308 <div [ngbNavOutlet]="nav"></div>
ff249f49 309</div>
40e87e9e
C
310
311<my-video-caption-add-modal
ba430d75 312 #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)"
b0c36821 313></my-video-caption-add-modal>