remotion 4.0.352 → 4.0.353

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.
@@ -11,7 +11,7 @@ const warnOnce = (logLevel) => {
11
11
  warned = true;
12
12
  // Don't pullute logs if in SSR
13
13
  if (typeof window !== 'undefined') {
14
- log_1.Log.warn(logLevel, 'AudioContext is not supported in this browser');
14
+ log_1.Log.warn({ logLevel, tag: null }, 'AudioContext is not supported in this browser');
15
15
  }
16
16
  };
17
17
  const useSingletonAudioContext = (logLevel, latencyHint) => {
@@ -92,13 +92,13 @@ const continueRenderInternal = (handle, environment) => {
92
92
  const { label, startTime, timeout } = window.remotion_delayRenderTimeouts[handle];
93
93
  clearTimeout(timeout);
94
94
  const message = [
95
- label ? `delayRender() "${label}"` : 'A delayRender()',
95
+ label ? `"${label}"` : 'A handle',
96
96
  exports.DELAY_RENDER_CLEAR_TOKEN,
97
97
  `${Date.now() - startTime}ms`,
98
98
  ]
99
99
  .filter(truthy_js_1.truthy)
100
100
  .join(' ');
101
- log_js_1.Log.verbose(window.remotion_logLevel, message);
101
+ log_js_1.Log.verbose({ logLevel: window.remotion_logLevel, tag: 'delayRender()' }, message);
102
102
  delete window.remotion_delayRenderTimeouts[handle];
103
103
  }
104
104
  return false;
@@ -53,6 +53,16 @@ const Freeze = ({ frame: frameToFreeze, children, active = true, }) => {
53
53
  },
54
54
  };
55
55
  }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
56
- return ((0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: timelineValue, children: children }));
56
+ const newSequenceContext = (0, react_1.useMemo)(() => {
57
+ if (!sequenceContext) {
58
+ return null;
59
+ }
60
+ return {
61
+ ...sequenceContext,
62
+ relativeFrom: 0,
63
+ cumulatedFrom: 0,
64
+ };
65
+ }, [sequenceContext]);
66
+ return ((0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: timelineValue, children: (0, jsx_runtime_1.jsx)(SequenceContext_js_1.SequenceContext.Provider, { value: newSequenceContext, children: children }) }));
57
67
  };
58
68
  exports.Freeze = Freeze;
@@ -237,11 +237,26 @@ export declare const Internals: {
237
237
  readonly PROPS_UPDATED_EXTERNALLY: "remotion.propsUpdatedExternally";
238
238
  readonly validateRenderAsset: (artifact: TRenderAsset) => void;
239
239
  readonly Log: {
240
- trace: (logLevel: import("./log.js").LogLevel, message?: any, ...optionalParams: any[]) => void;
241
- verbose: (logLevel: import("./log.js").LogLevel, message?: any, ...optionalParams: any[]) => void;
242
- info: (logLevel: import("./log.js").LogLevel, message?: any, ...optionalParams: any[]) => void;
243
- warn: (logLevel: import("./log.js").LogLevel, message?: any, ...optionalParams: any[]) => void;
244
- error: (message?: any, ...optionalParams: any[]) => void;
240
+ trace: (options: {
241
+ logLevel: import("./log.js").LogLevel;
242
+ tag: string | null;
243
+ }, message?: any, ...optionalParams: any[]) => void;
244
+ verbose: (options: {
245
+ logLevel: import("./log.js").LogLevel;
246
+ tag: string | null;
247
+ }, message?: any, ...optionalParams: any[]) => void;
248
+ info: (options: {
249
+ logLevel: import("./log.js").LogLevel;
250
+ tag: string | null;
251
+ }, message?: any, ...optionalParams: any[]) => void;
252
+ warn: (options: {
253
+ logLevel: import("./log.js").LogLevel;
254
+ tag: string | null;
255
+ }, message?: any, ...optionalParams: any[]) => void;
256
+ error: (options: {
257
+ logLevel: import("./log.js").LogLevel;
258
+ tag: string | null;
259
+ }, message?: any, ...optionalParams: any[]) => void;
245
260
  };
246
261
  readonly LogLevelContext: import("react").Context<LoggingContextValue>;
247
262
  readonly useLogLevel: () => import("./log.js").LogLevel;
package/dist/cjs/log.d.ts CHANGED
@@ -1,10 +1,15 @@
1
1
  export declare const logLevels: readonly ["trace", "verbose", "info", "warn", "error"];
2
2
  export type LogLevel = (typeof logLevels)[number];
3
3
  export declare const isEqualOrBelowLogLevel: (currentLevel: LogLevel, level: LogLevel) => boolean;
4
+ type Options = {
5
+ logLevel: LogLevel;
6
+ tag: string | null;
7
+ };
4
8
  export declare const Log: {
5
- trace: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
6
- verbose: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
7
- info: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
8
- warn: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
9
- error: (message?: any, ...optionalParams: any[]) => void;
9
+ trace: (options: Options, message?: any, ...optionalParams: any[]) => void;
10
+ verbose: (options: Options, message?: any, ...optionalParams: any[]) => void;
11
+ info: (options: Options, message?: any, ...optionalParams: any[]) => void;
12
+ warn: (options: Options, message?: any, ...optionalParams: any[]) => void;
13
+ error: (options: Options, message?: any, ...optionalParams: any[]) => void;
10
14
  };
15
+ export {};
package/dist/cjs/log.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Log = exports.isEqualOrBelowLogLevel = exports.logLevels = void 0;
4
+ const get_remotion_environment_1 = require("./get-remotion-environment");
4
5
  /* eslint-disable no-console */
5
6
  exports.logLevels = ['trace', 'verbose', 'info', 'warn', 'error'];
6
7
  const getNumberForLogLevel = (level) => {
@@ -10,28 +11,44 @@ const isEqualOrBelowLogLevel = (currentLevel, level) => {
10
11
  return getNumberForLogLevel(currentLevel) <= getNumberForLogLevel(level);
11
12
  };
12
13
  exports.isEqualOrBelowLogLevel = isEqualOrBelowLogLevel;
14
+ const transformArgs = ({ args, logLevel, tag, }) => {
15
+ const arr = [...args];
16
+ if ((0, get_remotion_environment_1.getRemotionEnvironment)().isRendering &&
17
+ !(0, get_remotion_environment_1.getRemotionEnvironment)().isClientSideRendering) {
18
+ arr.unshift(Symbol.for(`__remotion_level_${logLevel}`));
19
+ }
20
+ if (tag) {
21
+ arr.unshift(Symbol.for(`__remotion_tag_${tag}`));
22
+ }
23
+ return arr;
24
+ };
25
+ const verbose = (options, ...args) => {
26
+ if ((0, exports.isEqualOrBelowLogLevel)(options.logLevel, 'verbose')) {
27
+ return console.debug(...transformArgs({ args, logLevel: 'verbose', tag: options.tag }));
28
+ }
29
+ };
30
+ const trace = (options, ...args) => {
31
+ if ((0, exports.isEqualOrBelowLogLevel)(options.logLevel, 'trace')) {
32
+ return console.debug(...transformArgs({ args, logLevel: 'trace', tag: options.tag }));
33
+ }
34
+ };
35
+ const info = (options, ...args) => {
36
+ if ((0, exports.isEqualOrBelowLogLevel)(options.logLevel, 'info')) {
37
+ return console.log(...transformArgs({ args, logLevel: 'info', tag: options.tag }));
38
+ }
39
+ };
40
+ const warn = (options, ...args) => {
41
+ if ((0, exports.isEqualOrBelowLogLevel)(options.logLevel, 'warn')) {
42
+ return console.warn(...transformArgs({ args, logLevel: 'warn', tag: options.tag }));
43
+ }
44
+ };
45
+ const error = (options, ...args) => {
46
+ return console.error(...transformArgs({ args, logLevel: 'error', tag: options.tag }));
47
+ };
13
48
  exports.Log = {
14
- trace: (logLevel, ...args) => {
15
- if ((0, exports.isEqualOrBelowLogLevel)(logLevel, 'trace')) {
16
- return console.log(...args);
17
- }
18
- },
19
- verbose: (logLevel, ...args) => {
20
- if ((0, exports.isEqualOrBelowLogLevel)(logLevel, 'verbose')) {
21
- return console.log(...args);
22
- }
23
- },
24
- info: (logLevel, ...args) => {
25
- if ((0, exports.isEqualOrBelowLogLevel)(logLevel, 'info')) {
26
- return console.log(...args);
27
- }
28
- },
29
- warn: (logLevel, ...args) => {
30
- if ((0, exports.isEqualOrBelowLogLevel)(logLevel, 'warn')) {
31
- return console.warn(...args);
32
- }
33
- },
34
- error: (...args) => {
35
- return console.error(...args);
36
- },
49
+ trace,
50
+ verbose,
51
+ info,
52
+ warn,
53
+ error,
37
54
  };
@@ -6,6 +6,6 @@ const playbackLogging = ({ logLevel, tag, message, mountTime, }) => {
6
6
  const tags = [mountTime ? Date.now() - mountTime + 'ms ' : null, tag]
7
7
  .filter(Boolean)
8
8
  .join(' ');
9
- log_1.Log.trace(logLevel, `[${tags}]`, message);
9
+ log_1.Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
10
10
  };
11
11
  exports.playbackLogging = playbackLogging;
@@ -87,7 +87,7 @@ const prefetch = (src, options) => {
87
87
  waitUntilDone: () => Promise.resolve(srcWithoutHash),
88
88
  };
89
89
  }
90
- log_js_1.Log.verbose(logLevel, `[prefetch] Starting prefetch ${srcWithoutHash}`);
90
+ log_js_1.Log.verbose({ logLevel, tag: 'prefetch' }, `Starting prefetch ${srcWithoutHash}`);
91
91
  let canceled = false;
92
92
  let objectUrl = null;
93
93
  let resolve = () => undefined;
@@ -12,9 +12,9 @@ const warnSafariOnce = (logLevel) => {
12
12
  return;
13
13
  }
14
14
  warned = true;
15
- log_1.Log.warn(logLevel, 'In Safari, setting a volume and a playback rate at the same time is buggy.');
16
- log_1.Log.warn(logLevel, 'In Desktop Safari, only volumes <= 1 will be applied.');
17
- log_1.Log.warn(logLevel, 'In Mobile Safari, the volume will be ignored and set to 1 if a playbackRate is set.');
15
+ log_1.Log.warn({ logLevel, tag: null }, 'In Safari, setting a volume and a playback rate at the same time is buggy.');
16
+ log_1.Log.warn({ logLevel, tag: null }, 'In Desktop Safari, only volumes <= 1 will be applied.');
17
+ log_1.Log.warn({ logLevel, tag: null }, logLevel, 'In Mobile Safari, the volume will be ignored and set to 1 if a playbackRate is set.');
18
18
  };
19
19
  /**
20
20
  * [1] Bug case: In Safari, you cannot combine playbackRate and volume !== 1.
@@ -60,7 +60,7 @@ const useVolume = ({ mediaRef, volume, logLevel, source, shouldUseWebAudioApi, }
60
60
  audioStuffRef.current = {
61
61
  gainNode,
62
62
  };
63
- log_1.Log.trace(logLevel, `Starting to amplify ${(_a = mediaRef.current) === null || _a === void 0 ? void 0 : _a.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${(_b = mediaRef.current) === null || _b === void 0 ? void 0 : _b.playbackRate}`);
63
+ log_1.Log.trace({ logLevel, tag: null }, `Starting to amplify ${(_a = mediaRef.current) === null || _a === void 0 ? void 0 : _a.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${(_b = mediaRef.current) === null || _b === void 0 ? void 0 : _b.playbackRate}`);
64
64
  return () => {
65
65
  audioStuffRef.current = null;
66
66
  gainNode.disconnect();
@@ -72,7 +72,7 @@ const useVolume = ({ mediaRef, volume, logLevel, source, shouldUseWebAudioApi, }
72
72
  const valueToSet = volume;
73
73
  if (!(0, is_approximately_the_same_1.isApproximatelyTheSame)(audioStuffRef.current.gainNode.gain.value, valueToSet)) {
74
74
  audioStuffRef.current.gainNode.gain.value = valueToSet;
75
- log_1.Log.trace(logLevel, `Setting gain to ${valueToSet} for ${(_a = mediaRef.current) === null || _a === void 0 ? void 0 : _a.src}`);
75
+ log_1.Log.trace({ logLevel, tag: null }, `Setting gain to ${valueToSet} for ${(_a = mediaRef.current) === null || _a === void 0 ? void 0 : _a.src}`);
76
76
  }
77
77
  }
78
78
  const safariCase = (0, video_fragment_1.isSafari)() && mediaRef.current && ((_b = mediaRef.current) === null || _b === void 0 ? void 0 : _b.playbackRate) !== 1;
@@ -42,7 +42,7 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
42
42
  if (isVariableFpsVideoMap.current[src]) {
43
43
  return;
44
44
  }
45
- log_js_1.Log.verbose(logLevel, `Detected ${src} as a variable FPS video. Disabling buffering while seeking.`);
45
+ log_js_1.Log.verbose({ logLevel, tag: null }, `Detected ${src} as a variable FPS video. Disabling buffering while seeking.`);
46
46
  isVariableFpsVideoMap.current[src] = true;
47
47
  }, [logLevel, src]);
48
48
  const rvcCurrentTime = (0, use_request_video_callback_time_js_1.useRequestVideoCallbackTime)({
@@ -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.352";
6
+ export declare const VERSION = "4.0.353";
@@ -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.352';
10
+ exports.VERSION = '4.0.353';
@@ -105,7 +105,7 @@ function truthy(value) {
105
105
  }
106
106
 
107
107
  // src/version.ts
108
- var VERSION = "4.0.352";
108
+ var VERSION = "4.0.353";
109
109
 
110
110
  // src/multiple-versions-warning.ts
111
111
  var checkMultipleRemotionVersions = () => {
@@ -1332,9 +1332,22 @@ var Freeze = ({
1332
1332
  }
1333
1333
  };
1334
1334
  }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
1335
+ const newSequenceContext = useMemo8(() => {
1336
+ if (!sequenceContext) {
1337
+ return null;
1338
+ }
1339
+ return {
1340
+ ...sequenceContext,
1341
+ relativeFrom: 0,
1342
+ cumulatedFrom: 0
1343
+ };
1344
+ }, [sequenceContext]);
1335
1345
  return /* @__PURE__ */ jsx7(TimelineContext.Provider, {
1336
1346
  value: timelineValue,
1337
- children
1347
+ children: /* @__PURE__ */ jsx7(SequenceContext.Provider, {
1348
+ value: newSequenceContext,
1349
+ children
1350
+ })
1338
1351
  });
1339
1352
  };
1340
1353
 
@@ -1617,31 +1630,50 @@ var getNumberForLogLevel = (level) => {
1617
1630
  var isEqualOrBelowLogLevel = (currentLevel, level) => {
1618
1631
  return getNumberForLogLevel(currentLevel) <= getNumberForLogLevel(level);
1619
1632
  };
1620
- var Log = {
1621
- trace: (logLevel, ...args) => {
1622
- if (isEqualOrBelowLogLevel(logLevel, "trace")) {
1623
- return console.log(...args);
1624
- }
1625
- },
1626
- verbose: (logLevel, ...args) => {
1627
- if (isEqualOrBelowLogLevel(logLevel, "verbose")) {
1628
- return console.log(...args);
1629
- }
1630
- },
1631
- info: (logLevel, ...args) => {
1632
- if (isEqualOrBelowLogLevel(logLevel, "info")) {
1633
- return console.log(...args);
1634
- }
1635
- },
1636
- warn: (logLevel, ...args) => {
1637
- if (isEqualOrBelowLogLevel(logLevel, "warn")) {
1638
- return console.warn(...args);
1639
- }
1640
- },
1641
- error: (...args) => {
1642
- return console.error(...args);
1633
+ var transformArgs = ({
1634
+ args,
1635
+ logLevel,
1636
+ tag
1637
+ }) => {
1638
+ const arr = [...args];
1639
+ if (getRemotionEnvironment().isRendering && !getRemotionEnvironment().isClientSideRendering) {
1640
+ arr.unshift(Symbol.for(`__remotion_level_${logLevel}`));
1641
+ }
1642
+ if (tag) {
1643
+ arr.unshift(Symbol.for(`__remotion_tag_${tag}`));
1644
+ }
1645
+ return arr;
1646
+ };
1647
+ var verbose = (options, ...args) => {
1648
+ if (isEqualOrBelowLogLevel(options.logLevel, "verbose")) {
1649
+ return console.debug(...transformArgs({ args, logLevel: "verbose", tag: options.tag }));
1650
+ }
1651
+ };
1652
+ var trace = (options, ...args) => {
1653
+ if (isEqualOrBelowLogLevel(options.logLevel, "trace")) {
1654
+ return console.debug(...transformArgs({ args, logLevel: "trace", tag: options.tag }));
1643
1655
  }
1644
1656
  };
1657
+ var info = (options, ...args) => {
1658
+ if (isEqualOrBelowLogLevel(options.logLevel, "info")) {
1659
+ return console.log(...transformArgs({ args, logLevel: "info", tag: options.tag }));
1660
+ }
1661
+ };
1662
+ var warn = (options, ...args) => {
1663
+ if (isEqualOrBelowLogLevel(options.logLevel, "warn")) {
1664
+ return console.warn(...transformArgs({ args, logLevel: "warn", tag: options.tag }));
1665
+ }
1666
+ };
1667
+ var error = (options, ...args) => {
1668
+ return console.error(...transformArgs({ args, logLevel: "error", tag: options.tag }));
1669
+ };
1670
+ var Log = {
1671
+ trace,
1672
+ verbose,
1673
+ info,
1674
+ warn,
1675
+ error
1676
+ };
1645
1677
 
1646
1678
  // src/delay-render.ts
1647
1679
  if (typeof window !== "undefined") {
@@ -1709,11 +1741,11 @@ var continueRenderInternal = (handle, environment) => {
1709
1741
  const { label, startTime, timeout } = window.remotion_delayRenderTimeouts[handle];
1710
1742
  clearTimeout(timeout);
1711
1743
  const message = [
1712
- label ? `delayRender() "${label}"` : "A delayRender()",
1744
+ label ? `"${label}"` : "A handle",
1713
1745
  DELAY_RENDER_CLEAR_TOKEN,
1714
1746
  `${Date.now() - startTime}ms`
1715
1747
  ].filter(truthy).join(" ");
1716
- Log.verbose(window.remotion_logLevel, message);
1748
+ Log.verbose({ logLevel: window.remotion_logLevel, tag: "delayRender()" }, message);
1717
1749
  delete window.remotion_delayRenderTimeouts[handle];
1718
1750
  }
1719
1751
  return false;
@@ -2347,7 +2379,7 @@ var playbackLogging = ({
2347
2379
  mountTime
2348
2380
  }) => {
2349
2381
  const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
2350
- Log.trace(logLevel, `[${tags}]`, message);
2382
+ Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
2351
2383
  };
2352
2384
 
2353
2385
  // src/prefetch-state.tsx
@@ -2458,7 +2490,7 @@ var prefetch = (src, options) => {
2458
2490
  waitUntilDone: () => Promise.resolve(srcWithoutHash)
2459
2491
  };
2460
2492
  }
2461
- Log.verbose(logLevel, `[prefetch] Starting prefetch ${srcWithoutHash}`);
2493
+ Log.verbose({ logLevel, tag: "prefetch" }, `Starting prefetch ${srcWithoutHash}`);
2462
2494
  let canceled = false;
2463
2495
  let objectUrl = null;
2464
2496
  let resolve = () => {
@@ -2893,7 +2925,7 @@ var warnOnce = (logLevel) => {
2893
2925
  }
2894
2926
  warned = true;
2895
2927
  if (typeof window !== "undefined") {
2896
- Log.warn(logLevel, "AudioContext is not supported in this browser");
2928
+ Log.warn({ logLevel, tag: null }, "AudioContext is not supported in this browser");
2897
2929
  }
2898
2930
  };
2899
2931
  var useSingletonAudioContext = (logLevel, latencyHint) => {
@@ -3272,9 +3304,9 @@ var warnSafariOnce = (logLevel) => {
3272
3304
  return;
3273
3305
  }
3274
3306
  warned2 = true;
3275
- Log.warn(logLevel, "In Safari, setting a volume and a playback rate at the same time is buggy.");
3276
- Log.warn(logLevel, "In Desktop Safari, only volumes <= 1 will be applied.");
3277
- Log.warn(logLevel, "In Mobile Safari, the volume will be ignored and set to 1 if a playbackRate is set.");
3307
+ Log.warn({ logLevel, tag: null }, "In Safari, setting a volume and a playback rate at the same time is buggy.");
3308
+ Log.warn({ logLevel, tag: null }, "In Desktop Safari, only volumes <= 1 will be applied.");
3309
+ Log.warn({ logLevel, tag: null }, logLevel, "In Mobile Safari, the volume will be ignored and set to 1 if a playbackRate is set.");
3278
3310
  };
3279
3311
  var useVolume = ({
3280
3312
  mediaRef,
@@ -3318,7 +3350,7 @@ var useVolume = ({
3318
3350
  audioStuffRef.current = {
3319
3351
  gainNode
3320
3352
  };
3321
- Log.trace(logLevel, `Starting to amplify ${mediaRef.current?.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${mediaRef.current?.playbackRate}`);
3353
+ Log.trace({ logLevel, tag: null }, `Starting to amplify ${mediaRef.current?.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${mediaRef.current?.playbackRate}`);
3322
3354
  return () => {
3323
3355
  audioStuffRef.current = null;
3324
3356
  gainNode.disconnect();
@@ -3330,7 +3362,7 @@ var useVolume = ({
3330
3362
  const valueToSet = volume;
3331
3363
  if (!isApproximatelyTheSame(audioStuffRef.current.gainNode.gain.value, valueToSet)) {
3332
3364
  audioStuffRef.current.gainNode.gain.value = valueToSet;
3333
- Log.trace(logLevel, `Setting gain to ${valueToSet} for ${mediaRef.current?.src}`);
3365
+ Log.trace({ logLevel, tag: null }, `Setting gain to ${valueToSet} for ${mediaRef.current?.src}`);
3334
3366
  }
3335
3367
  }
3336
3368
  const safariCase = isSafari() && mediaRef.current && mediaRef.current?.playbackRate !== 1;
@@ -3755,8 +3787,8 @@ var useBufferUntilFirstFrame = ({
3755
3787
  const onEndedOrPauseOrCanPlay = () => {
3756
3788
  unblock();
3757
3789
  };
3758
- current.requestVideoFrameCallback((_, info) => {
3759
- const differenceFromRequested = Math.abs(info.mediaTime - requestedTime);
3790
+ current.requestVideoFrameCallback((_, info2) => {
3791
+ const differenceFromRequested = Math.abs(info2.mediaTime - requestedTime);
3760
3792
  if (differenceFromRequested > 0.5) {
3761
3793
  onVariableFpsVideoDetected();
3762
3794
  }
@@ -3995,16 +4027,16 @@ var useRequestVideoCallbackTime = ({
3995
4027
  if (!videoTag) {
3996
4028
  return;
3997
4029
  }
3998
- const cb = videoTag.requestVideoFrameCallback((_, info) => {
4030
+ const cb = videoTag.requestVideoFrameCallback((_, info2) => {
3999
4031
  if (currentTime.current !== null) {
4000
- const difference = Math.abs(currentTime.current.time - info.mediaTime);
4001
- const differenceToLastSeek = Math.abs(lastSeek.current === null ? Infinity : info.mediaTime - lastSeek.current);
4002
- if (difference > 0.5 && differenceToLastSeek > 0.5 && info.mediaTime > currentTime.current.time) {
4032
+ const difference = Math.abs(currentTime.current.time - info2.mediaTime);
4033
+ const differenceToLastSeek = Math.abs(lastSeek.current === null ? Infinity : info2.mediaTime - lastSeek.current);
4034
+ if (difference > 0.5 && differenceToLastSeek > 0.5 && info2.mediaTime > currentTime.current.time) {
4003
4035
  onVariableFpsVideoDetected();
4004
4036
  }
4005
4037
  }
4006
4038
  currentTime.current = {
4007
- time: info.mediaTime,
4039
+ time: info2.mediaTime,
4008
4040
  lastUpdate: performance.now()
4009
4041
  };
4010
4042
  request();
@@ -4219,7 +4251,7 @@ var useMediaPlayback = ({
4219
4251
  if (isVariableFpsVideoMap.current[src]) {
4220
4252
  return;
4221
4253
  }
4222
- Log.verbose(logLevel, `Detected ${src} as a variable FPS video. Disabling buffering while seeking.`);
4254
+ Log.verbose({ logLevel, tag: null }, `Detected ${src} as a variable FPS video. Disabling buffering while seeking.`);
4223
4255
  isVariableFpsVideoMap.current[src] = true;
4224
4256
  }, [logLevel, src]);
4225
4257
  const rvcCurrentTime = useRequestVideoCallbackTime({
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.352";
2
+ var VERSION = "4.0.353";
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.352",
6
+ "version": "4.0.353",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "webpack": "5.96.1",
29
29
  "zod": "3.22.3",
30
30
  "eslint": "9.19.0",
31
- "@remotion/eslint-config-internal": "4.0.352"
31
+ "@remotion/eslint-config-internal": "4.0.353"
32
32
  },
33
33
  "keywords": [
34
34
  "video",
@@ -1,4 +0,0 @@
1
- export declare const useAudioChannelIndex: ({ ref, audioChannelIndex, }: {
2
- ref: React.RefObject<HTMLVideoElement | HTMLAudioElement | null>;
3
- audioChannelIndex: number;
4
- }) => void;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAudioChannelIndex = void 0;
4
- const react_1 = require("react");
5
- const useAudioChannelIndex = ({ ref, audioChannelIndex, }) => {
6
- (0, react_1.useEffect)(() => {
7
- var _a;
8
- // @ts-expect-error
9
- const audioChannels = (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.audioTracks;
10
- console.log({ audioChannels, audioChannelIndex });
11
- }, [ref, audioChannelIndex]);
12
- };
13
- exports.useAudioChannelIndex = useAudioChannelIndex;