+ @Input() routerLink: any[]
+ @Input() queryParams: any[]
+
+ constructor (private screenService: ScreenService) {
+ }
+
+ getImageUrl () {
+ if (!this.video) return ''
+
+ if (this.screenService.isInMobileView()) {
+ return this.video.previewUrl
+ }
+
+ return this.video.thumbnailUrl
+ }
+
+ getProgressPercent () {
+ if (!this.video.userHistory) return 0
+
+ const currentTime = this.video.userHistory.currentTime
+
+ return (currentTime / this.video.duration) * 100
+ }
+
+ getVideoRouterLink () {
+ if (this.routerLink) return this.routerLink
+
+ return [ '/videos/watch', this.video.uuid ]
+ }