remotion 4.0.376 → 4.0.378

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useSingletonAudioContext = void 0;
4
4
  const react_1 = require("react");
5
5
  const log_1 = require("../log");
6
+ const use_remotion_environment_1 = require("../use-remotion-environment");
6
7
  let warned = false;
7
8
  const warnOnce = (logLevel) => {
8
9
  if (warned) {
@@ -15,7 +16,11 @@ const warnOnce = (logLevel) => {
15
16
  }
16
17
  };
17
18
  const useSingletonAudioContext = (logLevel, latencyHint) => {
19
+ const env = (0, use_remotion_environment_1.useRemotionEnvironment)();
18
20
  const audioContext = (0, react_1.useMemo)(() => {
21
+ if (env.isRendering) {
22
+ return null;
23
+ }
19
24
  if (typeof AudioContext === 'undefined') {
20
25
  warnOnce(logLevel);
21
26
  return null;
@@ -23,7 +28,7 @@ const useSingletonAudioContext = (logLevel, latencyHint) => {
23
28
  return new AudioContext({
24
29
  latencyHint,
25
30
  });
26
- }, [logLevel, latencyHint]);
31
+ }, [logLevel, latencyHint, env.isRendering]);
27
32
  return audioContext;
28
33
  };
29
34
  exports.useSingletonAudioContext = useSingletonAudioContext;
@@ -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.376";
6
+ export declare const VERSION = "4.0.378";
@@ -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.376';
10
+ exports.VERSION = '4.0.378';
@@ -110,7 +110,7 @@ function truthy(value) {
110
110
  }
111
111
 
112
112
  // src/version.ts
113
- var VERSION = "4.0.376";
113
+ var VERSION = "4.0.378";
114
114
 
115
115
  // src/multiple-versions-warning.ts
116
116
  var checkMultipleRemotionVersions = () => {
@@ -3107,7 +3107,11 @@ var warnOnce = (logLevel) => {
3107
3107
  }
3108
3108
  };
3109
3109
  var useSingletonAudioContext = (logLevel, latencyHint) => {
3110
+ const env = useRemotionEnvironment();
3110
3111
  const audioContext = useMemo14(() => {
3112
+ if (env.isRendering) {
3113
+ return null;
3114
+ }
3111
3115
  if (typeof AudioContext === "undefined") {
3112
3116
  warnOnce(logLevel);
3113
3117
  return null;
@@ -3115,7 +3119,7 @@ var useSingletonAudioContext = (logLevel, latencyHint) => {
3115
3119
  return new AudioContext({
3116
3120
  latencyHint
3117
3121
  });
3118
- }, [logLevel, latencyHint]);
3122
+ }, [logLevel, latencyHint, env.isRendering]);
3119
3123
  return audioContext;
3120
3124
  };
3121
3125
 
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.376";
2
+ var VERSION = "4.0.378";
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.376",
6
+ "version": "4.0.378",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "react-dom": "19.0.0",
35
35
  "webpack": "5.96.1",
36
36
  "zod": "3.22.3",
37
- "@remotion/eslint-config-internal": "4.0.376",
37
+ "@remotion/eslint-config-internal": "4.0.378",
38
38
  "eslint": "9.19.0"
39
39
  },
40
40
  "keywords": [