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