File size: 913 Bytes
d86c84c
 
 
520b716
d86c84c
520b716
d86c84c
 
 
 
 
 
 
 
 
 
520b716
 
 
 
 
 
 
 
 
 
cda1597
520b716
 
d86c84c
 
 
 
 
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
35
import {Series} from 'remotion';
import React from 'react';
import {staticFile, useVideoConfig, Img} from 'remotion';
import {slide} from '@remotion/transitions/slide';
import imageSequences from './Assets/ImageSequences.json';
import {TransitionSeries, linearTiming} from '@remotion/transitions';
export default function ImageStream() {
	const {fps} = useVideoConfig();
	return (
		<TransitionSeries
			style={{
				color: 'white',
			}}
		>
			{imageSequences.map((entry, index) => {
				return (
					<>
						<TransitionSeries.Sequence
							key={index}
							from={fps * entry.start}
							durationInFrames={fps * (entry.end - entry.start)}
						>
							<Img src={staticFile(entry.name)} />
						</TransitionSeries.Sequence>
						<TransitionSeries.Transition
							presentation={slide()}
							timing={linearTiming({durationInFrames: 1})}
						/>
					</>
				);
			})}
		</TransitionSeries>
	);
}