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