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