remotion 4.0.27 → 4.0.29

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.
@@ -7,17 +7,21 @@ exports.getRemotionEnvironment = void 0;
7
7
  */
8
8
  const getRemotionEnvironment = () => {
9
9
  if (process.env.NODE_ENV === 'production') {
10
- if (typeof window !== 'undefined' && window.remotion_isPlayer) {
10
+ // Check if inside a Remotion bundle.
11
+ // Must be a variable in index-html.ts and be defined before setupEnvVariables()
12
+ if (typeof window !== 'undefined' &&
13
+ typeof window.remotion_editorName !== 'undefined' &&
14
+ typeof window.remotion_projectName !== 'undefined') {
11
15
  return {
12
16
  isStudio: false,
13
- isRendering: false,
14
- isPlayer: true,
17
+ isRendering: true,
18
+ isPlayer: false,
15
19
  };
16
20
  }
17
21
  return {
18
22
  isStudio: false,
19
- isRendering: true,
20
- isPlayer: false,
23
+ isRendering: false,
24
+ isPlayer: typeof window !== 'undefined' && window.remotion_isPlayer,
21
25
  };
22
26
  }
23
27
  // The Vitest framework sets NODE_ENV as test.
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.27";
1
+ export declare const VERSION = "4.0.29";
@@ -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.27';
5
+ exports.VERSION = '4.0.29';
@@ -59,7 +59,7 @@ function truthy(value) {
59
59
  }
60
60
 
61
61
  // Automatically generated on publish
62
- const VERSION = '4.0.27';
62
+ const VERSION = '4.0.29';
63
63
 
64
64
  const checkMultipleRemotionVersions = () => {
65
65
  if (typeof globalThis === 'undefined') {
@@ -186,17 +186,21 @@ function cancelRender(err) {
186
186
  */
187
187
  const getRemotionEnvironment = () => {
188
188
  if (process.env.NODE_ENV === 'production') {
189
- if (typeof window !== 'undefined' && window.remotion_isPlayer) {
189
+ // Check if inside a Remotion bundle.
190
+ // Must be a variable in index-html.ts and be defined before setupEnvVariables()
191
+ if (typeof window !== 'undefined' &&
192
+ typeof window.remotion_editorName !== 'undefined' &&
193
+ typeof window.remotion_projectName !== 'undefined') {
190
194
  return {
191
195
  isStudio: false,
192
- isRendering: false,
193
- isPlayer: true,
196
+ isRendering: true,
197
+ isPlayer: false,
194
198
  };
195
199
  }
196
200
  return {
197
201
  isStudio: false,
198
- isRendering: true,
199
- isPlayer: false,
202
+ isRendering: false,
203
+ isPlayer: typeof window !== 'undefined' && window.remotion_isPlayer,
200
204
  };
201
205
  }
202
206
  // The Vitest framework sets NODE_ENV as test.
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.27';
2
+ const VERSION = '4.0.29';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.27",
3
+ "version": "4.0.29",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",