🎥 Make videos programmatically with React
Add loop prop to docs for Video and Audio
Derryk Boyd287cb16ad396
diff --git a/packages/docs/docs/audio.md b/packages/docs/docs/audio.mdindex 4e09aa76ea..360133d885 100644--- a/packages/docs/docs/audio.md+++ b/packages/docs/docs/audio.md@@ -110,6 +110,25 @@ export const MyVideo = () => {};```+### `loop`++_Available from v3.2.29_++You can use the `loop` prop to loop audio.++```tsx twoslash+import { AbsoluteFill, Audio, staticFile, useCurrentFrame } from "remotion";++export const MyVideo = () => {+ const frame = useCurrentFrame();+ return (+ <AbsoluteFill>+ <Audio loop src={staticFile("audio.mp3")} />+ </AbsoluteFill>+ );+};+```+## See also- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/audio/Audio.tsx)diff --git a/packages/docs/docs/video.md b/packages/docs/docs/video.mdindex 630d9a7e6c..7964b0aafc 100644--- a/packages/docs/docs/video.md+++ b/packages/docs/docs/video.md@@ -144,7 +144,7 @@ export const MyComposition = () => {You can drop the audio of the video by adding a `muted` prop:-```tsx twoslash+```tsx twoslash title="Example of a muted video"import { AbsoluteFill, Video } from "remotion";// ---cut---export const MyComposition = () => {@@ -159,6 +159,27 @@ export const MyComposition = () => {};```+### `loop`++_Available from v3.2.29_++You can use the `loop` prop to loop a video.++```tsx twoslash title="Example of a looped video"+import { AbsoluteFill, Video } from "remotion";+// ---cut---+export const MyComposition = () => {+ return (+ <AbsoluteFill>+ <Video+ loop+ src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"+ />+ </AbsoluteFill>+ );+};+```+Remotion will download the whole video during render in order to mix its audio. If the video contains a silent audio track, you can add the muted property to signal to Remotion that it does not need to download the video and make the render more efficient.## Codec supportdiff --git a/packages/example/src/AudioTesting/index.tsx b/packages/example/src/AudioTesting/index.tsxindex 6b9e590392..0519b44a99 100644--- a/packages/example/src/AudioTesting/index.tsx+++ b/packages/example/src/AudioTesting/index.tsx@@ -5,7 +5,6 @@ const AudioTesting: React.FC = () => {<div><Sequence from={100} durationInFrames={100}><Audio- loopstartFrom={100}endAt={200}src={staticFile('music.mp3')}