Skip to content

Commit

Permalink
fix(video-player): video seek percent calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
mukeshsahay committed May 5, 2023
1 parent be4263c commit 828e4f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class VideoPlayer extends Component<IVideoPlayerProps, IVideoPlayerState>
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);
Expand Down

0 comments on commit 828e4f1

Please sign in to comment.