]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-watch/video-watch.component.html
Fix live tests
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.html
CommitLineData
9a18a625 1<div class="root" [ngClass]="{ 'theater-enabled': theaterEnabled }">
897ec54d 2 <!-- We need the video container for videojs so we just hide it -->
e2f01c47 3 <div id="video-wrapper">
6d88de72
C
4 <div *ngIf="remoteServerDown" class="remote-server-down">
5 Sorry, but this video is not available because the remote instance is not responding.
6 <br />
7 Please try again later.
8 </div>
e2f01c47
C
9
10 <div id="videojs-wrapper"></div>
11
72675ebe
C
12 <my-video-watch-playlist
13 #videoWatchPlaylist
d142c7b9
C
14 [playlist]="playlist" class="playlist"
15 (videoFound)="onPlaylistVideoFound($event)"
72675ebe 16 ></my-video-watch-playlist>
d1992b93 17 </div>
897ec54d 18
2b3f1919
C
19 <div class="row">
20 <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToImport()">
21 The video is being imported, it will be available when the import is finished.
22 </div>
516df59b 23
2b3f1919
C
24 <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToTranscode()">
25 The video is being transcoded, it may not work properly.
26 </div>
2186386c 27
2b3f1919
C
28 <div i18n class="col-md-12 alert alert-info" *ngIf="hasVideoScheduledPublication()">
29 This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
30 </div>
191764f3 31
a5cf76af
C
32 <div i18n class="col-md-12 alert alert-info" *ngIf="isWaitingForLive()">
33 This live has not started yet.
34 </div>
35
36 <div i18n class="col-md-12 alert alert-info" *ngIf="isLiveEnded()">
5c0904fc 37 This live has ended.
a5cf76af
C
38 </div>
39
2b3f1919 40 <div class="col-md-12 alert alert-danger" *ngIf="video?.blacklisted">
5baee5fc
RK
41 <div class="blocked-label" i18n>This video is blocked.</div>
42 {{ video.blockedReason }}
2b3f1919 43 </div>
bbe0f064
C
44 </div>
45
20206dfb 46 <!-- Video information -->
2303a803 47 <div *ngIf="video" class="margin-content video-bottom">
9a18a625
C
48 <div class="video-info">
49 <div class="video-info-first-row">
50 <div>
7fc441cc 51 <div class="d-block d-md-none"> <!-- only shown on medium devices, has its counterpart for larger viewports below -->
9a18a625 52 <h1 class="video-info-name">{{ video.name }}</h1>
7fc441cc 53
5c0904fc
C
54 <div class="video-info-date-views">
55 <ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container>
56
4ec25ae8 57 <span i18n [title]="video.getExactNumberOfViews()" class="views">
5c0904fc
C
58 • {{ video.views | myNumberFormatter }}
59 <ng-container *ngIf="!video.isLive">views</ng-container>
60 <ng-container *ngIf="video.isLive">viewers</ng-container>
61 </span>
9a18a625
C
62 </div>
63 </div>
64
7fc441cc 65 <div class="d-flex justify-content-between flex-direction-column">
9a18a625 66 <div class="d-none d-md-block">
f845c683 67 <h1 class="video-info-name">{{ video.name }}</h1>
7fc441cc 68 </div>
9a18a625 69
7fc441cc 70 <div class="video-info-first-row-bottom">
5c0904fc
C
71 <div class="d-none d-md-block video-info-date-views">
72 <ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container>
73
4ec25ae8 74 <span i18n [title]="video.getExactNumberOfViews()" class="views">
5c0904fc
C
75 • {{ video.views | myNumberFormatter }}
76 <ng-container *ngIf="!video.isLive">views</ng-container>
77 <ng-container *ngIf="video.isLive">viewers</ng-container>
78 </span>
2d9fea16 79 </div>
2d9fea16 80
7fc441cc 81 <div class="video-actions-rates">
214ff6fa 82 <ng-template #ratePopoverText>
83 <span [innerHTML]="getRatePopoverText()"></span>
84 </ng-template>
85
7fc441cc 86 <div class="video-actions fullWidth justify-content-end">
adcf9212 87 <button
214ff6fa 88 [ngbPopover]="getRatePopoverText() && ratePopoverText" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()" (keyup.enter)="setLike()"
adcf9212 89 class="action-button action-button-like" [attr.aria-pressed]="userRating === 'like'" [attr.aria-label]="tooltipLike"
94dfca3e
RK
90 [ngbTooltip]="tooltipLike"
91 placement="bottom auto"
7fc441cc
RK
92 >
93 <my-global-icon iconName="like"></my-global-icon>
94 <span *ngIf="video.likes" class="count">{{ video.likes }}</span>
adcf9212 95 </button>
2d3741d6 96
adcf9212 97 <button
214ff6fa 98 [ngbPopover]="getRatePopoverText() && ratePopoverText" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()" (keyup.enter)="setDislike()"
adcf9212 99 class="action-button action-button-dislike" [attr.aria-pressed]="userRating === 'dislike'" [attr.aria-label]="tooltipDislike"
94dfca3e
RK
100 [ngbTooltip]="tooltipDislike"
101 placement="bottom auto"
7fc441cc
RK
102 >
103 <my-global-icon iconName="dislike"></my-global-icon>
104 <span *ngIf="video.dislikes" class="count">{{ video.dislikes }}</span>
adcf9212 105 </button>
3adf3196 106
adcf9212 107 <button *ngIf="video.support" (click)="showSupportModal()" (keyup.enter)="showSupportModal()" class="action-button action-button-support" [attr.aria-label]="tooltipSupport"
94dfca3e
RK
108 [ngbTooltip]="tooltipSupport"
109 placement="bottom auto"
110 >
adcf9212 111 <my-global-icon iconName="support" aria-hidden="true"></my-global-icon>
14571f19 112 <span class="icon-text" i18n>SUPPORT</span>
adcf9212 113 </button>
3adf3196 114
adcf9212 115 <button (click)="showShareModal()" (keyup.enter)="showShareModal()" class="action-button">
6ad971d5 116 <my-global-icon iconName="share" aria-hidden="true"></my-global-icon>
14571f19 117 <span class="icon-text" i18n>SHARE</span>
adcf9212 118 </button>
3adf3196 119
7fc441cc
RK
120 <div
121 class="action-dropdown" ngbDropdown placement="top" role="button" autoClose="outside"
122 *ngIf="isUserLoggedIn()" (openChange)="addContent.openChange($event)"
94dfca3e
RK
123 [ngbTooltip]="tooltipSaveToPlaylist"
124 placement="bottom auto"
7fc441cc 125 >
adcf9212 126 <button class="action-button action-button-save" ngbDropdownToggle>
6ad971d5 127 <my-global-icon iconName="playlist-add" aria-hidden="true"></my-global-icon>
14571f19 128 <span class="icon-text" i18n>SAVE</span>
adcf9212 129 </button>
3adf3196 130
7fc441cc
RK
131 <div ngbDropdownMenu>
132 <my-video-add-to-playlist #addContent [video]="video"></my-video-add-to-playlist>
133 </div>
134 </div>
3adf3196 135
a5cf76af 136 <ng-container *ngIf="!isUserLoggedIn() && !isLive()">
6863f814
RK
137 <button
138 *ngIf="isVideoDownloadable()" class="action-button action-button-save"
139 (click)="showDownloadModal()" (keydown.enter)="showDownloadModal()"
140 >
141 <my-global-icon iconName="download" aria-hidden="true"></my-global-icon>
142 <span class="icon-text d-none d-sm-inline" i18n>DOWNLOAD</span>
143 </button>
82f443de 144
6863f814
RK
145 <my-video-download #videoDownloadModal></my-video-download>
146 </ng-container>
82f443de 147
6863f814
RK
148 <ng-container *ngIf="isUserLoggedIn()">
149 <my-video-actions-dropdown
150 placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions"
f8c00564 151 [displayOptions]="videoActionsOptions" (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()"
6863f814
RK
152 ></my-video-actions-dropdown>
153 </ng-container>
9a18a625 154 </div>
3adf3196 155
223b24e6 156 <div class="video-info-likes-dislikes-bar-outer-container">
2de7f588 157 <div
223b24e6 158 class="video-info-likes-dislikes-bar-inner-container"
2de7f588
RK
159 *ngIf="video.likes !== 0 || video.dislikes !== 0"
160 [ngbTooltip]="likesBarTooltipText"
161 placement="bottom"
162 >
163 <div
164 class="video-info-likes-dislikes-bar"
165 >
0240da5c 166 <div class="likes-bar" [ngClass]="{ 'liked': userRating !== 'none' }" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
2de7f588
RK
167 </div>
168 </div>
9a18a625 169 </div>
9a18a625 170 </div>
2d3741d6 171
9a18a625
C
172 <div
173 class="video-info-likes-dislikes-bar"
174 *ngIf="video.likes !== 0 || video.dislikes !== 0"
175 [ngbTooltip]="likesBarTooltipText"
176 placement="bottom"
177 >
178 <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
2d9fea16 179 </div>
1f788f20 180 </div>
9a18a625 181 </div>
6a9e1d42 182
07fa4c97 183
dd4f25ee
RK
184 <div class="pt-3 border-top video-info-channel d-flex">
185 <div class="video-info-channel-left d-flex">
69524f6e 186 <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel>
62fca05d 187
dd4f25ee 188 <div class="video-info-channel-left-links ml-1">
b40a2193
K
189 <ng-container *ngIf="!isChannelDisplayNameGeneric()">
190 <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" i18n-title title="Channel page">
191 {{ video.channel.displayName }}
192 </a>
193 <a [routerLink]="[ '/accounts', video.byAccount ]" i18n-title title="Account page">
194 <span i18n>By {{ video.byAccount }}</span>
195 </a>
196 </ng-container>
197
198 <ng-container *ngIf="isChannelDisplayNameGeneric()">
199 <a [routerLink]="[ '/accounts', video.byAccount ]" class="single-link" i18n-title title="Account page">
200 <span i18n>{{ video.byAccount }}</span>
201 </a>
202 </ng-container>
dd4f25ee
RK
203 </div>
204 </div>
63347a0f 205
41eb700f 206 <my-subscribe-button #subscribeButton [videoChannels]="[video.channel]" size="small"></my-subscribe-button>
2d9fea16 207 </div>
2d9fea16 208 </div>
26b7305a 209
9a18a625 210 </div>
191764f3 211
dd4f25ee 212 <div class="video-info-description">
b29bf61d
RK
213 <div
214 class="video-info-description-html"
208c7e92 215 [innerHTML]="videoHTMLDescription"
b29bf61d
RK
216 (timestampClicked)="handleTimestampClicked($event)"
217 timestampRouteTransformer
218 ></div>
d07137b9 219
9a18a625
C
220 <div class="video-info-description-more" *ngIf="completeDescriptionShown === false && video.description?.length >= 250" (click)="showMoreDescription()">
221 <ng-container i18n>Show more</ng-container>
222 <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-down"></span>
223 <my-small-loader class="description-loading" [loading]="descriptionLoading"></my-small-loader>
1f788f20 224 </div>
09223546 225
9a18a625
C
226 <div *ngIf="completeDescriptionShown === true" (click)="showLessDescription()" class="video-info-description-more">
227 <ng-container i18n>Show less</ng-container>
228 <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-up"></span>
229 </div>
230 </div>
adb115f5 231
dd4f25ee 232 <div class="video-attributes mb-3">
9a18a625
C
233 <div class="video-attribute">
234 <span i18n class="video-attribute-label">Privacy</span>
235 <span class="video-attribute-value">{{ video.privacy.label }}</span>
236 </div>
2de96f4d 237
c910f667
C
238 <div *ngIf="video.isLocal === false" class="video-attribute">
239 <span i18n class="video-attribute-label">Origin instance</span>
240 <a class="video-attribute-value" target="_blank" rel="noopener noreferrer" [href]="video.originInstanceUrl">{{ video.originInstanceHost }}</a>
241 </div>
242
9a18a625
C
243 <div *ngIf="!!video.originallyPublishedAt" class="video-attribute">
244 <span i18n class="video-attribute-label">Originally published</span>
245 <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span>
246 </div>
2de96f4d 247
9a18a625
C
248 <div class="video-attribute">
249 <span i18n class="video-attribute-label">Category</span>
250 <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span>
251 <a
252 *ngIf="video.category.id" class="video-attribute-value"
253 [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }"
254 >{{ video.category.label }}</a>
255 </div>
db216afd 256
9a18a625
C
257 <div class="video-attribute">
258 <span i18n class="video-attribute-label">Licence</span>
259 <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span>
260 <a
261 *ngIf="video.licence.id" class="video-attribute-value"
262 [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }"
263 >{{ video.licence.label }}</a>
264 </div>
fd45e8f4 265
9a18a625
C
266 <div class="video-attribute">
267 <span i18n class="video-attribute-label">Language</span>
268 <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span>
269 <a
270 *ngIf="video.language.id" class="video-attribute-value"
271 [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }"
272 >{{ video.language.label }}</a>
20206dfb 273 </div>
09223546 274
9a18a625
C
275 <div class="video-attribute video-attribute-tags">
276 <span i18n class="video-attribute-label">Tags</span>
277 <a
278 *ngFor="let tag of getVideoTags()"
279 class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }"
280 >{{ tag }}</a>
281 </div>
df8340b7 282
da0310f8 283 <div class="video-attribute" *ngIf="!video.isLive">
df8340b7 284 <span i18n class="video-attribute-label">Duration</span>
b5b68755 285 <span class="video-attribute-value">{{ video.duration | myDurationFormatter }}</span>
62fca05d 286 </div>
3b766e18
RK
287 </div>
288
b29bf61d
RK
289 <my-video-comments
290 class="border-top"
291 [video]="video"
292 [user]="user"
293 (timestampClicked)="handleTimestampClicked($event)"
294 ></my-video-comments>
d1992b93 295 </div>
9a18a625 296
6aa54148 297 <my-recommended-videos
5c20a455 298 [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }"
5c20a455
C
299 [playlist]="playlist"
300 (gotRecommendations)="onRecommendations($event)"
6aa54148 301 ></my-recommended-videos>
d1992b93 302 </div>
8ff3f883 303
2b3f1919 304 <div class="row privacy-concerns" *ngIf="hasAlreadyAcceptedPrivacyConcern === false">
2b3b76ab 305 <div class="privacy-concerns-text">
52e3beb9
RK
306 <span class="mr-2">
307 <strong i18n>Friendly Reminder: </strong>
308 <ng-container i18n>
309 the sharing system used for this video implies that some technical information about your system (such as a public IP address) can be sent to other peers.
310 </ng-container>
d3217560 311 </span>
5411da31 312 <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about/peertube#privacy">More information</a>
2b3b76ab
C
313 </div>
314
d3217560 315 <div i18n class="privacy-concerns-button privacy-concerns-okay" (click)="acceptedPrivacyConcern()">
52e3beb9 316 OK
2b3b76ab
C
317 </div>
318 </div>
b59f12b0 319</div>
d1992b93 320
5a71acd2 321<ng-container *ngIf="video !== null">
1f3a605e 322 <my-video-support #videoSupportModal [video]="video"></my-video-support>
3a1fed11 323 <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share>
5a71acd2 324</ng-container>