diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 4653d1b581f..7b1e370967b 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -6,17 +6,17 @@ The **package name** for each folder is `@remotion/[folder-name]`, except for th ## Build instructions +- `pnpm` is the package manager for the project. - To build the project after you made changes, run `bunx turbo make --filter="[package-name]"` and only include the package you are working on. Refer to package naming convention above. For example, the command to build the package in `packages/shapes` is `bunx turbo make --filter="@remotion/shapes"`. ## Documentation -Any new features or settings should be documented in the `pacakges/docs` folder. +Any new features or settings should be documented in the `packages/docs` folder. - Add new pages to the sidebar: `packages/docs/sidebars.js`. -- When creating a new page, don't add the `image:` tag to the frontmatter. It will be added later. -- Generate og:images when creating new documentation pages by running `cd package/docs && bun render-cards.mjs`. Commit the created image and the changed frontmatter. +- When creating a new page or duplicating an existing page, don't add the `image:` tag to the frontmatter at first. Instead, run `cd package/docs && bun render-cards.mjs` afterwards to generate and automatically add the `image:` tag. Commit the created image and the changed frontmatter. - Usually, there is a TableOfContents.tsx file in the folder of the documentaiton for the package. Add it there as well if there is a table of contents. -## Committing +## Commit messages -- Use the commit message format "`[package-name]: [commit-message]`". Use the package name from the package naming convention above. +- Use the commit message format "`[package-name]: [commit-message]`". Use the package name from the package naming convention above, for example "`@remotion/shapes: Add heart shape`". diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 38dedddf7e7..2c10b26c835 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -27,8 +27,6 @@ jobs: - uses: oven-sh/setup-bun@v2.0.1 with: bun-version: 1.2.10 - - name: Install - run: pnpm i --frozen-lockfile - name: Cache turbo build setup uses: actions/cache@v4 with: @@ -36,3 +34,7 @@ jobs: key: ${{ runner.os }}-turbo-${{ github.sha }} restore-keys: | ${{ runner.os }}-turbo- + - name: Install + run: pnpm i --frozen-lockfile + - name: Build + run: pnpm run build diff --git a/packages/core/src/buffer-until-first-frame.ts b/packages/core/src/buffer-until-first-frame.ts index 3d023e5f871..f25d59e3680 100644 --- a/packages/core/src/buffer-until-first-frame.ts +++ b/packages/core/src/buffer-until-first-frame.ts @@ -10,12 +10,6 @@ const isSafariWebkit = () => { return isSafari; }; -const isDesktopChrome = () => { - const isChrome = /chrome/i.test(window.navigator.userAgent); - const isDesktop = !/mobile/i.test(window.navigator.userAgent); - return isChrome && isDesktop; -}; - export const useBufferUntilFirstFrame = ({ mediaRef, mediaType, @@ -50,16 +44,7 @@ export const useBufferUntilFirstFrame = ({ return; } - if ( - current.readyState >= current.HAVE_FUTURE_DATA && - !isSafariWebkit() && - // In Desktop Chrome, the video might switch to playing - // but does not play due to Bluetooth headphones - - // Enabling back this flag for Chrome without extensive testing - // because we never had big problems on Chrome - !isDesktopChrome() - ) { + if (current.readyState >= current.HAVE_FUTURE_DATA && !isSafariWebkit()) { playbackLogging({ logLevel, message: `Not using buffer until first frame, because readyState is ${current.readyState} and is not Safari or Desktop Chrome`, diff --git a/packages/docs/docs/get-audio-duration-in-seconds.mdx b/packages/docs/docs/get-audio-duration-in-seconds.mdx index c5d7266c7ca..57f7be4cb31 100644 --- a/packages/docs/docs/get-audio-duration-in-seconds.mdx +++ b/packages/docs/docs/get-audio-duration-in-seconds.mdx @@ -5,6 +5,10 @@ id: get-audio-duration-in-seconds crumb: '@remotion/media-utils' --- +:::warning Deprecated +This function has been deprecated. Use [`parseMedia()`](/docs/media-parser/parse-media) instead, which is faster and supports more formats. +::: + _Part of the `@remotion/media-utils` package of helper functions._ _Previously called `getAudioDuration()`._ diff --git a/packages/docs/docs/get-video-metadata.mdx b/packages/docs/docs/get-video-metadata.mdx index 952953f1693..fc7efd064d6 100644 --- a/packages/docs/docs/get-video-metadata.mdx +++ b/packages/docs/docs/get-video-metadata.mdx @@ -8,8 +8,8 @@ crumb: '@remotion/media-utils' _Part of the `@remotion/media-utils` package of helper functions._ :::note -Does not support H.265 videos on Linux and also fails on some other formats. Soon to be deprecated. -Suggestion: Use [`parseMedia()`](/docs/media-parser/parse-media) to get video metadata instead. +Deprecated: Does not support H.265 videos on Linux and also fails on some other formats. +Use [`parseMedia()`](/docs/media-parser/parse-media) to get video metadata instead, which is faster and supports more formats. ::: :::note diff --git a/packages/media-utils/src/get-audio-duration-in-seconds.ts b/packages/media-utils/src/get-audio-duration-in-seconds.ts index 948154dac51..6bf027bb592 100644 --- a/packages/media-utils/src/get-audio-duration-in-seconds.ts +++ b/packages/media-utils/src/get-audio-duration-in-seconds.ts @@ -45,9 +45,10 @@ const fn = (src: string): Promise => { }); }; -/* +/** * @description Gets the duration in seconds of an audio source by creating an invisible `