memoised the text and other small
Browse files
Remotion-app/src/HelloWorld/AudioStream.jsx
CHANGED
|
@@ -29,11 +29,10 @@ const AudioStream = React.memo(() => {
|
|
| 29 |
});
|
| 30 |
|
| 31 |
const AudioX = React.memo(({entry}) => {
|
| 32 |
-
const {fps} = useVideoConfig();
|
| 33 |
return (
|
| 34 |
<Audio
|
| 35 |
-
startFrom={
|
| 36 |
-
endAt={
|
| 37 |
volume={entry.props.volume}
|
| 38 |
src={staticFile(entry.name)}
|
| 39 |
/>
|
|
|
|
| 29 |
});
|
| 30 |
|
| 31 |
const AudioX = React.memo(({entry}) => {
|
|
|
|
| 32 |
return (
|
| 33 |
<Audio
|
| 34 |
+
startFrom={entry.props.startFrom}
|
| 35 |
+
endAt={entry.props.endAt}
|
| 36 |
volume={entry.props.volume}
|
| 37 |
src={staticFile(entry.name)}
|
| 38 |
/>
|
Remotion-app/src/HelloWorld/TextStream.jsx
CHANGED
|
@@ -64,8 +64,8 @@ const TextStream = React.memo(() => {
|
|
| 64 |
);
|
| 65 |
});
|
| 66 |
|
| 67 |
-
|
| 68 |
return <div style={style}>{children}</div>;
|
| 69 |
-
}
|
| 70 |
|
| 71 |
export default TextStream;
|
|
|
|
| 64 |
);
|
| 65 |
});
|
| 66 |
|
| 67 |
+
const Letter = React.memo(({children, style}) => {
|
| 68 |
return <div style={style}>{children}</div>;
|
| 69 |
+
});
|
| 70 |
|
| 71 |
export default TextStream;
|
Remotion-app/src/HelloWorld/VideoStream.jsx
CHANGED
|
@@ -29,11 +29,10 @@ const VideoStream = React.memo(() => {
|
|
| 29 |
});
|
| 30 |
|
| 31 |
const VideoX = React.memo(({entry}) => {
|
| 32 |
-
const {fps} = useVideoConfig();
|
| 33 |
return (
|
| 34 |
<Video
|
| 35 |
-
startFrom={
|
| 36 |
-
endAt={
|
| 37 |
volume={entry.props.volume}
|
| 38 |
src={staticFile(entry.name)}
|
| 39 |
/>
|
|
|
|
| 29 |
});
|
| 30 |
|
| 31 |
const VideoX = React.memo(({entry}) => {
|
|
|
|
| 32 |
return (
|
| 33 |
<Video
|
| 34 |
+
startFrom={entry.props.startFrom}
|
| 35 |
+
endAt={entry.props.endAt}
|
| 36 |
volume={entry.props.volume}
|
| 37 |
src={staticFile(entry.name)}
|
| 38 |
/>
|