Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Player Docs #1398

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions packages/docs/docs/player/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,18 @@ The frame rate of the video. Must be a number.

### `compositionWidth`

The width of the composition in pixels.
The width you would like the video to have when rendered. Use `style={{width: <width>}}` to define a different natural width for the Player.

:::note
**Example**:
If you want to render a Full HD video, set `compositionWidth` to `1920` and `compositionHeight` to `1080`. By default, the Player will also assume these dimensions.
To make it smaller, pass a `style` prop to give the player a different width: `{"style={{width: 400}}"}`. See [Player Scaling](/docs/player/scaling) to learn more.
:::

### `compositionHeight`

The height of the composition in pixels.
The height of the canvas in pixels.
The height you would like the video to have when rendered. Use `style={{height: <height>}}` to define a different natural height for the Player.

### `loop`

Expand Down