]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/app/+videos/+video-watch/video-watch.component.html
Refactor a little bit watch html
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.html
... / ...
CommitLineData
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">
11 <img class="placeholder-image" *ngIf="playerPlaceholderImgSrc" [src]="playerPlaceholderImgSrc" alt="Placeholder image" i18n-alt>
12 </div>
13
14 <my-video-watch-playlist
15 #videoWatchPlaylist
16 [playlist]="playlist" class="playlist"
17 (videoFound)="onPlaylistVideoFound($event)"
18 ></my-video-watch-playlist>
19
20 <my-plugin-placeholder pluginId="player-next"></my-plugin-placeholder>
21 </div>
22
23 <div class="row">
24 <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToImport()">
25 The video is being imported, it will be available when the import is finished.
26 </div>
27
28 <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToTranscode()">
29 The video is being transcoded, it may not work properly.
30 </div>
31
32 <div i18n class="col-md-12 alert alert-info" *ngIf="hasVideoScheduledPublication()">
33 This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
34 </div>
35
36 <div i18n class="col-md-12 alert alert-info" *ngIf="isWaitingForLive()">
37 This live has not started yet.
38 </div>
39
40 <div i18n class="col-md-12 alert alert-info" *ngIf="isLiveEnded()">
41 This live has ended.
42 </div>
43
44 <div class="col-md-12 alert alert-danger" *ngIf="video?.blacklisted">
45 <div class="blocked-label" i18n>This video is blocked.</div>
46 {{ video.blockedReason }}
47 </div>
48 </div>
49
50 <!-- Video information -->
51 <div *ngIf="video" class="margin-content video-bottom">
52 <div class="video-info">
53 <div class="video-info-first-row">
54 <div>
55 <ng-template #publishedTemplate>
56 <ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container>
57
58 <my-video-views-counter [video]="video"></my-video-views-counter>
59 </ng-template>
60
61 <div class="d-block d-md-none"> <!-- only shown on medium devices, has its counterpart for larger viewports below -->
62 <h1 class="video-info-name">{{ video.name }}</h1>
63
64 <div class="video-info-date-views">
65 <ng-template *ngTemplateOutlet="publishedTemplate"></ng-template>
66 </div>
67 </div>
68
69 <div class="d-flex justify-content-between flex-direction-column">
70 <div class="d-none d-md-block">
71 <h1 class="video-info-name">{{ video.name }}</h1>
72 </div>
73
74 <div class="video-info-first-row-bottom">
75 <div class="d-none d-md-block video-info-date-views">
76 <ng-template *ngTemplateOutlet="publishedTemplate"></ng-template>
77 </div>
78
79 <my-action-buttons
80 [video]="video" [isUserLoggedIn]="isUserLoggedIn()" [videoCaptions]="videoCaptions" [playlist]="playlist"
81 [currentTime]="getCurrentTime()" [currentPlaylistPosition]="getCurrentPlaylistPosition()"
82 ></my-action-buttons>
83 </div>
84 </div>
85
86 <div class="pt-3 border-top video-info-channel d-flex">
87 <div class="video-info-channel-left d-flex">
88 <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel>
89
90 <div class="video-info-channel-left-links ml-1">
91 <ng-container *ngIf="!isChannelDisplayNameGeneric()">
92 <a [routerLink]="[ '/c', video.byVideoChannel ]" i18n-title title="Channel page">
93 {{ video.channel.displayName }}
94 </a>
95 <a [routerLink]="[ '/a', video.byAccount ]" i18n-title title="Account page">
96 <span i18n>By {{ video.byAccount }}</span>
97 </a>
98 </ng-container>
99
100 <ng-container *ngIf="isChannelDisplayNameGeneric()">
101 <a [routerLink]="[ '/a', video.byAccount ]" class="single-link" i18n-title title="Account page">
102 <span i18n>{{ video.byAccount }}</span>
103 </a>
104 </ng-container>
105 </div>
106 </div>
107
108 <my-subscribe-button #subscribeButton [videoChannels]="[video.channel]" size="small"></my-subscribe-button>
109 </div>
110 </div>
111
112 </div>
113
114 <my-video-description [video]="video"></my-video-description>
115
116 <div class="video-attributes mb-3">
117 <div class="video-attribute">
118 <span i18n class="video-attribute-label">Privacy</span>
119 <span class="video-attribute-value">{{ video.privacy.label }}</span>
120 </div>
121
122 <div *ngIf="video.isLocal === false" class="video-attribute">
123 <span i18n class="video-attribute-label">Origin</span>
124 <a class="video-attribute-value" target="_blank" rel="noopener noreferrer" [href]="getVideoUrl()">{{ video.originInstanceHost }}</a>
125 </div>
126
127 <div *ngIf="!!video.originallyPublishedAt" class="video-attribute">
128 <span i18n class="video-attribute-label">Originally published</span>
129 <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span>
130 </div>
131
132 <div class="video-attribute">
133 <span i18n class="video-attribute-label">Category</span>
134 <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span>
135 <a
136 *ngIf="video.category.id" class="video-attribute-value"
137 [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }"
138 >{{ video.category.label }}</a>
139 </div>
140
141 <div class="video-attribute">
142 <span i18n class="video-attribute-label">Licence</span>
143 <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span>
144 <a
145 *ngIf="video.licence.id" class="video-attribute-value"
146 [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }"
147 >{{ video.licence.label }}</a>
148 </div>
149
150 <div class="video-attribute">
151 <span i18n class="video-attribute-label">Language</span>
152 <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span>
153 <a
154 *ngIf="video.language.id" class="video-attribute-value"
155 [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }"
156 >{{ video.language.label }}</a>
157 </div>
158
159 <div class="video-attribute video-attribute-tags">
160 <span i18n class="video-attribute-label">Tags</span>
161 <a
162 *ngFor="let tag of getVideoTags()"
163 class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }"
164 >{{ tag }}</a>
165 </div>
166
167 <div class="video-attribute" *ngIf="!video.isLive">
168 <span i18n class="video-attribute-label">Duration</span>
169 <span class="video-attribute-value">{{ video.duration | myDurationFormatter }}</span>
170 </div>
171 </div>
172
173 <my-video-comments
174 class="border-top"
175 [video]="video"
176 [user]="user"
177 (timestampClicked)="handleTimestampClicked($event)"
178 ></my-video-comments>
179 </div>
180
181 <my-recommended-videos
182 [displayAsRow]="displayOtherVideosAsRow()"
183 [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }"
184 [playlist]="playlist"
185 (gotRecommendations)="onRecommendations($event)"
186 ></my-recommended-videos>
187 </div>
188
189 <my-privacy-concerns></my-privacy-concerns>
190</div>
191
192<my-player-styles></my-player-styles>