Skip to content

Commit

Permalink
Merge pull request #414 from BinaryStudioAcademy/task/OV-413-fix-magi…
Browse files Browse the repository at this point in the history
…c-numbers

OV-413: * fix magic numbers
  • Loading branch information
nikita-remeslov authored Sep 24, 2024
2 parents 3cc7242 + aa53828 commit 726b63a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { ASPECT_RATIO_LANDSCAPE } from './aspect-ratio-landscape.constant.js';
export { ASPECT_RATIO_PORTRAIT } from './aspect-ratio-portrait.constant.js';
export { FPS } from './fps.constant.js';
export { MIN_DURATION_IN_FRAMES } from './min-duration-in-frames.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const FPS = 30;

export { FPS };
3 changes: 2 additions & 1 deletion frontend/src/bundles/common/components/player/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { VideoComponent } from '~/bundles/studio/components/components.js';
import {
ASPECT_RATIO_LANDSCAPE,
ASPECT_RATIO_PORTRAIT,
FPS,
MIN_DURATION_IN_FRAMES,
} from './constants/constants.js';
import { LandscapeStyle, PortraitStyle } from './styles/styles.js';
Expand Down Expand Up @@ -59,7 +60,7 @@ const Player: React.FC<Properties> = ({ playerRef }) => {
component={VideoComponent}
inputProps={inputProperties}
durationInFrames={
durationInFrames * 30 || MIN_DURATION_IN_FRAMES
durationInFrames * FPS || MIN_DURATION_IN_FRAMES
}
compositionWidth={size.width}
compositionHeight={size.height}
Expand Down

0 comments on commit 726b63a

Please sign in to comment.