]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/video/video-thumbnail.component.ts
Add concept of video state, and add ability to wait transcoding before
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / video-thumbnail.component.ts
CommitLineData
202f6b6c 1import { Component, Input } from '@angular/core'
3290f37c 2import { isInMobileView } from '@app/shared/misc/utils'
202f6b6c
C
3import { Video } from './video.model'
4
5@Component({
6 selector: 'my-video-thumbnail',
7 styleUrls: [ './video-thumbnail.component.scss' ],
8 templateUrl: './video-thumbnail.component.html'
9})
10export class VideoThumbnailComponent {
11 @Input() video: Video
12 @Input() nsfw = false
3290f37c
C
13
14 getImageUrl () {
15 if (!this.video) return ''
16
17 if (isInMobileView()) {
18 return this.video.previewUrl
19 }
20
21 return this.video.thumbnailUrl
22 }
202f6b6c 23}