]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-watch/video-watch.component.html
Use playlistPosition for playlists instead of videoId
[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
2b3f1919 32 <div class="col-md-12 alert alert-danger" *ngIf="video?.blacklisted">
5baee5fc
RK
33 <div class="blocked-label" i18n>This video is blocked.</div>
34 {{ video.blockedReason }}
2b3f1919 35 </div>
bbe0f064
C
36 </div>
37
20206dfb 38 <!-- Video information -->
2303a803 39 <div *ngIf="video" class="margin-content video-bottom">
9a18a625
C
40 <div class="video-info">
41 <div class="video-info-first-row">
42 <div>
7fc441cc 43 <div class="d-block d-md-none"> <!-- only shown on medium devices, has its counterpart for larger viewports below -->
9a18a625 44 <h1 class="video-info-name">{{ video.name }}</h1>
7fc441cc 45
9a18a625 46 <div i18n class="video-info-date-views">
3921166d 47 Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle> <span class="views"> • {{ video.views | myNumberFormatter }} views</span>
9a18a625
C
48 </div>
49 </div>
50
7fc441cc 51 <div class="d-flex justify-content-between flex-direction-column">
9a18a625 52 <div class="d-none d-md-block">
f845c683 53 <h1 class="video-info-name">{{ video.name }}</h1>
7fc441cc 54 </div>
9a18a625 55
7fc441cc
RK
56 <div class="video-info-first-row-bottom">
57 <div i18n class="d-none d-md-block video-info-date-views">
3921166d 58 Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle> <span class="views"> • {{ video.views | myNumberFormatter }} views</span>
2d9fea16 59 </div>
2d9fea16 60
7fc441cc
RK
61 <div class="video-actions-rates">
62 <div class="video-actions fullWidth justify-content-end">
adcf9212
CC
63 <button
64 [ngbPopover]="getRatePopoverText()" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()" (keyup.enter)="setLike()"
65 class="action-button action-button-like" [attr.aria-pressed]="userRating === 'like'" [attr.aria-label]="tooltipLike"
94dfca3e
RK
66 [ngbTooltip]="tooltipLike"
67 placement="bottom auto"
7fc441cc
RK
68 >
69 <my-global-icon iconName="like"></my-global-icon>
70 <span *ngIf="video.likes" class="count">{{ video.likes }}</span>
adcf9212 71 </button>
2d3741d6 72
adcf9212
CC
73 <button
74 [ngbPopover]="getRatePopoverText()" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()" (keyup.enter)="setDislike()"
75 class="action-button action-button-dislike" [attr.aria-pressed]="userRating === 'dislike'" [attr.aria-label]="tooltipDislike"
94dfca3e
RK
76 [ngbTooltip]="tooltipDislike"
77 placement="bottom auto"
7fc441cc
RK
78 >
79 <my-global-icon iconName="dislike"></my-global-icon>
80 <span *ngIf="video.dislikes" class="count">{{ video.dislikes }}</span>
adcf9212 81 </button>
3adf3196 82
adcf9212 83 <button *ngIf="video.support" (click)="showSupportModal()" (keyup.enter)="showSupportModal()" class="action-button action-button-support" [attr.aria-label]="tooltipSupport"
94dfca3e
RK
84 [ngbTooltip]="tooltipSupport"
85 placement="bottom auto"
86 >
adcf9212 87 <my-global-icon iconName="support" aria-hidden="true"></my-global-icon>
14571f19 88 <span class="icon-text" i18n>SUPPORT</span>
adcf9212 89 </button>
3adf3196 90
adcf9212 91 <button (click)="showShareModal()" (keyup.enter)="showShareModal()" class="action-button">
6ad971d5 92 <my-global-icon iconName="share" aria-hidden="true"></my-global-icon>
14571f19 93 <span class="icon-text" i18n>SHARE</span>
adcf9212 94 </button>
3adf3196 95
7fc441cc
RK
96 <div
97 class="action-dropdown" ngbDropdown placement="top" role="button" autoClose="outside"
98 *ngIf="isUserLoggedIn()" (openChange)="addContent.openChange($event)"
94dfca3e
RK
99 [ngbTooltip]="tooltipSaveToPlaylist"
100 placement="bottom auto"
7fc441cc 101 >
adcf9212 102 <button class="action-button action-button-save" ngbDropdownToggle>
6ad971d5 103 <my-global-icon iconName="playlist-add" aria-hidden="true"></my-global-icon>
14571f19 104 <span class="icon-text" i18n>SAVE</span>
adcf9212 105 </button>
3adf3196 106
7fc441cc
RK
107 <div ngbDropdownMenu>
108 <my-video-add-to-playlist #addContent [video]="video"></my-video-add-to-playlist>
109 </div>
110 </div>
3adf3196 111
6863f814
RK
112 <ng-container *ngIf="!isUserLoggedIn()">
113 <button
114 *ngIf="isVideoDownloadable()" class="action-button action-button-save"
115 (click)="showDownloadModal()" (keydown.enter)="showDownloadModal()"
116 >
117 <my-global-icon iconName="download" aria-hidden="true"></my-global-icon>
118 <span class="icon-text d-none d-sm-inline" i18n>DOWNLOAD</span>
119 </button>
82f443de 120
6863f814
RK
121 <my-video-download #videoDownloadModal></my-video-download>
122 </ng-container>
82f443de 123
6863f814
RK
124 <ng-container *ngIf="isUserLoggedIn()">
125 <my-video-actions-dropdown
126 placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions"
127 (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()"
128 ></my-video-actions-dropdown>
129 </ng-container>
9a18a625 130 </div>
3adf3196 131
223b24e6 132 <div class="video-info-likes-dislikes-bar-outer-container">
2de7f588 133 <div
223b24e6 134 class="video-info-likes-dislikes-bar-inner-container"
2de7f588
RK
135 *ngIf="video.likes !== 0 || video.dislikes !== 0"
136 [ngbTooltip]="likesBarTooltipText"
137 placement="bottom"
138 >
139 <div
140 class="video-info-likes-dislikes-bar"
141 >
0240da5c 142 <div class="likes-bar" [ngClass]="{ 'liked': userRating !== 'none' }" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
2de7f588
RK
143 </div>
144 </div>
9a18a625 145 </div>
9a18a625 146 </div>
2d3741d6 147
9a18a625
C
148 <div
149 class="video-info-likes-dislikes-bar"
150 *ngIf="video.likes !== 0 || video.dislikes !== 0"
151 [ngbTooltip]="likesBarTooltipText"
152 placement="bottom"
153 >
154 <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
2d9fea16 155 </div>
1f788f20 156 </div>
9a18a625 157 </div>
6a9e1d42 158
07fa4c97 159
dd4f25ee
RK
160 <div class="pt-3 border-top video-info-channel d-flex">
161 <div class="video-info-channel-left d-flex">
b40a2193 162 <avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></avatar-channel>
62fca05d 163
dd4f25ee 164 <div class="video-info-channel-left-links ml-1">
b40a2193
K
165 <ng-container *ngIf="!isChannelDisplayNameGeneric()">
166 <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" i18n-title title="Channel page">
167 {{ video.channel.displayName }}
168 </a>
169 <a [routerLink]="[ '/accounts', video.byAccount ]" i18n-title title="Account page">
170 <span i18n>By {{ video.byAccount }}</span>
171 </a>
172 </ng-container>
173
174 <ng-container *ngIf="isChannelDisplayNameGeneric()">
175 <a [routerLink]="[ '/accounts', video.byAccount ]" class="single-link" i18n-title title="Account page">
176 <span i18n>{{ video.byAccount }}</span>
177 </a>
178 </ng-container>
dd4f25ee
RK
179 </div>
180 </div>
63347a0f 181
41eb700f 182 <my-subscribe-button #subscribeButton [videoChannels]="[video.channel]" size="small"></my-subscribe-button>
2d9fea16 183 </div>
2d9fea16 184 </div>
26b7305a 185
9a18a625 186 </div>
191764f3 187
dd4f25ee 188 <div class="video-info-description">
b29bf61d
RK
189 <div
190 class="video-info-description-html"
208c7e92 191 [innerHTML]="videoHTMLDescription"
b29bf61d
RK
192 (timestampClicked)="handleTimestampClicked($event)"
193 timestampRouteTransformer
194 ></div>
d07137b9 195
9a18a625
C
196 <div class="video-info-description-more" *ngIf="completeDescriptionShown === false && video.description?.length >= 250" (click)="showMoreDescription()">
197 <ng-container i18n>Show more</ng-container>
198 <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-down"></span>
199 <my-small-loader class="description-loading" [loading]="descriptionLoading"></my-small-loader>
1f788f20 200 </div>
09223546 201
9a18a625
C
202 <div *ngIf="completeDescriptionShown === true" (click)="showLessDescription()" class="video-info-description-more">
203 <ng-container i18n>Show less</ng-container>
204 <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-up"></span>
205 </div>
206 </div>
adb115f5 207
dd4f25ee 208 <div class="video-attributes mb-3">
9a18a625
C
209 <div class="video-attribute">
210 <span i18n class="video-attribute-label">Privacy</span>
211 <span class="video-attribute-value">{{ video.privacy.label }}</span>
212 </div>
2de96f4d 213
c910f667
C
214 <div *ngIf="video.isLocal === false" class="video-attribute">
215 <span i18n class="video-attribute-label">Origin instance</span>
216 <a class="video-attribute-value" target="_blank" rel="noopener noreferrer" [href]="video.originInstanceUrl">{{ video.originInstanceHost }}</a>
217 </div>
218
9a18a625
C
219 <div *ngIf="!!video.originallyPublishedAt" class="video-attribute">
220 <span i18n class="video-attribute-label">Originally published</span>
221 <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span>
222 </div>
2de96f4d 223
9a18a625
C
224 <div class="video-attribute">
225 <span i18n class="video-attribute-label">Category</span>
226 <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span>
227 <a
228 *ngIf="video.category.id" class="video-attribute-value"
229 [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }"
230 >{{ video.category.label }}</a>
231 </div>
db216afd 232
9a18a625
C
233 <div class="video-attribute">
234 <span i18n class="video-attribute-label">Licence</span>
235 <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span>
236 <a
237 *ngIf="video.licence.id" class="video-attribute-value"
238 [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }"
239 >{{ video.licence.label }}</a>
240 </div>
fd45e8f4 241
9a18a625
C
242 <div class="video-attribute">
243 <span i18n class="video-attribute-label">Language</span>
244 <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span>
245 <a
246 *ngIf="video.language.id" class="video-attribute-value"
247 [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }"
248 >{{ video.language.label }}</a>
20206dfb 249 </div>
09223546 250
9a18a625
C
251 <div class="video-attribute video-attribute-tags">
252 <span i18n class="video-attribute-label">Tags</span>
253 <a
254 *ngFor="let tag of getVideoTags()"
255 class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }"
256 >{{ tag }}</a>
257 </div>
df8340b7
RK
258
259 <div class="video-attribute">
260 <span i18n class="video-attribute-label">Duration</span>
261 <span class="video-attribute-value">{{ video.duration | myVideoDurationFormatter }}</span>
62fca05d 262 </div>
3b766e18
RK
263 </div>
264
b29bf61d
RK
265 <my-video-comments
266 class="border-top"
267 [video]="video"
268 [user]="user"
269 (timestampClicked)="handleTimestampClicked($event)"
270 ></my-video-comments>
d1992b93 271 </div>
9a18a625 272
6aa54148 273 <my-recommended-videos
5c20a455 274 [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }"
5c20a455
C
275 [playlist]="playlist"
276 (gotRecommendations)="onRecommendations($event)"
6aa54148 277 ></my-recommended-videos>
d1992b93 278 </div>
8ff3f883 279
2b3f1919 280 <div class="row privacy-concerns" *ngIf="hasAlreadyAcceptedPrivacyConcern === false">
2b3b76ab 281 <div class="privacy-concerns-text">
52e3beb9
RK
282 <span class="mr-2">
283 <strong i18n>Friendly Reminder: </strong>
284 <ng-container i18n>
285 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.
286 </ng-container>
d3217560 287 </span>
5411da31 288 <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about/peertube#privacy">More information</a>
2b3b76ab
C
289 </div>
290
d3217560 291 <div i18n class="privacy-concerns-button privacy-concerns-okay" (click)="acceptedPrivacyConcern()">
52e3beb9 292 OK
2b3b76ab
C
293 </div>
294 </div>
b59f12b0 295</div>
d1992b93 296
5a71acd2 297<ng-container *ngIf="video !== null">
1f3a605e 298 <my-video-support #videoSupportModal [video]="video"></my-video-support>
3a1fed11 299 <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share>
5a71acd2 300</ng-container>