From 828e4f18dfe5f25ddd6f045f921f24ffba35535c Mon Sep 17 00:00:00 2001 From: Mukesh Sahay Date: Fri, 5 May 2023 01:55:00 -0700 Subject: [PATCH] fix(video-player): video seek percent calculation --- .../src/components/video-player/videoPlayer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/src/components/video-player/videoPlayer.tsx b/packages/react-components/src/components/video-player/videoPlayer.tsx index e4efe2500..027efec9c 100644 --- a/packages/react-components/src/components/video-player/videoPlayer.tsx +++ b/packages/react-components/src/components/video-player/videoPlayer.tsx @@ -240,7 +240,7 @@ export class VideoPlayer extends Component const mouseX = ev.clientX; const rect = this.progressBar.getBoundingClientRect(); const { x, width } = rect; - const percentage = (mouseX - x) / width; + const percentage = ((mouseX - x) / width) * 100; // Set video to start if click is before the start time if (percentage > 0) { this.seekVideo(percentage);