Skip to content

Commit

Permalink
Merge pull request #1995 from remotion-dev/fix-invalid-array-length
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed Apr 6, 2023
2 parents 35d9393 + e83f84c commit 56b2bf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/use-media-in-timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const useMediaInTimeline = ({
return volume;
}

return new Array(Math.max(0, duration + startsAt))
return new Array(Math.floor(Math.max(0, duration + startsAt)))
.fill(true)
.map((_, i) => {
return evaluateVolume({
Expand Down
2 changes: 1 addition & 1 deletion packages/example/src/AudioTesting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const AudioTesting: React.FC = () => {

return (
<div>
<Sequence from={100} durationInFrames={100}>
<Sequence from={100} durationInFrames={55.995}>
<Audio
loop
startFrom={100}
Expand Down

1 comment on commit 56b2bf4

@vercel
Copy link

@vercel vercel bot commented on 56b2bf4 Apr 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.