From a747e5c4906dc9c287598090d04e9788d63b64ba Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 Sep 2024 10:12:13 +0200 Subject: [PATCH] Fix thumbnail accessibility --- .../video-thumbnail.component.html | 25 +++++++++++-------- .../video-thumbnail.component.ts | 4 +++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html index 3da06077e..1059204de 100644 --- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html +++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.html @@ -7,18 +7,18 @@ - +
@@ -26,17 +26,22 @@
-
{{ video.durationLabel }}
-
- LIVE - LIVE ENDED -
+ @if (video.isLive) { +
+ LIVE + LIVE ENDED +
+ } @else { +
{{ video.durationLabel }}
+ }
-
+
+ You watched {{ getProgressPercent() }}% of this video +
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts index 8751492ea..013078c7b 100644 --- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts +++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts @@ -70,6 +70,10 @@ export class VideoThumbnailComponent { return (currentTime / this.video.duration) * 100 } + getDurationOverlayLabel () { + return $localize`Video duration is ${this.video.durationLabel}` + } + getVideoRouterLink () { if (this.videoRouterLink) return this.videoRouterLink