remotion 4.0.26 → 4.0.28
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/dist/cjs/Img.d.ts +1 -1
- package/dist/cjs/audio/Audio.d.ts +1 -1
- package/dist/cjs/get-remotion-environment.js +9 -5
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/use-media-in-timeline.js +1 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +11 -9
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/Img.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ import React from 'react';
|
|
|
6
6
|
export declare const Img: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src"> & {
|
|
7
7
|
maxRetries?: number | undefined;
|
|
8
8
|
src: string;
|
|
9
|
-
}, "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
9
|
+
}, "width" | "height" | "id" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "crossOrigin" | "src" | "loading" | "referrerPolicy" | "alt" | "decoding" | "sizes" | "srcSet" | "useMap" | "maxRetries"> & React.RefAttributes<HTMLImageElement>>;
|
|
@@ -10,4 +10,4 @@ export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.Deta
|
|
|
10
10
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
11
11
|
allowAmplificationDuringRender?: boolean | undefined;
|
|
12
12
|
_remotionInternalNeedsDurationCalculation?: boolean | undefined;
|
|
13
|
-
} & RemotionMainAudioProps, "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
13
|
+
} & RemotionMainAudioProps, "id" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "volume" | "allowAmplificationDuringRender" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "playbackRate" | "acceptableTimeShiftInSeconds" | "_remotionInternalNeedsDurationCalculation" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -7,17 +7,21 @@ exports.getRemotionEnvironment = void 0;
|
|
|
7
7
|
*/
|
|
8
8
|
const getRemotionEnvironment = () => {
|
|
9
9
|
if (process.env.NODE_ENV === 'production') {
|
|
10
|
-
|
|
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:
|
|
14
|
-
isPlayer:
|
|
17
|
+
isRendering: true,
|
|
18
|
+
isPlayer: false,
|
|
15
19
|
};
|
|
16
20
|
}
|
|
17
21
|
return {
|
|
18
22
|
isStudio: false,
|
|
19
|
-
isRendering:
|
|
20
|
-
isPlayer:
|
|
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.
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -37,7 +37,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
37
37
|
? Math.min(parentSequence.durationInFrames, videoConfig.durationInFrames)
|
|
38
38
|
: videoConfig.durationInFrames;
|
|
39
39
|
const doesVolumeChange = typeof volume === 'function';
|
|
40
|
-
const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
|
|
41
40
|
const volumes = (0, react_1.useMemo)(() => {
|
|
42
41
|
if (typeof volume === 'number') {
|
|
43
42
|
return volume;
|
|
@@ -67,7 +66,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
67
66
|
if (!src) {
|
|
68
67
|
throw new Error('No src passed');
|
|
69
68
|
}
|
|
70
|
-
if (!
|
|
69
|
+
if (!(0, get_remotion_environment_js_1.getRemotionEnvironment)().isStudio && process.env.NODE_ENV !== 'test') {
|
|
71
70
|
return;
|
|
72
71
|
}
|
|
73
72
|
registerSequence({
|
|
@@ -107,7 +106,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
107
106
|
mediaType,
|
|
108
107
|
startsAt,
|
|
109
108
|
playbackRate,
|
|
110
|
-
environment,
|
|
111
109
|
]);
|
|
112
110
|
(0, react_1.useEffect)(() => {
|
|
113
111
|
const tag = {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.28";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -59,7 +59,7 @@ function truthy(value) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// Automatically generated on publish
|
|
62
|
-
const VERSION = '4.0.
|
|
62
|
+
const VERSION = '4.0.28';
|
|
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
|
-
|
|
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:
|
|
193
|
-
isPlayer:
|
|
196
|
+
isRendering: true,
|
|
197
|
+
isPlayer: false,
|
|
194
198
|
};
|
|
195
199
|
}
|
|
196
200
|
return {
|
|
197
201
|
isStudio: false,
|
|
198
|
-
isRendering:
|
|
199
|
-
isPlayer:
|
|
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.
|
|
@@ -1499,7 +1503,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
1499
1503
|
? Math.min(parentSequence.durationInFrames, videoConfig.durationInFrames)
|
|
1500
1504
|
: videoConfig.durationInFrames;
|
|
1501
1505
|
const doesVolumeChange = typeof volume === 'function';
|
|
1502
|
-
const environment = getRemotionEnvironment();
|
|
1503
1506
|
const volumes = useMemo(() => {
|
|
1504
1507
|
if (typeof volume === 'number') {
|
|
1505
1508
|
return volume;
|
|
@@ -1529,7 +1532,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
1529
1532
|
if (!src) {
|
|
1530
1533
|
throw new Error('No src passed');
|
|
1531
1534
|
}
|
|
1532
|
-
if (!
|
|
1535
|
+
if (!getRemotionEnvironment().isStudio && process.env.NODE_ENV !== 'test') {
|
|
1533
1536
|
return;
|
|
1534
1537
|
}
|
|
1535
1538
|
registerSequence({
|
|
@@ -1569,7 +1572,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
1569
1572
|
mediaType,
|
|
1570
1573
|
startsAt,
|
|
1571
1574
|
playbackRate,
|
|
1572
|
-
environment,
|
|
1573
1575
|
]);
|
|
1574
1576
|
useEffect(() => {
|
|
1575
1577
|
const tag = {
|
package/dist/esm/version.mjs
CHANGED