File size: 852 Bytes
1234584 |
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 31 32 33 34 |
import React from 'react';
import {staticFile, useVideoConfig, Audio} from 'remotion';
import backgroundSequences from './Assets/BackgroundSequences.json';
import {TransitionSeries} from '@remotion/transitions';
export default function BackgroundStream() {
const {fps} = useVideoConfig();
return (
<TransitionSeries
style={{
color: 'white',
position: 'absolute',
zIndex: 0,
}}
>
{backgroundSequences.map((entry, index) => {
return (
<TransitionSeries.Sequence
key={index}
from={fps * entry.start}
durationInFrames={fps * (entry.end - entry.start)}
>
<Audio
volume={entry.props.volume}
endAt={entry.props.endAt}
startFrom={entry.props.startFrom}
src={staticFile(entry.name)}
/>
</TransitionSeries.Sequence>
);
})}
</TransitionSeries>
);
}
|