remotion 4.0.74 → 4.0.75

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.
@@ -16,6 +16,7 @@ const IFrameRefForwarding = ({ onLoad, onError, ...props }, ref) => {
16
16
  onError(e);
17
17
  }
18
18
  else {
19
+ // eslint-disable-next-line no-console
19
20
  console.error('Error loading iframe:', e, 'Handle the event using the onError() prop to make this message disappear.');
20
21
  }
21
22
  }, [handle, onError]);
package/dist/cjs/Img.js CHANGED
@@ -53,6 +53,7 @@ const ImgRefForwarding = ({ onError, maxRetries = 2, src, ...props }, ref) => {
53
53
  }
54
54
  if (((_g = errors.current[(_f = imageRef.current) === null || _f === void 0 ? void 0 : _f.src]) !== null && _g !== void 0 ? _g : 0) <= maxRetries) {
55
55
  const backoff = exponentialBackoff((_j = errors.current[(_h = imageRef.current) === null || _h === void 0 ? void 0 : _h.src]) !== null && _j !== void 0 ? _j : 0);
56
+ // eslint-disable-next-line no-console
56
57
  console.warn(`Could not load image with source ${(_k = imageRef.current) === null || _k === void 0 ? void 0 : _k.src}, retrying again in ${backoff}ms`);
57
58
  retryIn(backoff);
58
59
  return;
@@ -71,6 +72,7 @@ const ImgRefForwarding = ({ onError, maxRetries = 2, src, ...props }, ref) => {
71
72
  var _a, _b, _c, _d;
72
73
  if (((_b = errors.current[(_a = imageRef.current) === null || _a === void 0 ? void 0 : _a.src]) !== null && _b !== void 0 ? _b : 0) > 0) {
73
74
  delete errors.current[(_c = imageRef.current) === null || _c === void 0 ? void 0 : _c.src];
75
+ // eslint-disable-next-line no-console
74
76
  console.info(`Retry successful - ${(_d = imageRef.current) === null || _d === void 0 ? void 0 : _d.src} is now loaded`);
75
77
  }
76
78
  (0, delay_render_js_1.continueRender)(newHandle);
@@ -31,6 +31,7 @@ const AudioRefForwardingFunction = (props, ref) => {
31
31
  }
32
32
  const preloadedSrc = (0, prefetch_js_1.usePreload)(props.src);
33
33
  const onError = (0, react_1.useCallback)((e) => {
34
+ // eslint-disable-next-line no-console
34
35
  console.log(e.currentTarget.error);
35
36
  // If there is no `loop` property, we don't need to get the duration
36
37
  // and this does not need to be a fatal error
@@ -39,6 +40,7 @@ const AudioRefForwardingFunction = (props, ref) => {
39
40
  (0, cancel_render_js_1.cancelRender)(new Error(errMessage));
40
41
  }
41
42
  else {
43
+ // eslint-disable-next-line no-console
42
44
  console.warn(errMessage);
43
45
  }
44
46
  }, [loop, preloadedSrc]);
@@ -30,7 +30,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
30
30
  sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom,
31
31
  sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames,
32
32
  ]);
33
- const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, ...nativeProps } = props;
33
+ const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, onError, ...nativeProps } = props;
34
34
  const volume = (0, volume_prop_js_1.evaluateVolume)({
35
35
  volume: volumeProp,
36
36
  frame: volumePropFrame,
@@ -9,8 +9,11 @@ const warnOnceSSRImport = () => {
9
9
  return;
10
10
  }
11
11
  didWarnSSRImport = true;
12
+ // eslint-disable-next-line no-console
12
13
  console.warn('Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object.');
14
+ // eslint-disable-next-line no-console
13
15
  console.warn("To hide this warning, don't call this function on the server:");
16
+ // eslint-disable-next-line no-console
14
17
  console.warn(" typeof window === 'undefined' ? {} : getInputProps()");
15
18
  };
16
19
  const getInputProps = () => {
@@ -8,6 +8,7 @@ const warnServerOnce = () => {
8
8
  return;
9
9
  }
10
10
  warnedServer = true;
11
+ // eslint-disable-next-line no-console
11
12
  console.warn('Called getStaticFiles() on the server. The API is only available in the browser. An empty array was returned.');
12
13
  };
13
14
  const warnPlayerOnce = () => {
@@ -15,6 +16,7 @@ const warnPlayerOnce = () => {
15
16
  return;
16
17
  }
17
18
  warnedPlayer = true;
19
+ // eslint-disable-next-line no-console
18
20
  console.warn('Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Studio. An empty array was returned.');
19
21
  };
20
22
  /**
package/dist/cjs/index.js CHANGED
@@ -94,6 +94,7 @@ exports.Config = new Proxy(proxyObj, {
94
94
  return exports.Config;
95
95
  }
96
96
  return () => {
97
+ /* eslint-disable no-console */
97
98
  console.warn('⚠️ The CLI configuration has been extracted from Remotion Core.');
98
99
  console.warn('Update the import from the config file:');
99
100
  console.warn();
@@ -103,6 +104,7 @@ exports.Config = new Proxy(proxyObj, {
103
104
  console.warn('import {Config} from "@remotion/cli/config";');
104
105
  console.warn();
105
106
  console.warn('For more information, see https://www.remotion.dev/docs/4-0-migration.');
107
+ /* eslint-enable no-console */
106
108
  process.exit(1);
107
109
  };
108
110
  },
@@ -32,8 +32,10 @@ const playAndHandleNotAllowedError = (mediaRef, mediaType) => {
32
32
  if (err.message.includes('because the media was removed from the document')) {
33
33
  return;
34
34
  }
35
+ // eslint-disable-next-line no-console
35
36
  console.log(`Could not play ${mediaType} due to following error: `, err);
36
37
  if (!current.muted) {
38
+ // eslint-disable-next-line no-console
37
39
  console.log(`The video will be muted and we'll retry playing it.`, err);
38
40
  current.muted = true;
39
41
  current.play();
@@ -66,6 +66,7 @@ const prefetch = (src, options) => {
66
66
  if (!buf.type.startsWith('video/') &&
67
67
  !buf.type.startsWith('audio/') &&
68
68
  !(options === null || options === void 0 ? void 0 : options.contentType)) {
69
+ // eslint-disable-next-line no-console
69
70
  console.warn(`Called prefetch() on ${src} which returned a "Content-Type" of ${buf.type}. Prefetched content should have a proper content type (video/... or audio/...) or a contentType passed the options of prefetch(). Otherwise, prefetching will not work properly in all browsers.`);
70
71
  }
71
72
  const actualBlob = (options === null || options === void 0 ? void 0 : options.contentType)
@@ -25,6 +25,7 @@ const warnOnce = (message) => {
25
25
  if (didWarn[message]) {
26
26
  return;
27
27
  }
28
+ // eslint-disable-next-line no-console
28
29
  console.warn(message);
29
30
  didWarn[message] = true;
30
31
  };
@@ -17,6 +17,7 @@ const warnOnce = (message) => {
17
17
  if (didWarn[message]) {
18
18
  return;
19
19
  }
20
+ // eslint-disable-next-line no-console
20
21
  console.warn(message);
21
22
  didWarn[message] = true;
22
23
  };
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.74";
1
+ export declare const VERSION = "4.0.75";
@@ -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.74';
5
+ exports.VERSION = '4.0.75';
@@ -75,6 +75,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
75
75
  const errorHandler = () => {
76
76
  var _a;
77
77
  if (current === null || current === void 0 ? void 0 : current.error) {
78
+ // eslint-disable-next-line no-console
78
79
  console.error('Error occurred in video', current === null || current === void 0 ? void 0 : current.error);
79
80
  // If user is handling the error, we don't cause an unhandled exception
80
81
  if (props.onError) {
@@ -147,6 +147,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
147
147
  const errorHandler = () => {
148
148
  var _a;
149
149
  if (current === null || current === void 0 ? void 0 : current.error) {
150
+ // eslint-disable-next-line no-console
150
151
  console.error('Error occurred in video', current === null || current === void 0 ? void 0 : current.error);
151
152
  // If user is handling the error, we don't cause an unhandled exception
152
153
  if (onError) {
@@ -20,9 +20,11 @@ const warnAboutNonSeekableMedia = (ref, type) => {
20
20
  if (range.start === 0 && range.end === 0) {
21
21
  const msg = `The media ${ref.src} cannot be seeked. This could be one of two reasons: 1) The media resource was replaced while the video is playing but it was not loaded yet. 2) The media does not support seeking. Please see https://remotion.dev/docs/non-seekable-media for assistance.`;
22
22
  if (type === 'console-error') {
23
+ // eslint-disable-next-line no-console
23
24
  console.error(msg);
24
25
  }
25
26
  else if (type === 'console-warning') {
27
+ // eslint-disable-next-line no-console
26
28
  console.warn(`The media ${ref.src} does not support seeking. The video will render fine, but may not play correctly in the Remotion Studio and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`);
27
29
  }
28
30
  else {
@@ -13,6 +13,7 @@ exports.WATCH_REMOTION_STATIC_FILES = 'remotion_staticFilesChanged';
13
13
  const watchStaticFile = (fileName, callback) => {
14
14
  // Check if function is called in Remotion Studio
15
15
  if (!(0, get_remotion_environment_1.getRemotionEnvironment)().isStudio) {
16
+ // eslint-disable-next-line no-console
16
17
  console.warn('The API is only available while using the Remotion Studio.');
17
18
  return { cancel: () => undefined };
18
19
  }
@@ -59,7 +59,7 @@ function truthy(value) {
59
59
  }
60
60
 
61
61
  // Automatically generated on publish
62
- const VERSION = '4.0.74';
62
+ const VERSION = '4.0.75';
63
63
 
64
64
  const checkMultipleRemotionVersions = () => {
65
65
  if (typeof globalThis === 'undefined') {
@@ -352,6 +352,7 @@ const warnOnce$1 = (message) => {
352
352
  if (didWarn$1[message]) {
353
353
  return;
354
354
  }
355
+ // eslint-disable-next-line no-console
355
356
  console.warn(message);
356
357
  didWarn$1[message] = true;
357
358
  };
@@ -444,8 +445,11 @@ const warnOnceSSRImport = () => {
444
445
  return;
445
446
  }
446
447
  didWarnSSRImport = true;
448
+ // eslint-disable-next-line no-console
447
449
  console.warn('Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object.');
450
+ // eslint-disable-next-line no-console
448
451
  console.warn("To hide this warning, don't call this function on the server:");
452
+ // eslint-disable-next-line no-console
449
453
  console.warn(" typeof window === 'undefined' ? {} : getInputProps()");
450
454
  };
451
455
  const getInputProps = () => {
@@ -1259,6 +1263,7 @@ const prefetch = (src, options) => {
1259
1263
  if (!buf.type.startsWith('video/') &&
1260
1264
  !buf.type.startsWith('audio/') &&
1261
1265
  !(options === null || options === void 0 ? void 0 : options.contentType)) {
1266
+ // eslint-disable-next-line no-console
1262
1267
  console.warn(`Called prefetch() on ${src} which returned a "Content-Type" of ${buf.type}. Prefetched content should have a proper content type (video/... or audio/...) or a contentType passed the options of prefetch(). Otherwise, prefetching will not work properly in all browsers.`);
1263
1268
  }
1264
1269
  const actualBlob = (options === null || options === void 0 ? void 0 : options.contentType)
@@ -1484,8 +1489,10 @@ const playAndHandleNotAllowedError = (mediaRef, mediaType) => {
1484
1489
  if (err.message.includes('because the media was removed from the document')) {
1485
1490
  return;
1486
1491
  }
1492
+ // eslint-disable-next-line no-console
1487
1493
  console.log(`Could not play ${mediaType} due to following error: `, err);
1488
1494
  if (!current.muted) {
1495
+ // eslint-disable-next-line no-console
1489
1496
  console.log(`The video will be muted and we'll retry playing it.`, err);
1490
1497
  current.muted = true;
1491
1498
  current.play();
@@ -1520,6 +1527,7 @@ const warnOnce = (message) => {
1520
1527
  if (didWarn[message]) {
1521
1528
  return;
1522
1529
  }
1530
+ // eslint-disable-next-line no-console
1523
1531
  console.warn(message);
1524
1532
  didWarn[message] = true;
1525
1533
  };
@@ -1846,9 +1854,11 @@ const warnAboutNonSeekableMedia = (ref, type) => {
1846
1854
  if (range.start === 0 && range.end === 0) {
1847
1855
  const msg = `The media ${ref.src} cannot be seeked. This could be one of two reasons: 1) The media resource was replaced while the video is playing but it was not loaded yet. 2) The media does not support seeking. Please see https://remotion.dev/docs/non-seekable-media for assistance.`;
1848
1856
  if (type === 'console-error') {
1857
+ // eslint-disable-next-line no-console
1849
1858
  console.error(msg);
1850
1859
  }
1851
1860
  else if (type === 'console-warning') {
1861
+ // eslint-disable-next-line no-console
1852
1862
  console.warn(`The media ${ref.src} does not support seeking. The video will render fine, but may not play correctly in the Remotion Studio and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`);
1853
1863
  }
1854
1864
  else {
@@ -1912,18 +1922,6 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
1912
1922
  startFrom: -mediaStartsAt,
1913
1923
  mediaType,
1914
1924
  });
1915
- console.log({
1916
- desiredUnclampedTime,
1917
- cur: mediaRef.current.currentTime,
1918
- paused: mediaRef.current.paused,
1919
- ended: mediaRef.current.ended,
1920
- loadedStart: mediaRef.current.seekable.length > 0
1921
- ? mediaRef.current.seekable.start(0)
1922
- : null,
1923
- loadedEnd: mediaRef.current.seekable.length > 0
1924
- ? mediaRef.current.seekable.end(0)
1925
- : null,
1926
- });
1927
1925
  const { duration } = mediaRef.current;
1928
1926
  const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration)
1929
1927
  ? Math.min(duration, desiredUnclampedTime)
@@ -2491,7 +2489,7 @@ const AudioForRenderingRefForwardingFunction = (props, ref) => {
2491
2489
  sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom,
2492
2490
  sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames,
2493
2491
  ]);
2494
- const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, ...nativeProps } = props;
2492
+ const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, onError, ...nativeProps } = props;
2495
2493
  const volume = evaluateVolume({
2496
2494
  volume: volumeProp,
2497
2495
  frame: volumePropFrame,
@@ -2595,6 +2593,7 @@ const AudioRefForwardingFunction = (props, ref) => {
2595
2593
  }
2596
2594
  const preloadedSrc = usePreload(props.src);
2597
2595
  const onError = useCallback((e) => {
2596
+ // eslint-disable-next-line no-console
2598
2597
  console.log(e.currentTarget.error);
2599
2598
  // If there is no `loop` property, we don't need to get the duration
2600
2599
  // and this does not need to be a fatal error
@@ -2603,6 +2602,7 @@ const AudioRefForwardingFunction = (props, ref) => {
2603
2602
  cancelRender(new Error(errMessage));
2604
2603
  }
2605
2604
  else {
2605
+ // eslint-disable-next-line no-console
2606
2606
  console.warn(errMessage);
2607
2607
  }
2608
2608
  }, [loop, preloadedSrc]);
@@ -3101,6 +3101,7 @@ const warnServerOnce = () => {
3101
3101
  return;
3102
3102
  }
3103
3103
  warnedServer = true;
3104
+ // eslint-disable-next-line no-console
3104
3105
  console.warn('Called getStaticFiles() on the server. The API is only available in the browser. An empty array was returned.');
3105
3106
  };
3106
3107
  const warnPlayerOnce = () => {
@@ -3108,6 +3109,7 @@ const warnPlayerOnce = () => {
3108
3109
  return;
3109
3110
  }
3110
3111
  warnedPlayer = true;
3112
+ // eslint-disable-next-line no-console
3111
3113
  console.warn('Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Studio. An empty array was returned.');
3112
3114
  };
3113
3115
  /**
@@ -3138,6 +3140,7 @@ const IFrameRefForwarding = ({ onLoad, onError, ...props }, ref) => {
3138
3140
  onError(e);
3139
3141
  }
3140
3142
  else {
3143
+ // eslint-disable-next-line no-console
3141
3144
  console.error('Error loading iframe:', e, 'Handle the event using the onError() prop to make this message disappear.');
3142
3145
  }
3143
3146
  }, [handle, onError]);
@@ -3196,6 +3199,7 @@ const ImgRefForwarding = ({ onError, maxRetries = 2, src, ...props }, ref) => {
3196
3199
  }
3197
3200
  if (((_g = errors.current[(_f = imageRef.current) === null || _f === void 0 ? void 0 : _f.src]) !== null && _g !== void 0 ? _g : 0) <= maxRetries) {
3198
3201
  const backoff = exponentialBackoff((_j = errors.current[(_h = imageRef.current) === null || _h === void 0 ? void 0 : _h.src]) !== null && _j !== void 0 ? _j : 0);
3202
+ // eslint-disable-next-line no-console
3199
3203
  console.warn(`Could not load image with source ${(_k = imageRef.current) === null || _k === void 0 ? void 0 : _k.src}, retrying again in ${backoff}ms`);
3200
3204
  retryIn(backoff);
3201
3205
  return;
@@ -3214,6 +3218,7 @@ const ImgRefForwarding = ({ onError, maxRetries = 2, src, ...props }, ref) => {
3214
3218
  var _a, _b, _c, _d;
3215
3219
  if (((_b = errors.current[(_a = imageRef.current) === null || _a === void 0 ? void 0 : _a.src]) !== null && _b !== void 0 ? _b : 0) > 0) {
3216
3220
  delete errors.current[(_c = imageRef.current) === null || _c === void 0 ? void 0 : _c.src];
3221
+ // eslint-disable-next-line no-console
3217
3222
  console.info(`Retry successful - ${(_d = imageRef.current) === null || _d === void 0 ? void 0 : _d.src} is now loaded`);
3218
3223
  }
3219
3224
  continueRender(newHandle);
@@ -3519,6 +3524,7 @@ const WATCH_REMOTION_STATIC_FILES = 'remotion_staticFilesChanged';
3519
3524
  const watchStaticFile = (fileName, callback) => {
3520
3525
  // Check if function is called in Remotion Studio
3521
3526
  if (!getRemotionEnvironment().isStudio) {
3527
+ // eslint-disable-next-line no-console
3522
3528
  console.warn('The API is only available while using the Remotion Studio.');
3523
3529
  return { cancel: () => undefined };
3524
3530
  }
@@ -4568,6 +4574,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
4568
4574
  const errorHandler = () => {
4569
4575
  var _a;
4570
4576
  if (current === null || current === void 0 ? void 0 : current.error) {
4577
+ // eslint-disable-next-line no-console
4571
4578
  console.error('Error occurred in video', current === null || current === void 0 ? void 0 : current.error);
4572
4579
  // If user is handling the error, we don't cause an unhandled exception
4573
4580
  if (props.onError) {
@@ -4787,6 +4794,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
4787
4794
  const errorHandler = () => {
4788
4795
  var _a;
4789
4796
  if (current === null || current === void 0 ? void 0 : current.error) {
4797
+ // eslint-disable-next-line no-console
4790
4798
  console.error('Error occurred in video', current === null || current === void 0 ? void 0 : current.error);
4791
4799
  // If user is handling the error, we don't cause an unhandled exception
4792
4800
  if (onError) {
@@ -4919,6 +4927,7 @@ const Config = new Proxy(proxyObj, {
4919
4927
  return Config;
4920
4928
  }
4921
4929
  return () => {
4930
+ /* eslint-disable no-console */
4922
4931
  console.warn('⚠️ The CLI configuration has been extracted from Remotion Core.');
4923
4932
  console.warn('Update the import from the config file:');
4924
4933
  console.warn();
@@ -4928,6 +4937,7 @@ const Config = new Proxy(proxyObj, {
4928
4937
  console.warn('import {Config} from "@remotion/cli/config";');
4929
4938
  console.warn();
4930
4939
  console.warn('For more information, see https://www.remotion.dev/docs/4-0-migration.');
4940
+ /* eslint-enable no-console */
4931
4941
  process.exit(1);
4932
4942
  };
4933
4943
  },
@@ -186,6 +186,7 @@ const warnOnce = (message) => {
186
186
  if (didWarn[message]) {
187
187
  return;
188
188
  }
189
+ // eslint-disable-next-line no-console
189
190
  console.warn(message);
190
191
  didWarn[message] = true;
191
192
  };
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.74';
2
+ const VERSION = '4.0.75';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.74",
3
+ "version": "4.0.75",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",