remotion 4.0.22 → 4.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -323,8 +323,7 @@ function normalizeColor(color) {
323
323
  if ((match = matchers.hsl.exec(color))) {
324
324
  return ((hslToRgb(parse360(match[1]), // h
325
325
  parsePercentage(match[2]), // s
326
- parsePercentage(match[3]) // l
327
- ) |
326
+ parsePercentage(match[3])) |
328
327
  0x000000ff) >>> // a
329
328
  0);
330
329
  }
@@ -333,8 +332,7 @@ function normalizeColor(color) {
333
332
  if ((match = matchers.hsla.exec(color))) {
334
333
  return ((hslToRgb(parse360(match[1]), // h
335
334
  parsePercentage(match[2]), // s
336
- parsePercentage(match[3]) // l
337
- ) |
335
+ parsePercentage(match[3])) |
338
336
  parse1(match[4])) >>> // a
339
337
  0);
340
338
  }
@@ -0,0 +1,7 @@
1
+ type ContinueRenderFnBinded = () => void;
2
+ /**
3
+ * @description Same as delayRender(), but as a hook.
4
+ * @see [Documentation](https://remotion.dev/docs/use-delay-render)
5
+ */
6
+ export declare const useDelayRender: (label?: string) => ContinueRenderFnBinded;
7
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useDelayRender = void 0;
4
+ const react_1 = require("react");
5
+ const delay_render_js_1 = require("./delay-render.js");
6
+ /**
7
+ * @description Same as delayRender(), but as a hook.
8
+ * @see [Documentation](https://remotion.dev/docs/use-delay-render)
9
+ */
10
+ const useDelayRender = (label) => {
11
+ const [handle] = (0, react_1.useState)(() => (0, delay_render_js_1.delayRender)(label));
12
+ return (0, react_1.useCallback)(() => {
13
+ (0, delay_render_js_1.continueRender)(handle);
14
+ }, [handle]);
15
+ };
16
+ exports.useDelayRender = useDelayRender;
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.22";
1
+ export declare const VERSION = "4.0.24";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Automatically generated on publish
5
- exports.VERSION = '4.0.22';
5
+ exports.VERSION = '4.0.24';
@@ -115,7 +115,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
115
115
  // Without this, on iOS Safari, the video cannot be seeked.
116
116
  // if a seek is triggered before `loadedmetadata` is fired,
117
117
  // the video will not seek, even if `loadedmetadata` is fired afterwards.
118
- preload: "metadata", muted: muted || mediaMuted, playsInline: true, src: actualSrc, ...nativeProps }));
118
+ preload: (0, video_fragment_js_1.isIosSafari)() ? 'metadata' : 'auto', muted: muted || mediaMuted, playsInline: true, src: actualSrc, ...nativeProps }));
119
119
  };
120
120
  // Copy types from forwardRef but not necessary to remove ref
121
121
  exports.VideoForDevelopment = (0, react_1.forwardRef)(VideoForDevelopmentRefForwardingFunction);
@@ -59,7 +59,7 @@ function truthy(value) {
59
59
  }
60
60
 
61
61
  // Automatically generated on publish
62
- const VERSION = '4.0.22';
62
+ const VERSION = '4.0.24';
63
63
 
64
64
  const checkMultipleRemotionVersions = () => {
65
65
  if (typeof globalThis === 'undefined') {
@@ -3616,8 +3616,7 @@ function normalizeColor(color) {
3616
3616
  if ((match = matchers.hsl.exec(color))) {
3617
3617
  return ((hslToRgb(parse360(match[1]), // h
3618
3618
  parsePercentage(match[2]), // s
3619
- parsePercentage(match[3]) // l
3620
- ) |
3619
+ parsePercentage(match[3])) |
3621
3620
  0x000000ff) >>> // a
3622
3621
  0);
3623
3622
  }
@@ -3626,8 +3625,7 @@ function normalizeColor(color) {
3626
3625
  if ((match = matchers.hsla.exec(color))) {
3627
3626
  return ((hslToRgb(parse360(match[1]), // h
3628
3627
  parsePercentage(match[2]), // s
3629
- parsePercentage(match[3]) // l
3630
- ) |
3628
+ parsePercentage(match[3])) |
3631
3629
  parse1(match[4])) >>> // a
3632
3630
  0);
3633
3631
  }
@@ -4468,7 +4466,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
4468
4466
  // Without this, on iOS Safari, the video cannot be seeked.
4469
4467
  // if a seek is triggered before `loadedmetadata` is fired,
4470
4468
  // the video will not seek, even if `loadedmetadata` is fired afterwards.
4471
- preload: "metadata", muted: muted || mediaMuted, playsInline: true, src: actualSrc, ...nativeProps }));
4469
+ preload: isIosSafari() ? 'metadata' : 'auto', muted: muted || mediaMuted, playsInline: true, src: actualSrc, ...nativeProps }));
4472
4470
  };
4473
4471
  // Copy types from forwardRef but not necessary to remove ref
4474
4472
  const VideoForDevelopment = forwardRef(VideoForDevelopmentRefForwardingFunction);
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.22';
2
+ const VERSION = '4.0.24';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.22",
3
+ "version": "4.0.24",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "eslint": "8.42.0",
29
29
  "eslint-plugin-require-extensions": "^0.1.2",
30
30
  "jsdom": "21.1.0",
31
- "prettier": "^2.7.1",
31
+ "prettier": "3.0.2",
32
32
  "prettier-plugin-organize-imports": "^3.2.2",
33
33
  "react": "^18.0.0",
34
34
  "react-dom": "^18.0.0",