]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-watch/video-watch.component.html
97f3a336e308f30ef3e91aa3c1f1095d80902470
[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 [video]="video" [playlist]="playlist" class="playlist"
15 ></my-video-watch-playlist>
16 </div>
17
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>
22
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>
26
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>
30
31 <div class="col-md-12 alert alert-danger" *ngIf="video?.blacklisted">
32 <div class="blacklisted-label" i18n>This video is blacklisted.</div>
33 {{ video.blacklistedReason }}
34 </div>
35 </div>
36
37 <!-- Video information -->
38 <div *ngIf="video" class="margin-content video-bottom">
39 <div class="video-info">
40 <div class="video-info-first-row">
41 <div>
42 <div class="d-block d-md-none"> <!-- only shown on medium devices, has its counterpart for larger viewports below -->
43 <h1 class="video-info-name">{{ video.name }}</h1>
44
45 <div i18n class="video-info-date-views">
46 Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle> <span class="views"> - {{ video.views | myNumberFormatter }} views</span>
47 </div>
48 </div>
49
50 <div class="d-flex justify-content-between flex-direction-column">
51 <div class="d-none d-md-block">
52 <h1 class="video-info-name">{{ video.name }}</h1>
53 </div>
54
55 <div class="video-info-first-row-bottom">
56 <div i18n class="d-none d-md-block video-info-date-views">
57 Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle> <span class="views"> - {{ video.views | myNumberFormatter }} views</span>
58 </div>
59
60 <div class="video-actions-rates">
61 <div class="video-actions fullWidth justify-content-end">
62 <div
63 [ngbPopover]="getRatePopoverText()" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()"
64 class="action-button action-button-like" role="button" [attr.aria-pressed]="userRating === 'like'"
65 i18n-title title="Like this video"
66 >
67 <my-global-icon iconName="like"></my-global-icon>
68 <span *ngIf="video.likes" class="count">{{ video.likes }}</span>
69 </div>
70
71 <div
72 [ngbPopover]="getRatePopoverText()" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()"
73 class="action-button action-button-dislike" role="button" [attr.aria-pressed]="userRating === 'dislike'"
74 i18n-title title="Dislike this video"
75 >
76 <my-global-icon iconName="dislike"></my-global-icon>
77 <span *ngIf="video.dislikes" class="count">{{ video.dislikes }}</span>
78 </div>
79
80 <div *ngIf="video.support" (click)="showSupportModal()" class="action-button">
81 <my-global-icon iconName="heart"></my-global-icon>
82 <span class="icon-text" i18n>Support</span>
83 </div>
84
85 <div (click)="showShareModal()" class="action-button" role="button">
86 <my-global-icon iconName="share"></my-global-icon>
87 <span class="icon-text" i18n>Share</span>
88 </div>
89
90 <div
91 class="action-dropdown" ngbDropdown placement="top" role="button" autoClose="outside"
92 *ngIf="isUserLoggedIn()" (openChange)="addContent.openChange($event)"
93 >
94 <div class="action-button action-button-save" ngbDropdownToggle role="button">
95 <my-global-icon iconName="playlist-add"></my-global-icon>
96 <span class="icon-text" i18n>Save</span>
97 </div>
98
99 <div ngbDropdownMenu>
100 <my-video-add-to-playlist #addContent [video]="video"></my-video-add-to-playlist>
101 </div>
102 </div>
103
104 <my-video-actions-dropdown
105 placement="top" buttonDirection="horizontal" [buttonStyled]="true" [video]="video"
106 (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()"
107 ></my-video-actions-dropdown>
108 </div>
109
110 <div
111 class="video-info-likes-dislikes-bar"
112 *ngIf="video.likes !== 0 || video.dislikes !== 0"
113 [ngbTooltip]="likesBarTooltipText"
114 placement="bottom"
115 >
116 <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
117 </div>
118 </div>
119
120 <div
121 class="video-info-likes-dislikes-bar"
122 *ngIf="video.likes !== 0 || video.dislikes !== 0"
123 [ngbTooltip]="likesBarTooltipText"
124 placement="bottom"
125 >
126 <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div>
127 </div>
128 </div>
129 </div>
130
131
132 <div class="pt-3 border-top video-info-channel">
133 <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" i18n-title title="Go the channel page">
134 {{ video.channel.displayName }}
135
136 <img [src]="video.videoChannelAvatarUrl" alt="Video channel avatar" />
137 </a>
138
139 <my-subscribe-button #subscribeButton [videoChannel]="video.channel" size="small"></my-subscribe-button>
140 </div>
141
142 <div class="video-info-by">
143 <a [routerLink]="[ '/accounts', video.byAccount ]" i18n-title title="Go to the account page">
144 <span i18n>By {{ video.byAccount }}</span>
145 <img [src]="video.accountAvatarUrl" alt="Account avatar" />
146 </a>
147 </div>
148 </div>
149
150 </div>
151
152 <div class="video-info-description">
153 <div class="video-info-description-html" [innerHTML]="videoHTMLDescription"></div>
154
155 <div class="video-info-description-more" *ngIf="completeDescriptionShown === false && video.description?.length >= 250" (click)="showMoreDescription()">
156 <ng-container i18n>Show more</ng-container>
157 <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-down"></span>
158 <my-small-loader class="description-loading" [loading]="descriptionLoading"></my-small-loader>
159 </div>
160
161 <div *ngIf="completeDescriptionShown === true" (click)="showLessDescription()" class="video-info-description-more">
162 <ng-container i18n>Show less</ng-container>
163 <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-up"></span>
164 </div>
165 </div>
166
167 <div class="video-attributes">
168 <div class="video-attribute">
169 <span i18n class="video-attribute-label">Privacy</span>
170 <span class="video-attribute-value">{{ video.privacy.label }}</span>
171 </div>
172
173 <div *ngIf="!!video.originallyPublishedAt" class="video-attribute">
174 <span i18n class="video-attribute-label">Originally published</span>
175 <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span>
176 </div>
177
178 <div class="video-attribute">
179 <span i18n class="video-attribute-label">Category</span>
180 <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span>
181 <a
182 *ngIf="video.category.id" class="video-attribute-value"
183 [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }"
184 >{{ video.category.label }}</a>
185 </div>
186
187 <div class="video-attribute">
188 <span i18n class="video-attribute-label">Licence</span>
189 <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span>
190 <a
191 *ngIf="video.licence.id" class="video-attribute-value"
192 [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }"
193 >{{ video.licence.label }}</a>
194 </div>
195
196 <div class="video-attribute">
197 <span i18n class="video-attribute-label">Language</span>
198 <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span>
199 <a
200 *ngIf="video.language.id" class="video-attribute-value"
201 [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }"
202 >{{ video.language.label }}</a>
203 </div>
204
205 <div class="video-attribute video-attribute-tags">
206 <span i18n class="video-attribute-label">Tags</span>
207 <a
208 *ngFor="let tag of getVideoTags()"
209 class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }"
210 >{{ tag }}</a>
211 </div>
212 </div>
213
214 <my-video-comments [video]="video" [user]="user"></my-video-comments>
215 </div>
216
217 <my-recommended-videos
218 [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }"
219 [user]="user"
220 [playlist]="playlist"
221 (gotRecommendations)="onRecommendations($event)"
222 ></my-recommended-videos>
223 </div>
224
225 <div class="row privacy-concerns" *ngIf="hasAlreadyAcceptedPrivacyConcern === false">
226 <div class="privacy-concerns-text">
227 <strong i18n>Friendly Reminder: </strong>
228 <ng-container i18n>
229 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.
230 </ng-container>
231 <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about/peertube">More information</a>
232 </div>
233
234 <div i18n class="privacy-concerns-okay" (click)="acceptedPrivacyConcern()">
235 OK
236 </div>
237 </div>
238 </div>
239
240 <ng-container *ngIf="video !== null">
241 <my-video-support #videoSupportModal [video]="video"></my-video-support>
242 <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share>
243 </ng-container>