Skip to content

Commit

Permalink
rolling back change since something broke
Browse files Browse the repository at this point in the history
  • Loading branch information
benrencher committed Nov 21, 2024
1 parent 22634e0 commit 787c171
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/components/c/Player/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,6 @@ const Player = props => {
}
}

const expectedRatio = 1.7777777 // 16:9 ratio

function checkRatio(e) {
const blankEl = document.getElementById("blank");
const bounding = blankEl.getBoundingClientRect();
const height = bounding.height;
const width = bounding.width;
const currentRatio = width / height;
const difference = Math.abs(expectedRatio - currentRatio);
const percentage = difference / expectedRatio * 100;
console.log(`Current difference percentage is ${percentage}`);
}

const handleOnProgress = ({ played, playedSeconds }) => {
handleProgress(playedSeconds)
document.getElementById(`seconds-time-holder`).innerText = playedSeconds
Expand Down Expand Up @@ -293,7 +280,7 @@ const Player = props => {
/>

<PlayerControls viewstate={props.viewstate} handlers={props.handlers} skipArray={skipArray}/>
<Blank blank={blank} onResize={checkRatio} id='blank' onContextMenu={e => e.preventDefault()}>
<Blank blank={blank} id='blank' onContextMenu={e => e.preventDefault()}>
{ !started &&
<PlayButton playing={playing} onClick={() => handlePlayPause(playing)} started={started} src={playButton} isMobile={isMobile} isLandscape={isLandscape}/>
}
Expand Down

0 comments on commit 787c171

Please sign in to comment.