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