Skip to content

Commit

Permalink
comment : 주석 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
godhyzzang committed Oct 8, 2024
1 parent 87da1ee commit c71d744
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/src/components/ControlBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function ControlBar({
if (playerRef.current && totalTime) {
const progressBar = e.currentTarget; // progressBar 자체에서 좌표를 가져옴
const progressBarRect = progressBar.getBoundingClientRect();
const clickPosition = e.clientX - progressBarRect.left;
const clickPosition = e.clientX - progressBarRect.left; //전체 브라우저 기준 X좌표-프로그래스바의 X좌표
const newTime = (clickPosition / progressBarRect.width) * totalTime;
playerRef.current.seekTo(newTime);
setCurrentTime(newTime);
Expand All @@ -67,7 +67,7 @@ export default function ControlBar({
if (isDragging && playerRef.current && totalTime) {
const progressBar = e.currentTarget; // progressBar 자체에서 좌표를 가져옴
const progressBarRect = progressBar.getBoundingClientRect();
const dragPosition = e.clientX - progressBarRect.left;
const dragPosition = e.clientX - progressBarRect.left; //전체 브라우저 기준 X좌표-프로그래스바의 X좌표
const newTime = Math.min(
Math.max((dragPosition / progressBarRect.width) * totalTime, 0),
totalTime,
Expand Down

0 comments on commit c71d744

Please sign in to comment.