]>
Commit | Line | Data |
---|---|---|
f6d6e7f8 | 1 | <div *ngIf="!isUploadingVideo" class="upload-video-container" dragDrop (fileDropped)="onFileDropped($event)"> |
457bb213 | 2 | <div class="first-step-block"> |
adcf9212 | 3 | <my-global-icon class="upload-icon" iconName="upload" aria-hidden="true"></my-global-icon> |
fbad87b0 | 4 | |
c9ff8a08 | 5 | <div class="button-file form-control" [ngbTooltip]="'(extensions: ' + videoExtensions + ')'"> |
fbad87b0 | 6 | <span i18n>Select the file to upload</span> |
1916c966 | 7 | <input |
f6d6e7f8 | 8 | aria-label="Select the file to upload" |
9 | i18n-aria-label | |
10 | #videofileInput | |
11 | [accept]="videoExtensions" | |
12 | (change)="onFileChange($event)" | |
13 | id="videofile" | |
14 | type="file" | |
1916c966 | 15 | /> |
fbad87b0 | 16 | </div> |
fbad87b0 C |
17 | |
18 | <div class="form-group form-group-channel"> | |
19 | <label i18n for="first-step-channel">Channel</label> | |
02c01341 RK |
20 | <my-select-channel |
21 | labelForId="first-step-channel" [items]="userVideoChannels" [(ngModel)]="firstStepChannelId" | |
22 | ></my-select-channel> | |
fbad87b0 C |
23 | </div> |
24 | ||
25 | <div class="form-group"> | |
26 | <label i18n for="first-step-privacy">Privacy</label> | |
02c01341 RK |
27 | <my-select-options |
28 | labelForId="first-step-privacy" [items]="videoPrivacies" [(ngModel)]="firstStepPrivacyId" | |
29 | ></my-select-options> | |
fbad87b0 | 30 | </div> |
7b992a86 C |
31 | |
32 | <ng-container *ngIf="isUploadingAudioFile"> | |
33 | <div class="form-group audio-preview"> | |
34 | <label i18n for="previewfileUpload">Video background image</label> | |
35 | ||
36 | <div i18n class="audio-image-info"> | |
37 | Image that will be merged with your audio file. | |
38 | <br /> | |
39 | The chosen image will be definitive and cannot be modified. | |
40 | </div> | |
41 | ||
42 | <my-preview-upload | |
43 | i18n-inputLabel inputLabel="Edit" inputName="previewfileUpload" [(ngModel)]="previewfileUpload" | |
44 | previewWidth="360px" previewHeight="200px" | |
45 | ></my-preview-upload> | |
46 | </div> | |
47 | ||
48 | <div class="form-group upload-audio-button"> | |
f6d6e7f8 | 49 | <my-button |
50 | className="orange-button" | |
51 | [label]="getAudioUploadLabel()" | |
52 | icon="upload" | |
53 | (click)="uploadAudio()" | |
54 | > | |
55 | </my-button> | |
7b992a86 C |
56 | </div> |
57 | </ng-container> | |
fbad87b0 C |
58 | </div> |
59 | </div> | |
60 | ||
d4132d3f | 61 | <!-- Upload progress/cancel/error/success header --> |
7373507f | 62 | <div *ngIf="isUploadingVideo && !error" class="upload-progress-cancel"> |
d4132d3f | 63 | <div class="progress" i18n-title title="Total video uploaded"> |
e61151b0 RK |
64 | <div class="progress-bar" role="progressbar" [style]="{ width: videoUploadPercents + '%' }" [attr.aria-valuenow]="videoUploadPercents" aria-valuemin="0" [attr.aria-valuemax]="100"> |
65 | <span *ngIf="videoUploadPercents === 100 && videoUploaded === false" i18n>Processing…</span> | |
66 | <span *ngIf="videoUploadPercents !== 100 || videoUploaded">{{ videoUploadPercents }}%</span> | |
67 | </div> | |
68 | </div> | |
d4132d3f | 69 | <input *ngIf="videoUploaded === false" type="button" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" /> |
fbad87b0 C |
70 | </div> |
71 | ||
d4132d3f RK |
72 | <div *ngIf="error && enableRetryAfterError" class="upload-progress-retry"> |
73 | <div class="progress"> | |
74 | <div class="progress-bar red" role="progressbar" [style]="{ width: '100%' }" [attr.aria-valuenow]="100" aria-valuemin="0" [attr.aria-valuemax]="100"> | |
75 | <span>{{ error }}</span> | |
76 | </div> | |
77 | </div> | |
f6d6e7f8 | 78 | |
d4132d3f RK |
79 | <div class="btn-group" role="group"> |
80 | <input type="button" class="btn" i18n-value="Retry failed upload of a video" value="Retry" (click)="retryUpload()" /> | |
81 | <input type="button" class="btn" i18n-value="Cancel ongoing upload of a video" value="Cancel" (click)="cancelUpload()" /> | |
82 | </div> | |
83 | </div> | |
84 | ||
85 | <div *ngIf="error && !enableRetryAfterError" class="alert alert-danger"> | |
7373507f C |
86 | <div i18n>Sorry, but something went wrong</div> |
87 | {{ error }} | |
88 | </div> | |
89 | ||
674a66bb C |
90 | <div *ngIf="videoUploaded && !error" class="alert alert-info" i18n> |
91 | Congratulations! Your video is now available in your private library. | |
92 | </div> | |
93 | ||
fbad87b0 | 94 | <!-- Hidden because we want to load the component --> |
df8914c9 | 95 | <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form" class="mb-3"> |
fbad87b0 C |
96 | <my-video-edit |
97 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" | |
851f5daa | 98 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" |
ddb62a85 | 99 | [waitTranscodingEnabled]="true" |
7294aab0 | 100 | type="upload" |
fbad87b0 C |
101 | ></my-video-edit> |
102 | ||
103 | <div class="submit-container"> | |
104 | <div i18n *ngIf="videoUploaded === false" class="message-submit">Publish will be available when upload is finished</div> | |
105 | ||
1ef7f323 | 106 | <my-button className="orange-button" i18n-label label="Publish" icon="circle-tick" |
1fe1e14c RK |
107 | (click)="updateSecondStep()" (keydown.enter)="updateSecondStep()" |
108 | [disabled]="isPublishingButtonDisabled()" | |
109 | ></my-button> | |
fbad87b0 | 110 | </div> |
7373507f | 111 | </form> |