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