🎥 Make videos programmatically with React
tweak GIF readme page and docs
Jonny Burger2712091316d2
diff --git a/packages/docs/docs/gif.md b/packages/docs/docs/gif.mdindex 54fa5ce44b..27dd49cc4f 100644--- a/packages/docs/docs/gif.md+++ b/packages/docs/docs/gif.md@@ -18,6 +18,8 @@ _required_The source of the GIF. Can be an URL or a local image - see [Importing assets](/docs/assets).+> If you pass a remote URL, it must be [CORS-enabled](https://enable-cors.org/).+### `width`The display width.diff --git a/packages/docs/docs/importing-assets.md b/packages/docs/docs/importing-assets.mdindex d6650dd239..9d808c2da8 100644--- a/packages/docs/docs/importing-assets.md+++ b/packages/docs/docs/importing-assets.md@@ -6,7 +6,7 @@ title: Importing assetsRemotion allows you to include several types of files in your project:- Images (`.png`, `.svg`, `.jpg`, `.jpeg`, `.webp`, `.gif`, `.bmp`)-- Videos (`.webm`, `.mp4`)+- Videos (`.webm`, `.mov`, `.mp4`)- Audio (`.mp3`, `.wav`, `.aac`)- [Webfonts - read the separate page for fonts](/docs/fonts)- Arbitrary files using the `staticFile()` APIdiff --git a/packages/gif/README.md b/packages/gif/README.mdindex ede1bacc10..ee6f68272d 100644--- a/packages/gif/README.md+++ b/packages/gif/README.md@@ -1,35 +1,35 @@### Remotion GIF-[](https://www.npmjs.org/package/@remotion/player)+[](https://www.npmjs.org/package/@remotion/player)[](https://npmcharts.com/compare/@remotion/player?minimal=true)[](https://packagephobia.now.sh/result?p=@remotion/player)-To use this package, we'll be assuming you already have the required setup to use Remotion. The dependencies that Remotion requires you to have pre-installed on your machine are Node.js and FFMPEG. You can take a look at this [guide](https://github.com/adaptlearning/adapt_authoring/wiki/Installing-FFmpeg) on how to get FFMPEG on your machine.+The Remotion GIF package allows you to embed GIFs into a [Remotion](https://remotion.dev) composition that synchronizes with Remotion's `useCurrentFrame()`'s hook.-The Remotion gif package allows you to create a React component for displaying GIFs that synchronizes with Remotion's `useCurrentFrame()`'s hook.+To use this package, we'll be assuming [you already have a Remotion project](https://remotion.dev/docs).-You can read more about the hook [here](https://www.remotion.dev/docs/use-current-frame)+Use the same package manager to install this package that you have used to initialize your Remotion project:-You can get this package with the commands below, depending on the type of package manager that you are comfortable with.--- npm```bash-npm install @remotion/gif+npm i @remotion/gif```-- yarn+```bashyarn add @remotion/gif```-- pnpm+```bash-pnpm install @remotion/player+pnpm i @remotion/gif```-### remotion/gif in action+> Make sure all Remotion packages you install (`remotion`, `@remotion/player`, `@remotion/gif`...) [have the same version](https://remotion.dev/docs/version-mismatch).++### Basic Example-The `player` package can be imported as a React component from the library, which you can make use of in your components, either by nesting it in a custom component of yours or simply making it a standalone component.+This will render a GIF that fills the whole size of the composition:```javascript+import { useVideoConfig } from "remotion";import { Gif } from "@remotion/gif";Âexport const MyComponent = () => {@@ -46,13 +46,13 @@ export const MyComponent = () => {};```-### The remotion/gif props+### API-Props | Function |+Prop | Function |--- | --- |-src | is a required prop, and it is the source of the GIF. It Can be a URL or a local image - [See how you can import assets](https://www.remotion.dev/docs/assets).|+src | is a required prop, and it is the source of the GIF. It can be a URL or a local image - [See how you can import assets](https://www.remotion.dev/docs/assets).|width | The display width of the GIFheight | The display height of the GIFfill | The layout of the GIF in its current container. It accepts the following values: `fill`, `contain`, and `cover`-For a complete reference of the available props, refer to [@remotion/gif API](https://www.remotion.dev/docs/gif).+For a complete reference of the available props, refer to [the @remotion/gif documentation](https://www.remotion.dev/docs/gif).