aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video-thumbnail.component.html
blob: fe5510c568b24d09aa2e6393a869737cec29537a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<a
  [routerLink]="getVideoRouterLink()" [queryParams]="queryParams"
  class="video-thumbnail"
>
  <img alt="" [attr.aria-label]="video.name" [attr.src]="getImageUrl()" [ngClass]="{ 'blur-filter': nsfw }" />

  <div *ngIf="displayWatchLaterPlaylist" class="video-thumbnail-actions-overlay">
    <ng-container *ngIf="inWatchLaterPlaylist !== true">
      <div class="video-thumbnail-watch-later-overlay" placement="left" [ngbTooltip]="addToWatchLaterText" container="body" (click)="onWatchLaterClick($event)">
        <my-global-icon iconName="clock" [attr.aria-label]="addToWatchLaterText" role="button"></my-global-icon>
      </div>
    </ng-container>

    <ng-container *ngIf="inWatchLaterPlaylist === true">
      <div class="video-thumbnail-watch-later-overlay" placement="left" [ngbTooltip]="addedToWatchLaterText" container="body" (click)="onWatchLaterClick($event)">
        <my-global-icon iconName="tick" [attr.aria-label]="addedToWatchLaterText" role="button"></my-global-icon>
      </div>
    </ng-container>
  </div>

  <div class="video-thumbnail-label-overlay warning"><ng-content select="label-warning"></ng-content></div>
  <div class="video-thumbnail-label-overlay danger"><ng-content select="label-danger"></ng-content></div>

  <div class="video-thumbnail-duration-overlay">{{ video.durationLabel }}</div>

  <div class="play-overlay">
    <div class="icon"></div>
  </div>

  <div class="progress-bar" *ngIf="video.userHistory?.currentTime">
    <div [ngStyle]="{ 'width.%': getProgressPercent() }"></div>
  </div>
</a>