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