File size: 741 Bytes
b2b53ae 7191cf4 b2b53ae 8e3d2cc b2b53ae 6167061 b2b53ae 7191cf4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import {Series} from 'remotion';
import React from 'react';
import {staticFile, useVideoConfig, Audio} from 'remotion';
import sfxSequences from './Assets/SfxSequences.json';
import {TransitionSeries} from '@remotion/transitions';
const SfxStream = React.memo(() => {
const {fps} = useVideoConfig();
return (
<TransitionSeries>
{sfxSequences.map((entry, index) => {
return (
<TransitionSeries.Sequence
key={index}
from={fps * entry.start}
durationInFrames={30}
>
<Audio
volume={entry.props.volume}
startFrom={entry.props.startFrom}
src={staticFile(entry.name)}
/>
</TransitionSeries.Sequence>
);
})}
</TransitionSeries>
);
});
export default SfxStream;
|