Skip to content

How to use a large amount of audio clips in the video efficiently? #1526

Answered by JonnyBurger
Ivan-1F asked this question in Q&A
Discussion options

You must be logged in to vote

You could not render the sequences which are not relevant at a certain time:

return (
    <>
        {audioTimes.map((time, i) => {
			const from = Math.round(time * fps);
			if (frame < from || frame + (fps * 2) > from) {
				return null;
			} 

         	return  (
				<Sequence from={from} durationInFrames={fps * 2} key={i}>
                		<Audio src={staticFile('core/HitSong0.ogg')} />
            	</Sequence>
			)
        })}
    </>
)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Ivan-1F
Comment options

@JonnyBurger
Comment options

@Ivan-1F
Comment options

Answer selected by Ivan-1F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants