remotion 4.0.199 → 4.0.200

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.
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const HideSequence: React.FC<{
3
+ readonly from: number;
4
+ readonly durationInFrames: number;
5
+ readonly children: React.ReactNode;
6
+ }>;
7
+ export declare const useCustomFrame: () => number;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.useCustomFrame = exports.HideSequence = void 0;
27
+ const jsx_runtime_1 = require("react/jsx-runtime");
28
+ const react_1 = __importStar(require("react"));
29
+ const use_current_frame_1 = require("./use-current-frame");
30
+ const context = react_1.default.createContext(null);
31
+ const HideSequence = ({ from, durationInFrames, children }) => {
32
+ var _a, _b, _c;
33
+ const parent = react_1.default.useContext(context);
34
+ const frame = (0, use_current_frame_1.useCurrentFrame)();
35
+ const actualFrame = (_a = parent === null || parent === void 0 ? void 0 : parent.frame) !== null && _a !== void 0 ? _a : frame;
36
+ const cascadedFrame = actualFrame + ((_b = parent === null || parent === void 0 ? void 0 : parent.from) !== null && _b !== void 0 ? _b : 0);
37
+ const visible = cascadedFrame >= from &&
38
+ cascadedFrame < from + durationInFrames &&
39
+ ((_c = parent === null || parent === void 0 ? void 0 : parent.visible) !== null && _c !== void 0 ? _c : true);
40
+ const value = (0, react_1.useMemo)(() => {
41
+ return {
42
+ from,
43
+ durationInFrames,
44
+ visible,
45
+ frame: cascadedFrame,
46
+ };
47
+ }, [cascadedFrame, durationInFrames, from, visible]);
48
+ return (0, jsx_runtime_1.jsx)(context.Provider, { value: value, children: children });
49
+ };
50
+ exports.HideSequence = HideSequence;
51
+ const useCustomFrame = () => {
52
+ const ctx = react_1.default.useContext(context);
53
+ const frame = (0, use_current_frame_1.useCurrentFrame)();
54
+ if (!ctx) {
55
+ return frame;
56
+ }
57
+ return ctx.frame;
58
+ };
59
+ exports.useCustomFrame = useCustomFrame;
@@ -3,4 +3,4 @@
3
3
  * @see [Documentation](https://remotion.dev/docs/version)
4
4
  * @returns {string} The current version of the remotion package
5
5
  */
6
- export declare const VERSION = "4.0.199";
6
+ export declare const VERSION = "4.0.200";
@@ -7,4 +7,4 @@ exports.VERSION = void 0;
7
7
  * @see [Documentation](https://remotion.dev/docs/version)
8
8
  * @returns {string} The current version of the remotion package
9
9
  */
10
- exports.VERSION = '4.0.199';
10
+ exports.VERSION = '4.0.200';
@@ -143,6 +143,10 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
143
143
  if (controller.signal.aborted) {
144
144
  return;
145
145
  }
146
+ if (err.message.includes('Failed to fetch')) {
147
+ // eslint-disable-next-line no-ex-assign
148
+ err = new Error(`Failed to fetch ${actualSrc}. This could be caused by Chrome rejecting the request because the disk space is low. Consider increasing the disk size of your environment.`, { cause: err });
149
+ }
146
150
  if (onError) {
147
151
  onError(err);
148
152
  }
@@ -155,7 +155,7 @@ function truthy(value) {
155
155
  }
156
156
 
157
157
  // src/version.ts
158
- var VERSION = "4.0.199";
158
+ var VERSION = "4.0.200";
159
159
 
160
160
  // src/multiple-versions-warning.ts
161
161
  var checkMultipleRemotionVersions = () => {
@@ -5958,6 +5958,9 @@ var OffthreadVideoForRendering = ({
5958
5958
  if (controller.signal.aborted) {
5959
5959
  return;
5960
5960
  }
5961
+ if (err.message.includes("Failed to fetch")) {
5962
+ err = new Error(`Failed to fetch ${actualSrc}. This could be caused by Chrome rejecting the request because the disk space is low. Consider increasing the disk size of your environment.`, { cause: err });
5963
+ }
5961
5964
  if (onError) {
5962
5965
  onError(err);
5963
5966
  } else {
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.199";
2
+ var VERSION = "4.0.200";
3
3
  export {
4
4
  VERSION
5
5
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
4
4
  },
5
5
  "name": "remotion",
6
- "version": "4.0.199",
6
+ "version": "4.0.200",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",