remotion 4.0.18 → 4.0.19

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.
@@ -65,15 +65,15 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
65
65
  // Refer to the https://github.com/remotion-dev/video-buffering-example
66
66
  // which is fixed by only seeking conditionally.
67
67
  const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > 0.00001;
68
- if (!makesSenseToSeek) {
69
- return;
70
- }
71
68
  if (!playing || absoluteFrame === 0) {
72
- mediaRef.current.currentTime = shouldBeTime;
73
- return;
69
+ if (makesSenseToSeek) {
70
+ mediaRef.current.currentTime = shouldBeTime;
71
+ }
74
72
  }
75
73
  if (mediaRef.current.paused && !mediaRef.current.ended && playing) {
76
- mediaRef.current.currentTime = shouldBeTime;
74
+ if (makesSenseToSeek) {
75
+ mediaRef.current.currentTime = shouldBeTime;
76
+ }
77
77
  (0, play_and_handle_not_allowed_error_js_1.playAndHandleNotAllowedError)(mediaRef, mediaType);
78
78
  }
79
79
  }, [
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.18";
1
+ export declare const VERSION = "4.0.19";
@@ -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.18';
5
+ exports.VERSION = '4.0.19';
@@ -59,7 +59,7 @@ function truthy(value) {
59
59
  }
60
60
 
61
61
  // Automatically generated on publish
62
- const VERSION = '4.0.18';
62
+ const VERSION = '4.0.19';
63
63
 
64
64
  const checkMultipleRemotionVersions = () => {
65
65
  if (typeof globalThis === 'undefined') {
@@ -1809,15 +1809,15 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
1809
1809
  // Refer to the https://github.com/remotion-dev/video-buffering-example
1810
1810
  // which is fixed by only seeking conditionally.
1811
1811
  const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > 0.00001;
1812
- if (!makesSenseToSeek) {
1813
- return;
1814
- }
1815
1812
  if (!playing || absoluteFrame === 0) {
1816
- mediaRef.current.currentTime = shouldBeTime;
1817
- return;
1813
+ if (makesSenseToSeek) {
1814
+ mediaRef.current.currentTime = shouldBeTime;
1815
+ }
1818
1816
  }
1819
1817
  if (mediaRef.current.paused && !mediaRef.current.ended && playing) {
1820
- mediaRef.current.currentTime = shouldBeTime;
1818
+ if (makesSenseToSeek) {
1819
+ mediaRef.current.currentTime = shouldBeTime;
1820
+ }
1821
1821
  playAndHandleNotAllowedError(mediaRef, mediaType);
1822
1822
  }
1823
1823
  }, [
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.18';
2
+ const VERSION = '4.0.19';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.18",
3
+ "version": "4.0.19",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -1,7 +0,0 @@
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 {};
@@ -1,16 +0,0 @@
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;