π₯ Make videos programmatically with React
/docs/hls
Jonny Burger10016a83f451
diff --git a/packages/docs/docs/miscellaneous/snippets/hls.mdx b/packages/docs/docs/hls.mdxsimilarity index 95%rename from packages/docs/docs/miscellaneous/snippets/hls.mdxrename to packages/docs/docs/hls.mdxindex 12a0ce4d7c..dab17958bd 100644--- a/packages/docs/docs/miscellaneous/snippets/hls.mdx+++ b/packages/docs/docs/hls.mdx@@ -1,5 +1,5 @@----image: /generated/articles-docs-miscellaneous-snippets-hls.png+image: /generated/articles-docs-hls.pngtitle: 'HLS support (HTTP Live Streaming)'sidebar_label: 'HLS'id: hlsdiff --git a/packages/docs/docs/media/video.mdx b/packages/docs/docs/media/video.mdxindex 814403ee8c..f74879a92f 100644--- a/packages/docs/docs/media/video.mdx+++ b/packages/docs/docs/media/video.mdx@@ -58,7 +58,7 @@ export const MyComposition = () => {};```-For more information on HLS support, see the [HLS documentation](/docs/miscellaneous/snippets/hls).+For more information on HLS support, see the [HLS documentation](/docs/hls).## Props@@ -442,7 +442,7 @@ Shows a debug overlay on the video. This is useful for debugging the video playb## See also- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/media/src/video/video.tsx)-- [HLS support (HTTP Live Streaming)](/docs/miscellaneous/snippets/hls)+- [HLS support (HTTP Live Streaming)](/docs/hls)- [Comparison of video tags](/docs/video-tags)- [`<Audio>` (from `@remotion/media`)](/docs/media/audio)- [`<Html5Video>` (from `remotion`)](/docs/html5-video)diff --git a/packages/docs/docs/mediabunny/metadata.mdx b/packages/docs/docs/mediabunny/metadata.mdxindex 1a04350d17..563bd7af72 100644--- a/packages/docs/docs/mediabunny/metadata.mdx+++ b/packages/docs/docs/mediabunny/metadata.mdx@@ -52,7 +52,6 @@ export const getMediaMetadata = async (src: string) => {<p>By setting `getRetryDelay` to `() => null`, we prevent Mediabunny from infinitely retrying if the request fails.</p><p>We compute the duration, the dimensions and the frame rate. If the media file is an audio file, we return `null` for the dimensions and the frame rate.</p><p>To avoid reading the entire file, we at most read 50 packets to compute the frame rate.</p>- <p>`UrlSource` also supports HLS (`.m3u8`) URLs - it automatically handles the multi-file nature of HLS playlists.</p></details>```tsx twoslash title="Usage example"diff --git a/packages/docs/docs/video-tags.mdx b/packages/docs/docs/video-tags.mdxindex fec9141bf8..81048cfd2d 100644--- a/packages/docs/docs/video-tags.mdx+++ b/packages/docs/docs/video-tags.mdx@@ -22,7 +22,7 @@ This page offers a comparison to help you decide which tag to use.| **Render Speed** | Fast | Medium | <span style={{color: 'green', fontWeight: 'bold'}}> Fastest </span> || **Supported containers** | `.aac`, `.avi`, `.caf`, `.flac`, `.flv`, `.m4a`, `.mkv`, `.mp3`, `.mp4`, `.ogg`, `.wav`, `.webm` | `.aac`, `.flac`, `.m4a`, `.mkv`, `.mp3`, `.mp4`, `.ogg`, `.wav`, `.webm` | `.aac`, `.flac`, `.m3u8`, `.mkv`, `.mov`, `.mp3`, `.mp4`, `.ogg`, `.wav`, `.webm` <br/><br/> Fallback to `<OffthreadVideo>` for unsupported containers || **Supported codecs** | AAC, AC3, AV1, FLAC, H.264, H.265, M4A, MP3, Opus, PCM, ProRes, VP8, VP9, Vorbis | AAC, FLAC, H.264, MP3, Opus, VP8, VP9, Vorbis | AAC, FLAC, H.264, MP3, Opus, VP8, VP9, Vorbis <br/><br/> Fallback to `<OffthreadVideo>` for unsupported codecs |-| **HLS Support** | [Chrome v142+](/docs/miscellaneous/snippets/hls) | [Only during preview](/docs/miscellaneous/snippets/hls) | [β Supported](/docs/miscellaneous/snippets/hls) |+| **HLS Support** | [Chrome v142+](/docs/hls) | [Only during preview](/docs/hls) | [β Supported](/docs/hls) || **CORS required** | No | No | Yes || **Loopable** | β | β | β || **`playbackRate`** <br/> (Speed Change) | β | β | β |diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.tsindex fe844d5996..b910df5335 100644--- a/packages/docs/sidebars.ts+++ b/packages/docs/sidebars.ts@@ -943,7 +943,7 @@ const sidebars: SidebarsConfig = {'miscellaneous/snippets/jumpcuts','miscellaneous/snippets/freeze-portions','video-tags',- 'miscellaneous/snippets/hls',+ 'hls','videos/as-threejs-texture',],},diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex 48ef0162b7..86ae2125e4 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -2051,6 +2051,15 @@ export const articles = [noAi: false,slug: 'hdr',},+ {+ id: 'hls',+ title: 'HLS support (HTTP Live Streaming)',+ relativePath: 'docs/hls.mdx',+ compId: 'articles-docs-hls',+ crumb: 'Video',+ noAi: false,+ slug: 'hls',+ },{id: 'props-resolution',title: 'How props get resolved',@@ -3961,15 +3970,6 @@ export const articles = [noAi: false,slug: 'miscellaneous/snippets/freeze-portions',},- {- id: 'hls',- title: 'HLS support (HTTP Live Streaming)',- relativePath: 'docs/miscellaneous/snippets/hls.mdx',- compId: 'articles-docs-miscellaneous-snippets-hls',- crumb: 'Video',- noAi: false,- slug: 'miscellaneous/snippets/hls',- },{id: 'miscellaneous/snippets/jumpcuts',title: 'Jump Cutting',diff --git a/packages/docs/static/generated/articles-docs-hls.png b/packages/docs/static/generated/articles-docs-hls.pngnew file mode 100644index 0000000000..4646fa0cdaBinary files /dev/null and b/packages/docs/static/generated/articles-docs-hls.png differdiff --git a/packages/docs/static/generated/articles-docs-miscellaneous-snippets-hls.png b/packages/docs/static/generated/articles-docs-miscellaneous-snippets-hls.pngdeleted file mode 100644index 521b5192ef..0000000000Binary files a/packages/docs/static/generated/articles-docs-miscellaneous-snippets-hls.png and /dev/null differdiff --git a/packages/docs/vercel.ts b/packages/docs/vercel.tsindex 26bb76c869..69e76b204f 100644--- a/packages/docs/vercel.ts+++ b/packages/docs/vercel.ts@@ -108,6 +108,11 @@ export const config: VercelConfig = {),routes.redirect('/support', '/docs/support', {permanent: true}),routes.redirect('/webcodecs', '/docs/webcodecs', {permanent: true}),+ routes.redirect(+ '/docs/miscellaneous/snippets/hls',+ '/docs/hls',+ {permanent: true},+ ),routes.redirect('/docs/player/api', '/docs/player/player', {permanent: true,}),diff --git a/packages/media/src/video-iterator-manager.ts b/packages/media/src/video-iterator-manager.tsindex 7563aef9d5..ee9a221a86 100644--- a/packages/media/src/video-iterator-manager.ts+++ b/packages/media/src/video-iterator-manager.ts@@ -125,8 +125,7 @@ export const videoIteratorManager = async ({}}- const videoSatisfyResult =- await videoFrameIterator.tryToSatisfySeek(newTime);+ const videoSatisfyResult = videoFrameIterator.tryToSatisfySeek(newTime);// Doing this before the staleness check, because// frame might be better than what we currently have