Update remotion/src/index.tsx
Browse files- remotion/src/index.tsx +28 -26
remotion/src/index.tsx
CHANGED
|
@@ -1,7 +1,34 @@
|
|
| 1 |
import { registerRoot, Composition } from 'remotion';
|
| 2 |
import { RemotionComposition } from './Composition';
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
export const RemotionRoot: React.FC = () => {
|
|
|
|
|
|
|
| 5 |
return (
|
| 6 |
<>
|
| 7 |
<Composition
|
|
@@ -11,32 +38,7 @@ export const RemotionRoot: React.FC = () => {
|
|
| 11 |
fps={30}
|
| 12 |
width={1920}
|
| 13 |
height={1080}
|
| 14 |
-
|
| 15 |
-
script: {
|
| 16 |
-
title: "Sample Video",
|
| 17 |
-
targetAudience: "General",
|
| 18 |
-
summary: "Sample render",
|
| 19 |
-
scenes: [
|
| 20 |
-
{
|
| 21 |
-
title: "Hello World",
|
| 22 |
-
duration: 3, // seconds
|
| 23 |
-
voiceover: "Welcome to Remotion!",
|
| 24 |
-
codeSnippet: "DemoComponent"
|
| 25 |
-
},
|
| 26 |
-
{
|
| 27 |
-
title: "Second Scene",
|
| 28 |
-
duration: 2,
|
| 29 |
-
voiceover: "This is scene two."
|
| 30 |
-
}
|
| 31 |
-
],
|
| 32 |
-
config: {
|
| 33 |
-
visualTheme: "STOMP",
|
| 34 |
-
primaryColor: "#FFFFFF",
|
| 35 |
-
musicTrack: "STOMP",
|
| 36 |
-
aspectRatio: "16:9"
|
| 37 |
-
}
|
| 38 |
-
}
|
| 39 |
-
}}
|
| 40 |
/>
|
| 41 |
</>
|
| 42 |
);
|
|
|
|
| 1 |
import { registerRoot, Composition } from 'remotion';
|
| 2 |
import { RemotionComposition } from './Composition';
|
| 3 |
|
| 4 |
+
const videoScript = {
|
| 5 |
+
title: "Sample Video",
|
| 6 |
+
targetAudience: "General",
|
| 7 |
+
summary: "Sample render",
|
| 8 |
+
scenes: [
|
| 9 |
+
{
|
| 10 |
+
title: "Hello World",
|
| 11 |
+
duration: 3, // seconds
|
| 12 |
+
voiceover: "Welcome to Remotion!",
|
| 13 |
+
codeSnippet: "DemoComponent",
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
title: "Second Scene",
|
| 17 |
+
duration: 2,
|
| 18 |
+
voiceover: "This is scene two.",
|
| 19 |
+
}
|
| 20 |
+
],
|
| 21 |
+
config: {
|
| 22 |
+
visualTheme: "STOMP",
|
| 23 |
+
primaryColor: "#FFFFFF",
|
| 24 |
+
musicTrack: "STOMP",
|
| 25 |
+
aspectRatio: "16:9",
|
| 26 |
+
}
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
export const RemotionRoot: React.FC = () => {
|
| 30 |
+
console.log("=== VIDEO SCRIPT PASSED TO COMPOSITION ===", videoScript);
|
| 31 |
+
|
| 32 |
return (
|
| 33 |
<>
|
| 34 |
<Composition
|
|
|
|
| 38 |
fps={30}
|
| 39 |
width={1920}
|
| 40 |
height={1080}
|
| 41 |
+
script={videoScript} // PASS DIRECTLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
/>
|
| 43 |
</>
|
| 44 |
);
|