🎥 Make videos programmatically with React
add regression test
Jonny Burger1331f073617f
diff --git a/packages/example/src/ManyAudio/index.tsx b/packages/example/src/ManyAudio/index.tsxnew file mode 100644index 0000000000..1e488329ae--- /dev/null+++ b/packages/example/src/ManyAudio/index.tsx@@ -0,0 +1,12 @@+import React from 'react';+import {AbsoluteFill, Audio, staticFile} from 'remotion';++export const ManyAudio: React.FC = () => {+ return (+ <AbsoluteFill>+ {new Array(32).fill(true).map((_, i) => {+ return <Audio src={staticFile('music.mp3?mus=' + i)} />;+ })}+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/Video.tsx b/packages/example/src/Video.tsxindex 998b274e75..b8f29ee5aa 100644--- a/packages/example/src/Video.tsx+++ b/packages/example/src/Video.tsx@@ -6,6 +6,7 @@ import {ColorInterpolation} from './ColorInterpolation';import {FontDemo} from './Fonts';import {Framer} from './Framer';import {FreezeExample} from './Freeze/FreezeExample';+import {ManyAudio} from './ManyAudio';import {MissingImg} from './MissingImg';import {OffthreadRemoteVideo} from './OffthreadRemoteVideo/OffthreadRemoteVideo';import {OrbScene} from './Orb';@@ -106,7 +107,6 @@ export const Index: React.FC = () => {fps={30}durationInFrames={100}/>-<Compositionid="scripts"component={Scripts}@@ -115,6 +115,14 @@ export const Index: React.FC = () => {fps={30}durationInFrames={100}/>+ <Composition+ id="many-audio"+ component={ManyAudio}+ width={1280}+ height={720}+ fps={30}+ durationInFrames={30}+ /></Folder><Folder name="creatives"><Compositiondiff --git a/packages/it-tests/src/rendering/many-audio-tracks.test.ts b/packages/it-tests/src/rendering/many-audio-tracks.test.tsnew file mode 100644index 0000000000..4c59816bae--- /dev/null+++ b/packages/it-tests/src/rendering/many-audio-tracks.test.ts@@ -0,0 +1,18 @@+import path from "path";+import fs from "fs";+import execa from "execa";++test("Should be able to render if remotion.config.ts is not provided", async () => {+ const outputPath = path.join(process.cwd(), "packages/example/out.mp3");++ const task = await execa(+ "pnpx",+ ["remotion", "render", "src/index.tsx", "many-audio", outputPath],+ {+ cwd: path.join(process.cwd(), "..", "example"),+ }+ );++ expect(task.exitCode).toBe(0);+ fs.unlinkSync(outputPath);+});