diff options
Diffstat (limited to 'client/src/app/+videos/+video-watch/video-watch.component.html')
-rw-r--r-- | client/src/app/+videos/+video-watch/video-watch.component.html | 277 |
1 files changed, 277 insertions, 0 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.html new file mode 100644 index 000000000..0447268f0 --- /dev/null +++ b/client/src/app/+videos/+video-watch/video-watch.component.html | |||
@@ -0,0 +1,277 @@ | |||
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="blocked-label" i18n>This video is blocked.</div> | ||
33 | {{ video.blockedReason }} | ||
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 | <button | ||
63 | [ngbPopover]="getRatePopoverText()" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()" (keyup.enter)="setLike()" | ||
64 | class="action-button action-button-like" [attr.aria-pressed]="userRating === 'like'" [attr.aria-label]="tooltipLike" | ||
65 | [ngbTooltip]="tooltipLike" | ||
66 | placement="bottom auto" | ||
67 | > | ||
68 | <my-global-icon iconName="like"></my-global-icon> | ||
69 | <span *ngIf="video.likes" class="count">{{ video.likes }}</span> | ||
70 | </button> | ||
71 | |||
72 | <button | ||
73 | [ngbPopover]="getRatePopoverText()" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()" (keyup.enter)="setDislike()" | ||
74 | class="action-button action-button-dislike" [attr.aria-pressed]="userRating === 'dislike'" [attr.aria-label]="tooltipDislike" | ||
75 | [ngbTooltip]="tooltipDislike" | ||
76 | placement="bottom auto" | ||
77 | > | ||
78 | <my-global-icon iconName="dislike"></my-global-icon> | ||
79 | <span *ngIf="video.dislikes" class="count">{{ video.dislikes }}</span> | ||
80 | </button> | ||
81 | |||
82 | <button *ngIf="video.support" (click)="showSupportModal()" (keyup.enter)="showSupportModal()" class="action-button action-button-support" [attr.aria-label]="tooltipSupport" | ||
83 | [ngbTooltip]="tooltipSupport" | ||
84 | placement="bottom auto" | ||
85 | > | ||
86 | <my-global-icon iconName="support" aria-hidden="true"></my-global-icon> | ||
87 | <span class="icon-text" i18n>SUPPORT</span> | ||
88 | </button> | ||
89 | |||
90 | <button (click)="showShareModal()" (keyup.enter)="showShareModal()" class="action-button"> | ||
91 | <my-global-icon iconName="share" aria-hidden="true"></my-global-icon> | ||
92 | <span class="icon-text" i18n>SHARE</span> | ||
93 | </button> | ||
94 | |||
95 | <div | ||
96 | class="action-dropdown" ngbDropdown placement="top" role="button" autoClose="outside" | ||
97 | *ngIf="isUserLoggedIn()" (openChange)="addContent.openChange($event)" | ||
98 | [ngbTooltip]="tooltipSaveToPlaylist" | ||
99 | placement="bottom auto" | ||
100 | > | ||
101 | <button class="action-button action-button-save" ngbDropdownToggle> | ||
102 | <my-global-icon iconName="playlist-add" aria-hidden="true"></my-global-icon> | ||
103 | <span class="icon-text" i18n>SAVE</span> | ||
104 | </button> | ||
105 | |||
106 | <div ngbDropdownMenu> | ||
107 | <my-video-add-to-playlist #addContent [video]="video"></my-video-add-to-playlist> | ||
108 | </div> | ||
109 | </div> | ||
110 | |||
111 | <my-video-actions-dropdown | ||
112 | placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions" | ||
113 | (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()" | ||
114 | ></my-video-actions-dropdown> | ||
115 | </div> | ||
116 | |||
117 | <div class="video-info-likes-dislikes-bar-outer-container"> | ||
118 | <div | ||
119 | class="video-info-likes-dislikes-bar-inner-container" | ||
120 | *ngIf="video.likes !== 0 || video.dislikes !== 0" | ||
121 | [ngbTooltip]="likesBarTooltipText" | ||
122 | placement="bottom" | ||
123 | > | ||
124 | <div | ||
125 | class="video-info-likes-dislikes-bar" | ||
126 | > | ||
127 | <div class="likes-bar" [ngClass]="{ 'liked': userRating !== 'none' }" [ngStyle]="{ 'width.%': video.likesPercent }"></div> | ||
128 | </div> | ||
129 | </div> | ||
130 | </div> | ||
131 | </div> | ||
132 | |||
133 | <div | ||
134 | class="video-info-likes-dislikes-bar" | ||
135 | *ngIf="video.likes !== 0 || video.dislikes !== 0" | ||
136 | [ngbTooltip]="likesBarTooltipText" | ||
137 | placement="bottom" | ||
138 | > | ||
139 | <div class="likes-bar" [ngStyle]="{ 'width.%': video.likesPercent }"></div> | ||
140 | </div> | ||
141 | </div> | ||
142 | </div> | ||
143 | |||
144 | |||
145 | <div class="pt-3 border-top video-info-channel d-flex"> | ||
146 | <div class="video-info-channel-left d-flex"> | ||
147 | <avatar-channel [video]="video"></avatar-channel> | ||
148 | |||
149 | <div class="video-info-channel-left-links ml-1"> | ||
150 | <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" i18n-title title="Channel page"> | ||
151 | {{ video.channel.displayName }} | ||
152 | </a> | ||
153 | <a [routerLink]="[ '/accounts', video.byAccount ]" i18n-title title="Account page"> | ||
154 | <span i18n>By {{ video.byAccount }}</span> | ||
155 | </a> | ||
156 | </div> | ||
157 | </div> | ||
158 | |||
159 | <my-subscribe-button #subscribeButton [videoChannels]="[video.channel]" size="small"></my-subscribe-button> | ||
160 | </div> | ||
161 | </div> | ||
162 | |||
163 | </div> | ||
164 | |||
165 | <div class="video-info-description"> | ||
166 | <div | ||
167 | class="video-info-description-html" | ||
168 | [innerHTML]="videoHTMLDescription" | ||
169 | (timestampClicked)="handleTimestampClicked($event)" | ||
170 | timestampRouteTransformer | ||
171 | ></div> | ||
172 | |||
173 | <div class="video-info-description-more" *ngIf="completeDescriptionShown === false && video.description?.length >= 250" (click)="showMoreDescription()"> | ||
174 | <ng-container i18n>Show more</ng-container> | ||
175 | <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-down"></span> | ||
176 | <my-small-loader class="description-loading" [loading]="descriptionLoading"></my-small-loader> | ||
177 | </div> | ||
178 | |||
179 | <div *ngIf="completeDescriptionShown === true" (click)="showLessDescription()" class="video-info-description-more"> | ||
180 | <ng-container i18n>Show less</ng-container> | ||
181 | <span *ngIf="descriptionLoading === false" class="glyphicon glyphicon-menu-up"></span> | ||
182 | </div> | ||
183 | </div> | ||
184 | |||
185 | <div class="video-attributes mb-3"> | ||
186 | <div class="video-attribute"> | ||
187 | <span i18n class="video-attribute-label">Privacy</span> | ||
188 | <span class="video-attribute-value">{{ video.privacy.label }}</span> | ||
189 | </div> | ||
190 | |||
191 | <div *ngIf="video.isLocal === false" class="video-attribute"> | ||
192 | <span i18n class="video-attribute-label">Origin instance</span> | ||
193 | <a class="video-attribute-value" target="_blank" rel="noopener noreferrer" [href]="video.originInstanceUrl">{{ video.originInstanceHost }}</a> | ||
194 | </div> | ||
195 | |||
196 | <div *ngIf="!!video.originallyPublishedAt" class="video-attribute"> | ||
197 | <span i18n class="video-attribute-label">Originally published</span> | ||
198 | <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span> | ||
199 | </div> | ||
200 | |||
201 | <div class="video-attribute"> | ||
202 | <span i18n class="video-attribute-label">Category</span> | ||
203 | <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span> | ||
204 | <a | ||
205 | *ngIf="video.category.id" class="video-attribute-value" | ||
206 | [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }" | ||
207 | >{{ video.category.label }}</a> | ||
208 | </div> | ||
209 | |||
210 | <div class="video-attribute"> | ||
211 | <span i18n class="video-attribute-label">Licence</span> | ||
212 | <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span> | ||
213 | <a | ||
214 | *ngIf="video.licence.id" class="video-attribute-value" | ||
215 | [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }" | ||
216 | >{{ video.licence.label }}</a> | ||
217 | </div> | ||
218 | |||
219 | <div class="video-attribute"> | ||
220 | <span i18n class="video-attribute-label">Language</span> | ||
221 | <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span> | ||
222 | <a | ||
223 | *ngIf="video.language.id" class="video-attribute-value" | ||
224 | [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }" | ||
225 | >{{ video.language.label }}</a> | ||
226 | </div> | ||
227 | |||
228 | <div class="video-attribute video-attribute-tags"> | ||
229 | <span i18n class="video-attribute-label">Tags</span> | ||
230 | <a | ||
231 | *ngFor="let tag of getVideoTags()" | ||
232 | class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }" | ||
233 | >{{ tag }}</a> | ||
234 | </div> | ||
235 | |||
236 | <div class="video-attribute"> | ||
237 | <span i18n class="video-attribute-label">Duration</span> | ||
238 | <span class="video-attribute-value">{{ video.duration | myVideoDurationFormatter }}</span> | ||
239 | </div> | ||
240 | </div> | ||
241 | |||
242 | <my-video-comments | ||
243 | class="border-top" | ||
244 | [video]="video" | ||
245 | [user]="user" | ||
246 | (timestampClicked)="handleTimestampClicked($event)" | ||
247 | ></my-video-comments> | ||
248 | </div> | ||
249 | |||
250 | <my-recommended-videos | ||
251 | [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }" | ||
252 | [playlist]="playlist" | ||
253 | (gotRecommendations)="onRecommendations($event)" | ||
254 | ></my-recommended-videos> | ||
255 | </div> | ||
256 | |||
257 | <div class="row privacy-concerns" *ngIf="hasAlreadyAcceptedPrivacyConcern === false"> | ||
258 | <div class="privacy-concerns-text"> | ||
259 | <span class="mr-2"> | ||
260 | <strong i18n>Friendly Reminder: </strong> | ||
261 | <ng-container i18n> | ||
262 | 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. | ||
263 | </ng-container> | ||
264 | </span> | ||
265 | <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about/peertube#privacy">More information</a> | ||
266 | </div> | ||
267 | |||
268 | <div i18n class="privacy-concerns-button privacy-concerns-okay" (click)="acceptedPrivacyConcern()"> | ||
269 | OK | ||
270 | </div> | ||
271 | </div> | ||
272 | </div> | ||
273 | |||
274 | <ng-container *ngIf="video !== null"> | ||
275 | <my-video-support #videoSupportModal [video]="video"></my-video-support> | ||
276 | <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share> | ||
277 | </ng-container> | ||