UNPKG

793 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.getRemotionEnvironment = void 0;
4const getRemotionEnvironment = () => {
5 if (process.env.NODE_ENV === 'production') {
6 if (typeof window !== 'undefined' && window.remotion_isPlayer) {
7 return 'player-production';
8 }
9 return 'rendering';
10 }
11 // The Jest framework sets NODE_ENV as test.
12 // Right now we don't need to treat it in a special
13 // way which is good - defaulting to `rendering`.
14 if (process.env.NODE_ENV === 'test') {
15 return 'rendering';
16 }
17 if (typeof window !== 'undefined' && window.remotion_isPlayer) {
18 return 'player-development';
19 }
20 return 'preview';
21};
22exports.getRemotionEnvironment = getRemotionEnvironment;