export class VideoThumbnailComponent {
@Input() video: Video
@Input() nsfw = false
+ @Input() routerLink: any[]
+ @Input() queryParams: any[]
- constructor (private screenService: ScreenService) {}
+ constructor (private screenService: ScreenService) {
+ }
getImageUrl () {
if (!this.video) return ''
return (currentTime / this.video.duration) * 100
}
+
+ getVideoRouterLink () {
+ if (this.routerLink) return this.routerLink
+
+ return [ '/videos/watch', this.video.uuid ]
+ }
}