From e2f01c47e08d26a30ad47068d195b3d21d0df8a1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 13 Mar 2019 14:18:58 +0100 Subject: Playlist support in watch page --- client/src/app/shared/video/video-thumbnail.component.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/video/video-thumbnail.component.ts') diff --git a/client/src/app/shared/video/video-thumbnail.component.ts b/client/src/app/shared/video/video-thumbnail.component.ts index ca43700c7..fe65ade94 100644 --- a/client/src/app/shared/video/video-thumbnail.component.ts +++ b/client/src/app/shared/video/video-thumbnail.component.ts @@ -10,8 +10,11 @@ import { ScreenService } from '@app/shared/misc/screen.service' 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 '' @@ -30,4 +33,10 @@ export class VideoThumbnailComponent { return (currentTime / this.video.duration) * 100 } + + getVideoRouterLink () { + if (this.routerLink) return this.routerLink + + return [ '/videos/watch', this.video.uuid ] + } } -- cgit v1.2.3