diff options
Diffstat (limited to 'client/src/app/shared/video/video-thumbnail.component.ts')
-rw-r--r-- | client/src/app/shared/video/video-thumbnail.component.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/app/shared/video/video-thumbnail.component.ts b/client/src/app/shared/video/video-thumbnail.component.ts index 86d8f6f74..ca43700c7 100644 --- a/client/src/app/shared/video/video-thumbnail.component.ts +++ b/client/src/app/shared/video/video-thumbnail.component.ts | |||
@@ -22,4 +22,12 @@ export class VideoThumbnailComponent { | |||
22 | 22 | ||
23 | return this.video.thumbnailUrl | 23 | return this.video.thumbnailUrl |
24 | } | 24 | } |
25 | |||
26 | getProgressPercent () { | ||
27 | if (!this.video.userHistory) return 0 | ||
28 | |||
29 | const currentTime = this.video.userHistory.currentTime | ||
30 | |||
31 | return (currentTime / this.video.duration) * 100 | ||
32 | } | ||
25 | } | 33 | } |