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