remotion 4.0.340 → 4.0.342
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.
- package/LICENSE.md +7 -7
- package/dist/cjs/Artifact.js +2 -2
- package/dist/cjs/Composition.d.ts +1 -0
- package/dist/cjs/Composition.js +2 -2
- package/dist/cjs/ResolveCompositionConfig.js +13 -6
- package/dist/cjs/Sequence.js +6 -3
- package/dist/cjs/audio/Audio.js +2 -2
- package/dist/cjs/audio/shared-audio-tags.js +4 -1
- package/dist/cjs/delay-render.d.ts +12 -0
- package/dist/cjs/delay-render.js +28 -11
- package/dist/cjs/get-cross-origin-value.js +1 -1
- package/dist/cjs/get-remotion-environment.js +2 -1
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/play-and-handle-not-allowed-error.d.ts +2 -1
- package/dist/cjs/play-and-handle-not-allowed-error.js +2 -3
- package/dist/cjs/resolve-video-config.js +2 -0
- package/dist/cjs/timeline-position-state.js +3 -4
- package/dist/cjs/use-current-frame.js +3 -2
- package/dist/cjs/use-current-scale.js +3 -2
- package/dist/cjs/use-delay-render.d.ts +8 -0
- package/dist/cjs/use-delay-render.js +17 -0
- package/dist/cjs/use-media-in-timeline.js +6 -3
- package/dist/cjs/use-media-playback.js +5 -0
- package/dist/cjs/use-remotion-environment.d.ts +6 -0
- package/dist/cjs/use-remotion-environment.js +14 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/OffthreadVideo.js +2 -2
- package/dist/cjs/video/Video.js +2 -2
- package/dist/cjs/video/VideoForRendering.js +2 -2
- package/dist/esm/index.mjs +142 -89
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/LICENSE.md
CHANGED
|
@@ -6,10 +6,10 @@ In Remotion 5.0, the license will slightly change. [View the changes here](https
|
|
|
6
6
|
|
|
7
7
|
Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
|
|
8
8
|
|
|
9
|
-
- [Free
|
|
10
|
-
- [Company
|
|
9
|
+
- [Free License](#free-license)
|
|
10
|
+
- [Company License](#company-license)
|
|
11
11
|
|
|
12
|
-
## Free
|
|
12
|
+
## Free License
|
|
13
13
|
|
|
14
14
|
Copyright © 2025 [Remotion](https://www.remotion.dev)
|
|
15
15
|
|
|
@@ -24,7 +24,7 @@ You are eligible to use Remotion for free if you are:
|
|
|
24
24
|
|
|
25
25
|
### Allowed use cases
|
|
26
26
|
|
|
27
|
-
Permission is hereby granted, free of charge, to any person eligible for the "Free
|
|
27
|
+
Permission is hereby granted, free of charge, to any person eligible for the "Free License", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
|
|
28
28
|
|
|
29
29
|
### Disallowed use cases
|
|
30
30
|
|
|
@@ -38,12 +38,12 @@ The software is provided "as is", without warranty of any kind, express or impli
|
|
|
38
38
|
|
|
39
39
|
Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
|
|
40
40
|
|
|
41
|
-
## Company
|
|
41
|
+
## Company License
|
|
42
42
|
|
|
43
|
-
You are required to obtain a
|
|
43
|
+
You are required to obtain a Company License to use Remotion if you are not within the group of entities eligible for a Free License. This license will enable you to use Remotion for the allowed use cases specified in the Free License, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
|
|
44
44
|
|
|
45
45
|
Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.
|
|
46
46
|
|
|
47
47
|
### FAQs
|
|
48
48
|
|
|
49
|
-
Are you not sure whether you need a
|
|
49
|
+
Are you not sure whether you need a Company License because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
|
package/dist/cjs/Artifact.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Artifact = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const RenderAssetManager_1 = require("./RenderAssetManager");
|
|
6
|
-
const get_remotion_environment_1 = require("./get-remotion-environment");
|
|
7
6
|
const use_current_frame_1 = require("./use-current-frame");
|
|
7
|
+
const use_remotion_environment_1 = require("./use-remotion-environment");
|
|
8
8
|
const ArtifactThumbnail = Symbol('Thumbnail');
|
|
9
9
|
const Artifact = ({ filename, content, downloadBehavior }) => {
|
|
10
10
|
const { registerRenderAsset, unregisterRenderAsset } = (0, react_1.useContext)(RenderAssetManager_1.RenderAssetManager);
|
|
11
|
-
const
|
|
11
|
+
const env = (0, use_remotion_environment_1.useRemotionEnvironment)();
|
|
12
12
|
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
13
13
|
const [id] = (0, react_1.useState)(() => {
|
|
14
14
|
return String(Math.random());
|
|
@@ -28,6 +28,7 @@ export type CalculateMetadataFunction<T extends Record<string, unknown>> = (opti
|
|
|
28
28
|
props: T;
|
|
29
29
|
abortSignal: AbortSignal;
|
|
30
30
|
compositionId: string;
|
|
31
|
+
isRendering: boolean;
|
|
31
32
|
}) => Promise<CalcMetadataReturnType<T>> | CalcMetadataReturnType<T>;
|
|
32
33
|
type OptionalDimensions<Schema extends AnyZodObject, Props extends Record<string, unknown>> = {
|
|
33
34
|
width?: number;
|
package/dist/cjs/Composition.js
CHANGED
|
@@ -9,13 +9,13 @@ const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js")
|
|
|
9
9
|
const Folder_js_1 = require("./Folder.js");
|
|
10
10
|
const ResolveCompositionConfig_js_1 = require("./ResolveCompositionConfig.js");
|
|
11
11
|
const delay_render_js_1 = require("./delay-render.js");
|
|
12
|
-
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
13
12
|
const input_props_serialization_js_1 = require("./input-props-serialization.js");
|
|
14
13
|
const is_player_js_1 = require("./is-player.js");
|
|
15
14
|
const loading_indicator_js_1 = require("./loading-indicator.js");
|
|
16
15
|
const nonce_js_1 = require("./nonce.js");
|
|
17
16
|
const portal_node_js_1 = require("./portal-node.js");
|
|
18
17
|
const use_lazy_component_js_1 = require("./use-lazy-component.js");
|
|
18
|
+
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
19
19
|
const use_video_js_1 = require("./use-video.js");
|
|
20
20
|
const validate_composition_id_js_1 = require("./validation/validate-composition-id.js");
|
|
21
21
|
const validate_default_props_js_1 = require("./validation/validate-default-props.js");
|
|
@@ -38,7 +38,7 @@ const InnerComposition = ({ width, height, fps, durationInFrames, id, defaultPro
|
|
|
38
38
|
});
|
|
39
39
|
const nonce = (0, nonce_js_1.useNonce)();
|
|
40
40
|
const isPlayer = (0, is_player_js_1.useIsPlayer)();
|
|
41
|
-
const environment = (0,
|
|
41
|
+
const environment = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
42
42
|
const canUseComposition = (0, react_1.useContext)(CanUseRemotionHooks_js_1.CanUseRemotionHooks);
|
|
43
43
|
if (canUseComposition) {
|
|
44
44
|
if (isPlayer) {
|
|
@@ -6,9 +6,9 @@ const react_1 = require("react");
|
|
|
6
6
|
const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
|
|
7
7
|
const EditorProps_js_1 = require("./EditorProps.js");
|
|
8
8
|
const input_props_js_1 = require("./config/input-props.js");
|
|
9
|
-
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
10
9
|
const nonce_js_1 = require("./nonce.js");
|
|
11
10
|
const resolve_video_config_js_1 = require("./resolve-video-config.js");
|
|
11
|
+
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
12
12
|
const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
|
|
13
13
|
const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
|
|
14
14
|
const validate_fps_js_1 = require("./validation/validate-fps.js");
|
|
@@ -34,12 +34,13 @@ const ResolveCompositionConfig = ({ children }) => {
|
|
|
34
34
|
}, [canvasContent, compositions]);
|
|
35
35
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
36
36
|
const { props: allEditorProps } = (0, react_1.useContext)(EditorProps_js_1.EditorPropsContext);
|
|
37
|
+
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
37
38
|
const inputProps = (0, react_1.useMemo)(() => {
|
|
38
39
|
var _a;
|
|
39
|
-
return typeof window === 'undefined' ||
|
|
40
|
+
return typeof window === 'undefined' || env.isPlayer
|
|
40
41
|
? {}
|
|
41
42
|
: ((_a = (0, input_props_js_1.getInputProps)()) !== null && _a !== void 0 ? _a : {});
|
|
42
|
-
}, []);
|
|
43
|
+
}, [env.isPlayer]);
|
|
43
44
|
const [resolvedConfigs, setResolvedConfigs] = (0, react_1.useState)({});
|
|
44
45
|
const selectedEditorProps = (0, react_1.useMemo)(() => {
|
|
45
46
|
var _a;
|
|
@@ -297,6 +298,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
297
298
|
var _a;
|
|
298
299
|
return composition ? ((_a = allEditorProps[composition.id]) !== null && _a !== void 0 ? _a : {}) : {};
|
|
299
300
|
}, [allEditorProps, composition]);
|
|
301
|
+
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
300
302
|
return (0, react_1.useMemo)(() => {
|
|
301
303
|
var _a, _b, _c, _d;
|
|
302
304
|
if (!composition) {
|
|
@@ -332,8 +334,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
332
334
|
props: {
|
|
333
335
|
...((_c = composition.defaultProps) !== null && _c !== void 0 ? _c : {}),
|
|
334
336
|
...(selectedEditorProps !== null && selectedEditorProps !== void 0 ? selectedEditorProps : {}),
|
|
335
|
-
...(typeof window === 'undefined' ||
|
|
336
|
-
(0, get_remotion_environment_js_1.getRemotionEnvironment)().isPlayer
|
|
337
|
+
...(typeof window === 'undefined' || env.isPlayer
|
|
337
338
|
? {}
|
|
338
339
|
: ((_d = (0, input_props_js_1.getInputProps)()) !== null && _d !== void 0 ? _d : {})),
|
|
339
340
|
},
|
|
@@ -348,6 +349,12 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
348
349
|
return null;
|
|
349
350
|
}
|
|
350
351
|
return context[composition.id];
|
|
351
|
-
}, [
|
|
352
|
+
}, [
|
|
353
|
+
composition,
|
|
354
|
+
context,
|
|
355
|
+
currentCompositionMetadata,
|
|
356
|
+
selectedEditorProps,
|
|
357
|
+
env.isPlayer,
|
|
358
|
+
]);
|
|
352
359
|
};
|
|
353
360
|
exports.useResolvedVideoConfig = useResolvedVideoConfig;
|
package/dist/cjs/Sequence.js
CHANGED
|
@@ -7,12 +7,12 @@ const react_1 = require("react");
|
|
|
7
7
|
const AbsoluteFill_js_1 = require("./AbsoluteFill.js");
|
|
8
8
|
const SequenceContext_js_1 = require("./SequenceContext.js");
|
|
9
9
|
const SequenceManager_js_1 = require("./SequenceManager.js");
|
|
10
|
-
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
11
10
|
const nonce_js_1 = require("./nonce.js");
|
|
12
11
|
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
13
12
|
const use_video_config_js_1 = require("./use-video-config.js");
|
|
14
13
|
const freeze_js_1 = require("./freeze.js");
|
|
15
14
|
const use_current_frame_1 = require("./use-current-frame");
|
|
15
|
+
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
16
16
|
const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity, children, name, height, width, showInTimeline = true, _remotionInternalLoopDisplay: loopDisplay, _remotionInternalStack: stack, _remotionInternalPremountDisplay: premountDisplay, _remotionInternalPostmountDisplay: postmountDisplay, ...other }, ref) => {
|
|
17
17
|
var _a;
|
|
18
18
|
const { layout = 'absolute-fill' } = other;
|
|
@@ -87,9 +87,10 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
87
87
|
const timelineClipName = (0, react_1.useMemo)(() => {
|
|
88
88
|
return name !== null && name !== void 0 ? name : '';
|
|
89
89
|
}, [name]);
|
|
90
|
+
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
90
91
|
(0, react_1.useEffect)(() => {
|
|
91
92
|
var _a;
|
|
92
|
-
if (!
|
|
93
|
+
if (!env.isStudio) {
|
|
93
94
|
return;
|
|
94
95
|
}
|
|
95
96
|
registerSequence({
|
|
@@ -127,6 +128,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
127
128
|
stack,
|
|
128
129
|
premountDisplay,
|
|
129
130
|
postmountDisplay,
|
|
131
|
+
env.isStudio,
|
|
130
132
|
]);
|
|
131
133
|
// Ceil to support floats
|
|
132
134
|
// https://github.com/remotion-dev/remotion/issues/2958
|
|
@@ -193,7 +195,8 @@ const PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
193
195
|
};
|
|
194
196
|
const PremountedPostmountedSequence = (0, react_1.forwardRef)(PremountedPostmountedSequenceRefForwardingFunction);
|
|
195
197
|
const SequenceRefForwardingFunction = (props, ref) => {
|
|
196
|
-
|
|
198
|
+
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
199
|
+
if (props.layout !== 'none' && !env.isRendering) {
|
|
197
200
|
if (props.premountFor || props.postmountFor) {
|
|
198
201
|
return (0, jsx_runtime_1.jsx)(PremountedPostmountedSequence, { ...props, ref: ref });
|
|
199
202
|
}
|
package/dist/cjs/audio/Audio.js
CHANGED
|
@@ -9,9 +9,9 @@ const absolute_src_js_1 = require("../absolute-src.js");
|
|
|
9
9
|
const calculate_loop_js_1 = require("../calculate-loop.js");
|
|
10
10
|
const cancel_render_js_1 = require("../cancel-render.js");
|
|
11
11
|
const enable_sequence_stack_traces_js_1 = require("../enable-sequence-stack-traces.js");
|
|
12
|
-
const get_remotion_environment_js_1 = require("../get-remotion-environment.js");
|
|
13
12
|
const index_js_1 = require("../loop/index.js");
|
|
14
13
|
const prefetch_js_1 = require("../prefetch.js");
|
|
14
|
+
const use_remotion_environment_js_1 = require("../use-remotion-environment.js");
|
|
15
15
|
const use_video_config_js_1 = require("../use-video-config.js");
|
|
16
16
|
const validate_media_props_js_1 = require("../validate-media-props.js");
|
|
17
17
|
const validate_start_from_props_js_1 = require("../validate-start-from-props.js");
|
|
@@ -25,7 +25,7 @@ const AudioRefForwardingFunction = (props, ref) => {
|
|
|
25
25
|
const { startFrom, endAt, trimBefore, trimAfter, name, stack, pauseWhenBuffering, showInTimeline, onError: onRemotionError, ...otherProps } = props;
|
|
26
26
|
const { loop, ...propsOtherThanLoop } = props;
|
|
27
27
|
const { fps } = (0, use_video_config_js_1.useVideoConfig)();
|
|
28
|
-
const environment = (0,
|
|
28
|
+
const environment = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
29
29
|
const { durations, setDurations } = (0, react_1.useContext)(duration_state_js_1.DurationsContext);
|
|
30
30
|
if (typeof props.src !== 'string') {
|
|
31
31
|
throw new TypeError(`The \`<Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const log_level_context_js_1 = require("../log-level-context.js");
|
|
40
40
|
const play_and_handle_not_allowed_error_js_1 = require("../play-and-handle-not-allowed-error.js");
|
|
41
|
+
const use_remotion_environment_js_1 = require("../use-remotion-environment.js");
|
|
41
42
|
const shared_element_source_node_js_1 = require("./shared-element-source-node.js");
|
|
42
43
|
const use_audio_context_js_1 = require("./use-audio-context.js");
|
|
43
44
|
const EMPTY_AUDIO = 'data:audio/mp3;base64,/+MYxAAJcAV8AAgAABn//////+/gQ5BAMA+D4Pg+BAQBAEAwD4Pg+D4EBAEAQDAPg++hYBH///hUFQVBUFREDQNHmf///////+MYxBUGkAGIMAAAAP/29Xt6lUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDUAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV';
|
|
@@ -186,6 +187,7 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags, component, au
|
|
|
186
187
|
}
|
|
187
188
|
}, [rerenderAudios]);
|
|
188
189
|
const mountTime = (0, log_level_context_js_1.useMountTime)();
|
|
190
|
+
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
189
191
|
const playAllAudios = (0, react_1.useCallback)(() => {
|
|
190
192
|
refs.forEach((ref) => {
|
|
191
193
|
const audio = audios.current.find((a) => a.el === ref.ref);
|
|
@@ -199,10 +201,11 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags, component, au
|
|
|
199
201
|
logLevel,
|
|
200
202
|
mountTime,
|
|
201
203
|
reason: 'playing all audios',
|
|
204
|
+
isPlayer: env.isPlayer,
|
|
202
205
|
});
|
|
203
206
|
});
|
|
204
207
|
audioContext === null || audioContext === void 0 ? void 0 : audioContext.resume();
|
|
205
|
-
}, [audioContext, logLevel, mountTime, refs]);
|
|
208
|
+
}, [audioContext, logLevel, mountTime, refs, env.isPlayer]);
|
|
206
209
|
const value = (0, react_1.useMemo)(() => {
|
|
207
210
|
return {
|
|
208
211
|
registerAudio,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RemotionEnvironment } from './get-remotion-environment.js';
|
|
1
2
|
export declare const DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:";
|
|
2
3
|
export declare const DELAY_RENDER_RETRIES_LEFT = "Retries left: ";
|
|
3
4
|
export declare const DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.";
|
|
@@ -6,5 +7,16 @@ export type DelayRenderOptions = {
|
|
|
6
7
|
timeoutInMilliseconds?: number;
|
|
7
8
|
retries?: number;
|
|
8
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Internal function that accepts environment as parameter.
|
|
12
|
+
* This allows useDelayRender to control its own environment source.
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
export declare const delayRenderInternal: (environment: RemotionEnvironment, label?: string, options?: DelayRenderOptions) => number;
|
|
9
16
|
export declare const delayRender: (label?: string, options?: DelayRenderOptions) => number;
|
|
17
|
+
/**
|
|
18
|
+
* Internal function that accepts environment as parameter.
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
export declare const continueRenderInternal: (handle: number, environment: RemotionEnvironment) => void;
|
|
10
22
|
export declare const continueRender: (handle: number) => void;
|
package/dist/cjs/delay-render.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.continueRender = exports.delayRender = exports.DELAY_RENDER_CLEAR_TOKEN = exports.DELAY_RENDER_RETRY_TOKEN = exports.DELAY_RENDER_RETRIES_LEFT = exports.DELAY_RENDER_CALLSTACK_TOKEN = void 0;
|
|
3
|
+
exports.continueRender = exports.continueRenderInternal = exports.delayRender = exports.delayRenderInternal = exports.DELAY_RENDER_CLEAR_TOKEN = exports.DELAY_RENDER_RETRY_TOKEN = exports.DELAY_RENDER_RETRIES_LEFT = exports.DELAY_RENDER_CALLSTACK_TOKEN = void 0;
|
|
4
4
|
const cancel_render_js_1 = require("./cancel-render.js");
|
|
5
5
|
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
6
6
|
const log_js_1 = require("./log.js");
|
|
@@ -17,11 +17,12 @@ exports.DELAY_RENDER_RETRIES_LEFT = 'Retries left: ';
|
|
|
17
17
|
exports.DELAY_RENDER_RETRY_TOKEN = '- Rendering the frame will be retried.';
|
|
18
18
|
exports.DELAY_RENDER_CLEAR_TOKEN = 'handle was cleared after';
|
|
19
19
|
const defaultTimeout = 30000;
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
/**
|
|
21
|
+
* Internal function that accepts environment as parameter.
|
|
22
|
+
* This allows useDelayRender to control its own environment source.
|
|
23
|
+
* @private
|
|
23
24
|
*/
|
|
24
|
-
const
|
|
25
|
+
const delayRenderInternal = (environment, label, options) => {
|
|
25
26
|
var _a, _b, _c, _d, _e;
|
|
26
27
|
if (typeof label !== 'string' && typeof label !== 'undefined') {
|
|
27
28
|
throw new Error('The label parameter of delayRender() must be a string or undefined, got: ' +
|
|
@@ -30,7 +31,7 @@ const delayRender = (label, options) => {
|
|
|
30
31
|
const handle = Math.random();
|
|
31
32
|
handles.push(handle);
|
|
32
33
|
const called = (_b = (_a = Error().stack) === null || _a === void 0 ? void 0 : _a.replace(/^Error/g, '')) !== null && _b !== void 0 ? _b : '';
|
|
33
|
-
if (
|
|
34
|
+
if (environment.isRendering) {
|
|
34
35
|
const timeoutToUse = ((_c = options === null || options === void 0 ? void 0 : options.timeoutInMilliseconds) !== null && _c !== void 0 ? _c : (typeof window === 'undefined'
|
|
35
36
|
? defaultTimeout
|
|
36
37
|
: ((_d = window.remotion_puppeteerTimeout) !== null && _d !== void 0 ? _d : defaultTimeout))) - 2000;
|
|
@@ -61,12 +62,20 @@ const delayRender = (label, options) => {
|
|
|
61
62
|
}
|
|
62
63
|
return handle;
|
|
63
64
|
};
|
|
64
|
-
exports.
|
|
65
|
+
exports.delayRenderInternal = delayRenderInternal;
|
|
65
66
|
/*
|
|
66
|
-
* @description
|
|
67
|
-
* @see [Documentation](https://remotion.dev/docs/
|
|
67
|
+
* @description Call this function to signal that a frame should not be rendered until an asynchronous task (such as data fetching) is complete. Use continueRender(handle) to proceed with rendering once the task is complete.
|
|
68
|
+
* @see [Documentation](https://remotion.dev/docs/delay-render)
|
|
68
69
|
*/
|
|
69
|
-
const
|
|
70
|
+
const delayRender = (label, options) => {
|
|
71
|
+
return (0, exports.delayRenderInternal)((0, get_remotion_environment_js_1.getRemotionEnvironment)(), label, options);
|
|
72
|
+
};
|
|
73
|
+
exports.delayRender = delayRender;
|
|
74
|
+
/**
|
|
75
|
+
* Internal function that accepts environment as parameter.
|
|
76
|
+
* @private
|
|
77
|
+
*/
|
|
78
|
+
const continueRenderInternal = (handle, environment) => {
|
|
70
79
|
if (typeof handle === 'undefined') {
|
|
71
80
|
throw new TypeError('The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.');
|
|
72
81
|
}
|
|
@@ -76,7 +85,7 @@ const continueRender = (handle) => {
|
|
|
76
85
|
}
|
|
77
86
|
handles = handles.filter((h) => {
|
|
78
87
|
if (h === handle) {
|
|
79
|
-
if (
|
|
88
|
+
if (environment.isRendering) {
|
|
80
89
|
if (!window.remotion_delayRenderTimeouts[handle]) {
|
|
81
90
|
return false;
|
|
82
91
|
}
|
|
@@ -100,4 +109,12 @@ const continueRender = (handle) => {
|
|
|
100
109
|
window.remotion_renderReady = true;
|
|
101
110
|
}
|
|
102
111
|
};
|
|
112
|
+
exports.continueRenderInternal = continueRenderInternal;
|
|
113
|
+
/*
|
|
114
|
+
* @description Unblock a render that has been blocked by delayRender().
|
|
115
|
+
* @see [Documentation](https://remotion.dev/docs/continue-render)
|
|
116
|
+
*/
|
|
117
|
+
const continueRender = (handle) => {
|
|
118
|
+
(0, exports.continueRenderInternal)(handle, (0, get_remotion_environment_js_1.getRemotionEnvironment)());
|
|
119
|
+
};
|
|
103
120
|
exports.continueRender = continueRender;
|
|
@@ -16,7 +16,7 @@ const getCrossOriginValue = ({ crossOrigin, requestsVideoFrame, }) => {
|
|
|
16
16
|
// zeroing out the volume.
|
|
17
17
|
// But this requires CORS, so we cannot default to that.
|
|
18
18
|
// DONT DO THIS:
|
|
19
|
-
// if (!
|
|
19
|
+
// if (!useRemotionEnvironment().isRendering) {
|
|
20
20
|
// return 'anonymous';
|
|
21
21
|
// }
|
|
22
22
|
// During rendering, we opt out of the crossOrigin value
|
|
@@ -9,7 +9,8 @@ const getEnvString = () => {
|
|
|
9
9
|
return ['e', 'nv'].join('');
|
|
10
10
|
};
|
|
11
11
|
/*
|
|
12
|
-
* @description Provides information about the Remotion Environment
|
|
12
|
+
* @description Provides information about the Remotion Environment.
|
|
13
|
+
* @note Prefer using the `useRemotionEnvironment()` hook as it will support future scoped contexts for browser rendering scenarios.
|
|
13
14
|
* @see [Documentation](https://remotion.dev/docs/get-remotion-environment)
|
|
14
15
|
*/
|
|
15
16
|
const getRemotionEnvironment = () => {
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -44,8 +44,10 @@ declare global {
|
|
|
44
44
|
remotion_audioEnabled: boolean;
|
|
45
45
|
remotion_videoEnabled: boolean;
|
|
46
46
|
remotion_puppeteerTimeout: number;
|
|
47
|
+
remotion_broadcastChannel: BroadcastChannel | undefined;
|
|
47
48
|
remotion_inputProps: string;
|
|
48
49
|
remotion_envVariables: string;
|
|
50
|
+
remotion_isMainTab: boolean;
|
|
49
51
|
remotion_collectAssets: () => TRenderAsset[];
|
|
50
52
|
remotion_isPlayer: boolean;
|
|
51
53
|
remotion_isStudio: boolean;
|
|
@@ -113,6 +115,8 @@ export type { PlayableMediaTag } from './timeline-position-state.js';
|
|
|
113
115
|
export { useBufferState } from './use-buffer-state';
|
|
114
116
|
export { useCurrentFrame } from './use-current-frame.js';
|
|
115
117
|
export { CurrentScaleContextType, PreviewSize, PreviewSizeCtx, Translation, useCurrentScale, } from './use-current-scale';
|
|
118
|
+
export { useDelayRender } from './use-delay-render';
|
|
119
|
+
export { useRemotionEnvironment } from './use-remotion-environment.js';
|
|
116
120
|
export * from './use-video-config.js';
|
|
117
121
|
export * from './version.js';
|
|
118
122
|
export * from './video-config.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Config = exports.Experimental = exports.watchStaticFile = exports.useCurrentScale = exports.useCurrentFrame = exports.useBufferState = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.prefetch = exports.random = exports.interpolate = exports.Loop = exports.interpolateColors = exports.Img = exports.getStaticFiles = exports.getRemotionEnvironment = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Composition = exports.cancelRender = exports.Artifact = void 0;
|
|
17
|
+
exports.Config = exports.Experimental = exports.watchStaticFile = exports.useRemotionEnvironment = exports.useDelayRender = exports.useCurrentScale = exports.useCurrentFrame = exports.useBufferState = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.prefetch = exports.random = exports.interpolate = exports.Loop = exports.interpolateColors = exports.Img = exports.getStaticFiles = exports.getRemotionEnvironment = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Composition = exports.cancelRender = exports.Artifact = void 0;
|
|
18
18
|
require("./_check-rsc.js");
|
|
19
19
|
require("./asset-types.js");
|
|
20
20
|
const Clipper_js_1 = require("./Clipper.js");
|
|
@@ -74,6 +74,10 @@ var use_current_frame_js_1 = require("./use-current-frame.js");
|
|
|
74
74
|
Object.defineProperty(exports, "useCurrentFrame", { enumerable: true, get: function () { return use_current_frame_js_1.useCurrentFrame; } });
|
|
75
75
|
var use_current_scale_1 = require("./use-current-scale");
|
|
76
76
|
Object.defineProperty(exports, "useCurrentScale", { enumerable: true, get: function () { return use_current_scale_1.useCurrentScale; } });
|
|
77
|
+
var use_delay_render_1 = require("./use-delay-render");
|
|
78
|
+
Object.defineProperty(exports, "useDelayRender", { enumerable: true, get: function () { return use_delay_render_1.useDelayRender; } });
|
|
79
|
+
var use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
80
|
+
Object.defineProperty(exports, "useRemotionEnvironment", { enumerable: true, get: function () { return use_remotion_environment_js_1.useRemotionEnvironment; } });
|
|
77
81
|
__exportStar(require("./use-video-config.js"), exports);
|
|
78
82
|
__exportStar(require("./version.js"), exports);
|
|
79
83
|
__exportStar(require("./video-config.js"), exports);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
import type { LogLevel } from './log';
|
|
3
|
-
export declare const playAndHandleNotAllowedError: ({ mediaRef, mediaType, onAutoPlayError, logLevel, mountTime, reason, }: {
|
|
3
|
+
export declare const playAndHandleNotAllowedError: ({ mediaRef, mediaType, onAutoPlayError, logLevel, mountTime, reason, isPlayer, }: {
|
|
4
4
|
mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement | null>;
|
|
5
5
|
mediaType: "audio" | "video";
|
|
6
6
|
onAutoPlayError: null | (() => void);
|
|
7
7
|
logLevel: LogLevel;
|
|
8
8
|
mountTime: number;
|
|
9
9
|
reason: string;
|
|
10
|
+
isPlayer: boolean;
|
|
10
11
|
}) => void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.playAndHandleNotAllowedError = void 0;
|
|
4
|
-
const get_remotion_environment_1 = require("./get-remotion-environment");
|
|
5
4
|
const playback_logging_1 = require("./playback-logging");
|
|
6
|
-
const playAndHandleNotAllowedError = ({ mediaRef, mediaType, onAutoPlayError, logLevel, mountTime, reason, }) => {
|
|
5
|
+
const playAndHandleNotAllowedError = ({ mediaRef, mediaType, onAutoPlayError, logLevel, mountTime, reason, isPlayer, }) => {
|
|
7
6
|
const { current } = mediaRef;
|
|
8
7
|
if (!current) {
|
|
9
8
|
return;
|
|
@@ -56,7 +55,7 @@ const playAndHandleNotAllowedError = ({ mediaRef, mediaType, onAutoPlayError, lo
|
|
|
56
55
|
}
|
|
57
56
|
// eslint-disable-next-line no-console
|
|
58
57
|
console.log(`The video will be muted and we'll retry playing it.`);
|
|
59
|
-
if (mediaType === 'video' &&
|
|
58
|
+
if (mediaType === 'video' && isPlayer) {
|
|
60
59
|
// eslint-disable-next-line no-console
|
|
61
60
|
console.log('Use onAutoPlayError() to handle this error yourself.');
|
|
62
61
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveVideoConfigOrCatch = exports.resolveVideoConfig = void 0;
|
|
4
|
+
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
4
5
|
const input_props_serialization_js_1 = require("./input-props-serialization.js");
|
|
5
6
|
const validate_default_codec_js_1 = require("./validation/validate-default-codec.js");
|
|
6
7
|
const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
|
|
@@ -45,6 +46,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, originalP
|
|
|
45
46
|
props: originalProps,
|
|
46
47
|
abortSignal: signal,
|
|
47
48
|
compositionId,
|
|
49
|
+
isRendering: (0, get_remotion_environment_js_1.getRemotionEnvironment)().isRendering,
|
|
48
50
|
})
|
|
49
51
|
: null;
|
|
50
52
|
if (calculatedProm !== null &&
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.usePlayingState = exports.useTimelineSetFrame = exports.useTimelinePosition = exports.getFrameForComposition = exports.getInitialFrameState = exports.persistCurrentFrame = exports.SetTimelineContext = exports.TimelineContext = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
6
6
|
const use_video_js_1 = require("./use-video.js");
|
|
7
7
|
exports.TimelineContext = (0, react_1.createContext)({
|
|
8
8
|
frame: {},
|
|
@@ -56,14 +56,13 @@ const useTimelinePosition = () => {
|
|
|
56
56
|
var _a, _b;
|
|
57
57
|
const videoConfig = (0, use_video_js_1.useVideo)();
|
|
58
58
|
const state = (0, react_1.useContext)(exports.TimelineContext);
|
|
59
|
+
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
59
60
|
if (!videoConfig) {
|
|
60
61
|
return typeof window === 'undefined'
|
|
61
62
|
? 0
|
|
62
63
|
: ((_a = window.remotion_initialFrame) !== null && _a !== void 0 ? _a : 0);
|
|
63
64
|
}
|
|
64
|
-
const unclamped = (_b = state.frame[videoConfig.id]) !== null && _b !== void 0 ? _b : ((0,
|
|
65
|
-
? 0
|
|
66
|
-
: (0, exports.getFrameForComposition)(videoConfig.id));
|
|
65
|
+
const unclamped = (_b = state.frame[videoConfig.id]) !== null && _b !== void 0 ? _b : (env.isPlayer ? 0 : (0, exports.getFrameForComposition)(videoConfig.id));
|
|
67
66
|
return Math.min(videoConfig.durationInFrames - 1, unclamped);
|
|
68
67
|
};
|
|
69
68
|
exports.useTimelinePosition = useTimelinePosition;
|
|
@@ -4,16 +4,17 @@ exports.useCurrentFrame = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
|
|
6
6
|
const SequenceContext_js_1 = require("./SequenceContext.js");
|
|
7
|
-
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
8
7
|
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
8
|
+
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
9
9
|
/*
|
|
10
10
|
* @description Retrieves the current frame of the video within a component. Frames are 0-indexed, and if the component is wrapped in a `<Sequence>`, it returns the frame relative to when the Sequence starts.
|
|
11
11
|
* @see [Documentation](https://www.remotion.dev/docs/use-current-frame)
|
|
12
12
|
*/
|
|
13
13
|
const useCurrentFrame = () => {
|
|
14
14
|
const canUseRemotionHooks = (0, react_1.useContext)(CanUseRemotionHooks_js_1.CanUseRemotionHooks);
|
|
15
|
+
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
15
16
|
if (!canUseRemotionHooks) {
|
|
16
|
-
if (
|
|
17
|
+
if (env.isPlayer) {
|
|
17
18
|
throw new Error(`useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples`);
|
|
18
19
|
}
|
|
19
20
|
throw new Error(`useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions`);
|
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.useCurrentScale = exports.calculateScale = exports.PreviewSizeContext = exports.CurrentScaleContext = void 0;
|
|
37
37
|
const react_1 = __importStar(require("react"));
|
|
38
|
-
const
|
|
38
|
+
const use_remotion_environment_1 = require("./use-remotion-environment");
|
|
39
39
|
const use_unsafe_video_config_1 = require("./use-unsafe-video-config");
|
|
40
40
|
exports.CurrentScaleContext = react_1.default.createContext(null);
|
|
41
41
|
exports.PreviewSizeContext = (0, react_1.createContext)({
|
|
@@ -64,11 +64,12 @@ const useCurrentScale = (options) => {
|
|
|
64
64
|
const hasContext = react_1.default.useContext(exports.CurrentScaleContext);
|
|
65
65
|
const zoomContext = react_1.default.useContext(exports.PreviewSizeContext);
|
|
66
66
|
const config = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
67
|
+
const env = (0, use_remotion_environment_1.useRemotionEnvironment)();
|
|
67
68
|
if (hasContext === null || config === null || zoomContext === null) {
|
|
68
69
|
if (options === null || options === void 0 ? void 0 : options.dontThrowIfOutsideOfRemotion) {
|
|
69
70
|
return 1;
|
|
70
71
|
}
|
|
71
|
-
if (
|
|
72
|
+
if (env.isRendering) {
|
|
72
73
|
return 1;
|
|
73
74
|
}
|
|
74
75
|
throw new Error([
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DelayRenderOptions } from './delay-render.js';
|
|
2
|
+
type DelayRenderFn = (label?: string, options?: DelayRenderOptions) => number;
|
|
3
|
+
type ContinueRenderFn = (handle: number) => void;
|
|
4
|
+
export declare const useDelayRender: () => {
|
|
5
|
+
delayRender: DelayRenderFn;
|
|
6
|
+
continueRender: ContinueRenderFn;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDelayRender = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const delay_render_js_1 = require("./delay-render.js");
|
|
6
|
+
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
7
|
+
const useDelayRender = () => {
|
|
8
|
+
const environment = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
9
|
+
const delayRender = (0, react_1.useCallback)((label, options) => {
|
|
10
|
+
return (0, delay_render_js_1.delayRenderInternal)(environment, label, options);
|
|
11
|
+
}, [environment]);
|
|
12
|
+
const continueRender = (0, react_1.useCallback)((handle) => {
|
|
13
|
+
(0, delay_render_js_1.continueRenderInternal)(handle, environment);
|
|
14
|
+
}, [environment]);
|
|
15
|
+
return { delayRender, continueRender };
|
|
16
|
+
};
|
|
17
|
+
exports.useDelayRender = useDelayRender;
|
|
@@ -6,11 +6,11 @@ const SequenceContext_js_1 = require("./SequenceContext.js");
|
|
|
6
6
|
const SequenceManager_js_1 = require("./SequenceManager.js");
|
|
7
7
|
const use_audio_frame_js_1 = require("./audio/use-audio-frame.js");
|
|
8
8
|
const get_asset_file_name_js_1 = require("./get-asset-file-name.js");
|
|
9
|
-
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
10
9
|
const log_level_context_js_1 = require("./log-level-context.js");
|
|
11
10
|
const nonce_js_1 = require("./nonce.js");
|
|
12
11
|
const play_and_handle_not_allowed_error_js_1 = require("./play-and-handle-not-allowed-error.js");
|
|
13
12
|
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
13
|
+
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
14
14
|
const use_video_config_js_1 = require("./use-video-config.js");
|
|
15
15
|
const volume_prop_js_1 = require("./volume-prop.js");
|
|
16
16
|
const didWarn = {};
|
|
@@ -60,6 +60,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
60
60
|
warnOnce(`Remotion: The ${mediaType} with src ${src} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/audio/volume`);
|
|
61
61
|
}
|
|
62
62
|
}, [initialVolume, mediaType, src, volume]);
|
|
63
|
+
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
63
64
|
(0, react_1.useEffect)(() => {
|
|
64
65
|
var _a, _b, _c;
|
|
65
66
|
if (!mediaRef.current) {
|
|
@@ -68,8 +69,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
68
69
|
if (!src) {
|
|
69
70
|
throw new Error('No src passed');
|
|
70
71
|
}
|
|
71
|
-
if (!(0
|
|
72
|
-
((_b = (_a = window.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.NODE_ENV) !== 'test') {
|
|
72
|
+
if (!env.isStudio && ((_b = (_a = window.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.NODE_ENV) !== 'test') {
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
if (!showInTimeline) {
|
|
@@ -120,6 +120,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
120
120
|
showInTimeline,
|
|
121
121
|
premountDisplay,
|
|
122
122
|
postmountDisplay,
|
|
123
|
+
env.isStudio,
|
|
123
124
|
]);
|
|
124
125
|
(0, react_1.useEffect)(() => {
|
|
125
126
|
const tag = {
|
|
@@ -139,6 +140,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
139
140
|
logLevel,
|
|
140
141
|
mountTime,
|
|
141
142
|
reason,
|
|
143
|
+
isPlayer: env.isPlayer,
|
|
142
144
|
});
|
|
143
145
|
},
|
|
144
146
|
};
|
|
@@ -157,6 +159,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
157
159
|
isPostmounting,
|
|
158
160
|
logLevel,
|
|
159
161
|
mountTime,
|
|
162
|
+
env.isPlayer,
|
|
160
163
|
]);
|
|
161
164
|
};
|
|
162
165
|
exports.useMediaInTimeline = useMediaInTimeline;
|