🎥 Make videos programmatically with React
Document the video tags behavior when media ends
Igor Samokhovets990495465c5c
diff --git a/packages/docs/docs/html5-video.mdx b/packages/docs/docs/html5-video.mdxindex a86b490a1e..828d9da20a 100644--- a/packages/docs/docs/html5-video.mdx+++ b/packages/docs/docs/html5-video.mdx@@ -210,6 +210,11 @@ export const MyComposition = () => {};```+:::note+When a video ends (and `loop` is not set), the last frame of the video remains visible by default.+This is because Remotion mounts a `<video>` tag and sets `ref.currentTime = frame / fps` to synchronize with the timeline. When `currentTime` is set to a value larger than the video's duration, the HTML5 `<video>` element displays the last frame.+:::+### `acceptableTimeShiftInSeconds?`<AvailableFrom v="3.2.42" />In the [Studio](/docs/terminology/studio) or in the [Remotion Player](/docs/player), Remotion will seek the video if it gets too much out of sync with Remotion's internal time - be it due to the video loading or the page being too slow to keep up in real-time. By default, a seek is triggered if `0.45` seconds of time shift is encountered. Using this prop, you can customize the threshold.diff --git a/packages/docs/docs/media/video.mdx b/packages/docs/docs/media/video.mdxindex 1d10d80af1..e492c4d126 100644--- a/packages/docs/docs/media/video.mdx+++ b/packages/docs/docs/media/video.mdx@@ -201,6 +201,11 @@ export const MyComposition = () => {};```+:::note+When a video ends (and `loop` is not set), the last frame of the video remains visible by default.+This matches the behavior of [`<Html5Video>`](/docs/html5-video#loop).+:::+### `loopVolumeCurveBehavior?`<AvailableFrom v="4.0.354" />Controls the `frame` which is returned when using the [`volume`](#volume) callback function and adding the [`loop`](#loop) attribute.diff --git a/packages/docs/docs/offthreadvideo.mdx b/packages/docs/docs/offthreadvideo.mdxindex 021271474f..1abd7d91c1 100644--- a/packages/docs/docs/offthreadvideo.mdx+++ b/packages/docs/docs/offthreadvideo.mdx@@ -320,6 +320,11 @@ If you don't care about color accuracy, you can set `toneMapped` to `false` as wUnlike [`<Html5Video>`](/docs/html5-video), `OffthreadVideo` does not implement the `loop` property.Consider using [another video tag](/docs/video-tags) for looping.+:::note+When a video ends, the last frame of the video remains visible by default.+This matches the behavior of [`<Html5Video>`](/docs/html5-video#loop).+:::+You can use the following `<LoopableOffthreadVideo>` component that uses [`@remotion/media-parser`](/docs/media-parser/) to loop a video.```tsx twoslash title="src/LoopableOffthreadVideo.tsx"