remotion 4.0.54 → 4.0.55

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,3 @@
1
+ export type RemotionEnvironment = 'preview' | 'rendering' | 'player-development' | 'player-production';
2
+ export declare const getRemotionEnvironment: () => RemotionEnvironment;
3
+ export declare const useRemotionEnvironment: () => RemotionEnvironment;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useRemotionEnvironment = exports.getRemotionEnvironment = void 0;
4
+ const is_player_js_1 = require("./is-player.js");
5
+ const getRemotionEnvironment = () => {
6
+ if (process.env.NODE_ENV === 'production') {
7
+ if (typeof window !== 'undefined' && window.remotion_isPlayer) {
8
+ return 'player-production';
9
+ }
10
+ return 'rendering';
11
+ }
12
+ // The Vitest framework sets NODE_ENV as test.
13
+ // Right now we don't need to treat it in a special
14
+ // way which is good - defaulting to `rendering`.
15
+ if (process.env.NODE_ENV === 'test') {
16
+ return 'rendering';
17
+ }
18
+ if (typeof window !== 'undefined' && window.remotion_isPlayer) {
19
+ return 'player-development';
20
+ }
21
+ return 'preview';
22
+ };
23
+ exports.getRemotionEnvironment = getRemotionEnvironment;
24
+ const useRemotionEnvironment = () => {
25
+ const isPlayer = (0, is_player_js_1.useIsPlayer)();
26
+ if (isPlayer) {
27
+ if (process.env.NODE_ENV === 'production') {
28
+ return 'player-production';
29
+ }
30
+ return 'player-development';
31
+ }
32
+ return (0, exports.getRemotionEnvironment)();
33
+ };
34
+ exports.useRemotionEnvironment = useRemotionEnvironment;
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.54";
1
+ export declare const VERSION = "4.0.55";
@@ -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.54';
5
+ exports.VERSION = '4.0.55';
@@ -59,7 +59,7 @@ function truthy(value) {
59
59
  }
60
60
 
61
61
  // Automatically generated on publish
62
- const VERSION = '4.0.54';
62
+ const VERSION = '4.0.55';
63
63
 
64
64
  const checkMultipleRemotionVersions = () => {
65
65
  if (typeof globalThis === 'undefined') {
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.54';
2
+ const VERSION = '4.0.55';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.54",
3
+ "version": "4.0.55",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",