🎥 Make videos programmatically with React
add more JSDoc to code and source function code to docs
Jonny Burger9e865b6d18e0
diff --git a/packages/core/src/AbsoluteFill.tsx b/packages/core/src/AbsoluteFill.tsxindex 4f11739afa..af479206e5 100644--- a/packages/core/src/AbsoluteFill.tsx+++ b/packages/core/src/AbsoluteFill.tsx@@ -1,5 +1,9 @@import React, {HTMLAttributes, useMemo} from 'react';+/**+ * An absolutely positioned <div> element with 100% width, height, and a column flex style+ * @link https://www.remotion.dev/docs/absolute-fill+ */export const AbsoluteFill: React.FC<HTMLAttributes<HTMLDivElement>> = (props) => {diff --git a/packages/core/src/freeze.tsx b/packages/core/src/freeze.tsxindex 0de667ae56..276a440624 100644--- a/packages/core/src/freeze.tsx+++ b/packages/core/src/freeze.tsx@@ -7,7 +7,7 @@ type FreezeProps = {children: React.ReactNode;};-const Freeze: React.FC<FreezeProps> = ({frame, children}) => {+export const Freeze: React.FC<FreezeProps> = ({frame, children}) => {if (typeof frame === 'undefined') {throw new Error(`The <Freeze /> component requires a 'frame' prop, but none was passed.`@@ -52,5 +52,3 @@ const Freeze: React.FC<FreezeProps> = ({frame, children}) => {</TimelineContext.Provider>);};--export {Freeze};diff --git a/packages/docs/docs/absolute-fill.md b/packages/docs/docs/absolute-fill.mdindex e8c6413f04..8456bde0f1 100644--- a/packages/docs/docs/absolute-fill.md+++ b/packages/docs/docs/absolute-fill.md@@ -17,3 +17,7 @@ A helper component - it is an absolutely positioned `<div>` with the following sflex-direction: column;}```++## See also++- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/AbsoluteFill.tsx)diff --git a/packages/docs/docs/freeze.mdx b/packages/docs/docs/freeze.mdsimilarity index 90%rename from packages/docs/docs/freeze.mdxrename to packages/docs/docs/freeze.mdindex b99a49f6e5..13a5e1e27a 100644--- a/packages/docs/docs/freeze.mdx+++ b/packages/docs/docs/freeze.md@@ -47,5 +47,6 @@ const MyVideo = () => {## See also+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/freeze.tsx)- [`<Video/>` Playback speed](/docs/video#controlling-playback-speed)- [`useCurrentFrame()`](/docs/use-current-frame)diff --git a/packages/docs/docs/iframe.md b/packages/docs/docs/iframe.mdindex b425f7ae75..6aa1b7692d 100644--- a/packages/docs/docs/iframe.md+++ b/packages/docs/docs/iframe.md@@ -18,4 +18,5 @@ export const MyComp: React.FC = () => {## See also+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/IFrame.tsx)- [Use `<Img>` and `<IFrame>` tags](/docs/use-img-and-iframe)diff --git a/packages/docs/docs/img.md b/packages/docs/docs/img.mdindex dcf054142a..552f452806 100644--- a/packages/docs/docs/img.md+++ b/packages/docs/docs/img.md@@ -27,4 +27,5 @@ Don't use the `<Img>` tag for GIFs, use [`@remotion/gif`](/docs/gif) instead.## See also+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/Img.tsx)- [Use `<Img>` and `<IFrame>` tags](/docs/use-img-and-iframe)diff --git a/packages/docs/docs/loop.md b/packages/docs/docs/loop.mdindex 58146bc03c..dd3a5d3a78 100644--- a/packages/docs/docs/loop.md+++ b/packages/docs/docs/loop.md@@ -99,3 +99,8 @@ const MyVideo = () => {);};```++## See also++- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/loop/index.tsx)+- [`<Sequence>`](/docs/sequence)diff --git a/packages/docs/docs/offthreadvideo.md b/packages/docs/docs/offthreadvideo.mdindex 3492ada6c4..30bd4d0b56 100644--- a/packages/docs/docs/offthreadvideo.md+++ b/packages/docs/docs/offthreadvideo.md@@ -41,5 +41,6 @@ Avoid embedding a video beyond it's end (for example: Rendering a 5 second video## See also+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/video/OffthreadVideo.tsx)- [`<Video />`](/docs/video)- [`<Video>` vs `<OffthreadVideo>`](/docs/video-vs-offthreadvideo)diff --git a/packages/docs/docs/sequence.md b/packages/docs/docs/sequence.mdindex ac92c0c056..19c16653f5 100644--- a/packages/docs/docs/sequence.md+++ b/packages/docs/docs/sequence.md@@ -139,7 +139,7 @@ See the [`<Series />`](/docs/series) helper component, which helps you calculate## See also-- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/sequence.tsx)+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/Sequence.tsx)- [Reuse components using Sequences](/docs/reusability)- [`<Composition />`](/docs/composition)- [`<Series />`](/docs/series)diff --git a/packages/docs/docs/series.md b/packages/docs/docs/series.mdindex dfbe7b6acb..580d4c36df 100644--- a/packages/docs/docs/series.md+++ b/packages/docs/docs/series.md@@ -66,4 +66,5 @@ This component is a high order component, and accepts, besides it's children, th## See also+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/series/index.tsx)- [`<Sequence />`](/docs/sequence)diff --git a/packages/docs/docs/still.md b/packages/docs/docs/still.mdindex 1e6ae8a87c..66bc5ecc1c 100644--- a/packages/docs/docs/still.md+++ b/packages/docs/docs/still.md@@ -38,4 +38,5 @@ export const MyVideo = () => {## See also+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/Still.tsx)- [`<Composition />`](/docs/composition)diff --git a/packages/docs/docs/video.md b/packages/docs/docs/video.mdindex 3b8418db0f..ad1161f12e 100644--- a/packages/docs/docs/video.md+++ b/packages/docs/docs/video.md@@ -160,6 +160,7 @@ export const MyVideo = () => {## See also+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/video/Video.tsx)- [`<Audio />`](/docs/audio)- [`<OffthreadVideo />`](/docs/offthreadvideo)- [`<Video>` vs `<OffthreadVideo>`](/docs/video-vs-offthreadvideo)