Skip to content

🎥 Make videos programmatically with React

better documentation

Jonny Burger66badae693f2
diff --git a/packages/docs/docs/sequence.md b/packages/docs/docs/sequence.md
index 9024a27a2b..5daa0682aa 100644
--- a/packages/docs/docs/sequence.md
+++ b/packages/docs/docs/sequence.md
@@ -63,6 +63,18 @@ _optional_
For how many frames the sequence should be displayed. Children are unmounted if they are not within the time range of display. By default it will be `Infinity` to avoid limit the duration of the sequence.
+### `height`<AvailableFrom v="4.0.80"/>
+
+_optional_
+
+Gives the sequence a specific `style={{height: height}}` style and overrides `height` that is returned by the [`useVideoConfig()`](/docs/use-video-config) hook in child components. Useful for including a component that was designed for a specific height.
+
+### `width`<AvailableFrom v="4.0.80"/>
+
+_optional_
+
+Gives the sequence a specific `style={{width: width}}` style and overrides `width` that is returned by the [`useVideoConfig()`](/docs/use-video-config) hook in child components. Useful for including a component that was designed for a specific width.
+
### `name`
_optional_
diff --git a/packages/docs/docs/use-video-config.md b/packages/docs/docs/use-video-config.md
index 9fa8e8e069..df34d4497c 100644
--- a/packages/docs/docs/use-video-config.md
+++ b/packages/docs/docs/use-video-config.md
@@ -5,19 +5,9 @@ id: use-video-config
crumb: "API"
---
-With this hook, you can retrieve some info about the context of the video that you are making.
-Namely, `useVideoConfig` will return an object with the following properties:
+With this hook, you can retrieve some info about the composition you are in.
-- `width`: The width of the composition in pixels.
-- `height`: The height of the composition in pixels.
-- `fps`: The frame rate of the composition, in frames per seconds.
-- `durationInFrames` The duration of the composition in frames.
-- `id`: The composition ID.
-- `defaultProps`: The object that you have defined as the `defaultProps` in your composition.
-
-These properties are controlled by passing them as props to [`<Composition>`](/docs/composition). Read the page about [the fundamentals](/docs/the-fundamentals) to read how to setup a Remotion project.
-
-### Example
+## Example
```tsx twoslash
import React from "react";
@@ -34,7 +24,45 @@ export const MyComp: React.FC = () => {
};
```
+## Return value
+
+A object with the following properties:
+
+### `width`
+
+The width of the composition in pixels, or the `width` of a [`<Sequence>`](/docs/sequence) if the component that calls `useVideoConfig()` is a child of a [`<Sequence>`](/docs/sequence) that defines a width.
+
+### `height`
+
+The height of the composition in pixels, or the `height` of a [`<Sequence>`](/docs/sequence) if the component that calls `useVideoConfig()` is a child of a [`<Sequence>`](/docs/sequence) that defines a height.
+
+### `fps`
+
+The frame rate of the composition, in frames per seconds.
+
+### `durationInFrames`
+
+The duration of the composition in frames or the `durationInFrames` of a [`<Sequence>`](/docs/sequence) if the component that calls `useVideoConfig()` is a child of a [`<Sequence>`](/docs/sequence) that defines a `durationInFrames`.
+
+### `id`
+
+The ID of the composition. This is the same as the `id` prop of the [`<Composition>`](/docs/composition) component.
+
+### `defaultProps`
+
+The object that you have defined as the `defaultProps` in your composition.
+
+### `props`<AvailableFrom v="4.0.0" />
+
+The props that were passed to the composition, after [all transformations](/docs/props-resolution).
+
+### `defaultCodec`<AvailableFrom v="4.0.54" />
+
+The default codec that is used for rendering this composition. Use [`calculateMetadata()`](/docs/calculate-metadata) to modify it.
+
## See also
+These properties are controlled by passing them as props to [`<Composition>`](/docs/composition). Read the page about [the fundamentals](/docs/the-fundamentals) to read how to setup a Remotion project.
+
- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/use-video-config.ts)
- [useCurrentFrame()](/docs/use-current-frame)