remotion 4.0.79 → 4.0.81
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/CatchError.d.ts +15 -0
- package/dist/cjs/CatchError.js +68 -0
- package/dist/cjs/CompositionManager.d.ts +1 -0
- package/dist/cjs/Img.d.ts +1 -1
- package/dist/cjs/Sequence.d.ts +6 -0
- package/dist/cjs/Sequence.js +20 -7
- package/dist/cjs/SequenceContext.d.ts +2 -0
- package/dist/cjs/SequenceManager.d.ts +5 -0
- package/dist/cjs/SequenceManager.js +16 -3
- package/dist/cjs/audio/Audio.d.ts +6 -1
- package/dist/cjs/audio/Audio.js +4 -2
- package/dist/cjs/audio/AudioForDevelopment.d.ts +1 -0
- package/dist/cjs/audio/AudioForDevelopment.js +11 -3
- package/dist/cjs/enable-sequence-stack-traces.d.ts +1 -0
- package/dist/cjs/enable-sequence-stack-traces.js +34 -0
- package/dist/cjs/index.js +5 -2
- package/dist/cjs/internals.d.ts +2 -0
- package/dist/cjs/internals.js +3 -0
- package/dist/cjs/loop/index.js +1 -1
- package/dist/cjs/series/index.js +4 -2
- package/dist/cjs/use-media-in-timeline.d.ts +3 -1
- package/dist/cjs/use-media-in-timeline.js +3 -2
- package/dist/cjs/use-unsafe-video-config.js +7 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/OffthreadVideo.d.ts +1 -1
- package/dist/cjs/video/OffthreadVideo.js +2 -2
- package/dist/cjs/video/Video.d.ts +6 -1
- package/dist/cjs/video/Video.js +4 -2
- package/dist/cjs/video/VideoForDevelopment.d.ts +1 -0
- package/dist/cjs/video/VideoForDevelopment.js +17 -5
- package/dist/cjs/video/props.d.ts +4 -0
- package/dist/cjs/video/seek-until-right.d.ts +8 -0
- package/dist/cjs/video/seek-until-right.js +60 -0
- package/dist/esm/index.mjs +226 -167
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare class CatchError extends React.Component {
|
|
3
|
+
state: {
|
|
4
|
+
hasError: boolean;
|
|
5
|
+
};
|
|
6
|
+
constructor(props: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
});
|
|
9
|
+
static getDerivedStateFromError(error: Error): {
|
|
10
|
+
hasError: boolean;
|
|
11
|
+
};
|
|
12
|
+
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
|
13
|
+
render(): React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const StackTraceFetcher: () => JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.StackTraceFetcher = exports.CatchError = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const ErrorThrower = () => {
|
|
30
|
+
const [trigger, setTrigger] = react_1.default.useState(false);
|
|
31
|
+
(0, react_1.useEffect)(() => {
|
|
32
|
+
setTrigger(true);
|
|
33
|
+
}, []);
|
|
34
|
+
if (trigger) {
|
|
35
|
+
// throw new Error('lol');
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
};
|
|
39
|
+
class CatchError extends react_1.default.Component {
|
|
40
|
+
// eslint-disable-next-line no-useless-constructor
|
|
41
|
+
constructor(props) {
|
|
42
|
+
super(props);
|
|
43
|
+
this.state = { hasError: false };
|
|
44
|
+
}
|
|
45
|
+
static getDerivedStateFromError(error) {
|
|
46
|
+
console.log('DERIVED STATE');
|
|
47
|
+
console.error(error);
|
|
48
|
+
return { hasError: true };
|
|
49
|
+
}
|
|
50
|
+
componentDidCatch(error, errorInfo) {
|
|
51
|
+
console.log('DID CATCH');
|
|
52
|
+
console.error(error, errorInfo);
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
console.log('state', this);
|
|
56
|
+
if (this.state.hasError) {
|
|
57
|
+
console.log('null');
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
// @ts-expect-error
|
|
61
|
+
return this.props.children;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.CatchError = CatchError;
|
|
65
|
+
const StackTraceFetcher = () => {
|
|
66
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(CatchError, { children: (0, jsx_runtime_1.jsx)(ErrorThrower, {}) }) }));
|
|
67
|
+
};
|
|
68
|
+
exports.StackTraceFetcher = StackTraceFetcher;
|
package/dist/cjs/Img.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export type ImgProps = Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTML
|
|
|
7
7
|
* @description Works just like a regular HTML img tag. When you use the <Img> tag, Remotion will ensure that the image is loaded before rendering the frame.
|
|
8
8
|
* @see [Documentation](https://www.remotion.dev/docs/img)
|
|
9
9
|
*/
|
|
10
|
-
export declare const Img: React.ForwardRefExoticComponent<Pick<ImgProps, "width" | "height" | "id" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "
|
|
10
|
+
export declare const Img: React.ForwardRefExoticComponent<Pick<ImgProps, "width" | "height" | "id" | "children" | "style" | "className" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "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" | "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>>;
|
package/dist/cjs/Sequence.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export type LayoutAndStyle = {
|
|
|
9
9
|
};
|
|
10
10
|
export type SequencePropsWithoutDuration = {
|
|
11
11
|
children: React.ReactNode;
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
12
14
|
from?: number;
|
|
13
15
|
name?: string;
|
|
14
16
|
/**
|
|
@@ -19,6 +21,10 @@ export type SequencePropsWithoutDuration = {
|
|
|
19
21
|
* @deprecated For internal use only.
|
|
20
22
|
*/
|
|
21
23
|
loopDisplay?: LoopDisplay;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated For internal use only.
|
|
26
|
+
*/
|
|
27
|
+
stack?: string;
|
|
22
28
|
} & LayoutAndStyle;
|
|
23
29
|
export type SequenceProps = {
|
|
24
30
|
durationInFrames?: number;
|
package/dist/cjs/Sequence.js
CHANGED
|
@@ -5,13 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const AbsoluteFill_js_1 = require("./AbsoluteFill.js");
|
|
7
7
|
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
8
|
-
const get_timeline_clip_name_js_1 = require("./get-timeline-clip-name.js");
|
|
9
8
|
const nonce_js_1 = require("./nonce.js");
|
|
10
9
|
const SequenceContext_js_1 = require("./SequenceContext.js");
|
|
11
10
|
const SequenceManager_js_1 = require("./SequenceManager.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
|
-
const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity, children, name, showInTimeline = true, loopDisplay, ...other }, ref) => {
|
|
13
|
+
const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity, children, name, height, width, showInTimeline = true, loopDisplay, stack, ...other }, ref) => {
|
|
14
|
+
var _a;
|
|
15
15
|
const { layout = 'absolute-fill' } = other;
|
|
16
16
|
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
17
17
|
const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
@@ -46,25 +46,30 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
46
46
|
: durationInFrames;
|
|
47
47
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
48
48
|
const { registerSequence, unregisterSequence } = (0, react_1.useContext)(SequenceManager_js_1.SequenceManager);
|
|
49
|
+
const { hidden } = (0, react_1.useContext)(SequenceManager_js_1.SequenceVisibilityToggleContext);
|
|
49
50
|
const contextValue = (0, react_1.useMemo)(() => {
|
|
50
|
-
var _a;
|
|
51
|
+
var _a, _b, _c;
|
|
51
52
|
return {
|
|
52
53
|
cumulatedFrom,
|
|
53
54
|
relativeFrom: from,
|
|
54
55
|
durationInFrames: actualDurationInFrames,
|
|
55
56
|
parentFrom: (_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.relativeFrom) !== null && _a !== void 0 ? _a : 0,
|
|
56
57
|
id,
|
|
58
|
+
height: (_b = height !== null && height !== void 0 ? height : parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.height) !== null && _b !== void 0 ? _b : null,
|
|
59
|
+
width: (_c = width !== null && width !== void 0 ? width : parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.width) !== null && _c !== void 0 ? _c : null,
|
|
57
60
|
};
|
|
58
61
|
}, [
|
|
59
62
|
cumulatedFrom,
|
|
60
63
|
from,
|
|
61
64
|
actualDurationInFrames,
|
|
62
|
-
parentSequence
|
|
65
|
+
parentSequence,
|
|
63
66
|
id,
|
|
67
|
+
height,
|
|
68
|
+
width,
|
|
64
69
|
]);
|
|
65
70
|
const timelineClipName = (0, react_1.useMemo)(() => {
|
|
66
|
-
return name !== null && name !== void 0 ? name :
|
|
67
|
-
}, [
|
|
71
|
+
return name !== null && name !== void 0 ? name : '';
|
|
72
|
+
}, [name]);
|
|
68
73
|
(0, react_1.useEffect)(() => {
|
|
69
74
|
var _a;
|
|
70
75
|
if (!(0, get_remotion_environment_js_1.getRemotionEnvironment)().isStudio) {
|
|
@@ -81,6 +86,7 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
81
86
|
showInTimeline,
|
|
82
87
|
nonce,
|
|
83
88
|
loopDisplay,
|
|
89
|
+
stack: stack !== null && stack !== void 0 ? stack : null,
|
|
84
90
|
});
|
|
85
91
|
return () => {
|
|
86
92
|
unregisterSequence(id);
|
|
@@ -99,6 +105,7 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
99
105
|
showInTimeline,
|
|
100
106
|
nonce,
|
|
101
107
|
loopDisplay,
|
|
108
|
+
stack,
|
|
102
109
|
]);
|
|
103
110
|
// Ceil to support floats
|
|
104
111
|
// https://github.com/remotion-dev/remotion/issues/2958
|
|
@@ -112,12 +119,18 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
112
119
|
const defaultStyle = (0, react_1.useMemo)(() => {
|
|
113
120
|
return {
|
|
114
121
|
flexDirection: undefined,
|
|
122
|
+
...(width ? { width } : {}),
|
|
123
|
+
...(height ? { height } : {}),
|
|
115
124
|
...(styleIfThere !== null && styleIfThere !== void 0 ? styleIfThere : {}),
|
|
116
125
|
};
|
|
117
|
-
}, [styleIfThere]);
|
|
126
|
+
}, [height, styleIfThere, width]);
|
|
118
127
|
if (ref !== null && layout === 'none') {
|
|
119
128
|
throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
|
|
120
129
|
}
|
|
130
|
+
const isSequenceHidden = (_a = hidden[id]) !== null && _a !== void 0 ? _a : false;
|
|
131
|
+
if (isSequenceHidden) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
121
134
|
return ((0, jsx_runtime_1.jsx)(SequenceContext_js_1.SequenceContext.Provider, { value: contextValue, children: content === null ? null : other.layout === 'none' ? (content) : ((0, jsx_runtime_1.jsx)(AbsoluteFill_js_1.AbsoluteFill, { ref: ref, style: defaultStyle, className: other.className, children: content })) }));
|
|
122
135
|
};
|
|
123
136
|
/**
|
|
@@ -6,6 +6,11 @@ export type SequenceManagerContext = {
|
|
|
6
6
|
sequences: TSequence[];
|
|
7
7
|
};
|
|
8
8
|
export declare const SequenceManager: React.Context<SequenceManagerContext>;
|
|
9
|
+
export type SequenceVisibilityToggleState = {
|
|
10
|
+
hidden: Record<string, boolean>;
|
|
11
|
+
setHidden: React.Dispatch<React.SetStateAction<Record<string, boolean>>>;
|
|
12
|
+
};
|
|
13
|
+
export declare const SequenceVisibilityToggleContext: React.Context<SequenceVisibilityToggleState>;
|
|
9
14
|
export declare const SequenceManagerProvider: React.FC<{
|
|
10
15
|
children: React.ReactNode;
|
|
11
16
|
}>;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.SequenceManagerProvider = exports.SequenceManager = void 0;
|
|
26
|
+
exports.SequenceManagerProvider = exports.SequenceVisibilityToggleContext = exports.SequenceManager = void 0;
|
|
27
27
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
exports.SequenceManager = react_1.default.createContext({
|
|
@@ -35,8 +35,15 @@ exports.SequenceManager = react_1.default.createContext({
|
|
|
35
35
|
},
|
|
36
36
|
sequences: [],
|
|
37
37
|
});
|
|
38
|
+
exports.SequenceVisibilityToggleContext = react_1.default.createContext({
|
|
39
|
+
hidden: {},
|
|
40
|
+
setHidden: () => {
|
|
41
|
+
throw new Error('SequenceVisibilityToggle not initialized');
|
|
42
|
+
},
|
|
43
|
+
});
|
|
38
44
|
const SequenceManagerProvider = ({ children }) => {
|
|
39
45
|
const [sequences, setSequences] = (0, react_1.useState)([]);
|
|
46
|
+
const [hidden, setHidden] = (0, react_1.useState)({});
|
|
40
47
|
const registerSequence = (0, react_1.useCallback)((seq) => {
|
|
41
48
|
setSequences((seqs) => {
|
|
42
49
|
return [...seqs, seq];
|
|
@@ -45,13 +52,19 @@ const SequenceManagerProvider = ({ children }) => {
|
|
|
45
52
|
const unregisterSequence = (0, react_1.useCallback)((seq) => {
|
|
46
53
|
setSequences((seqs) => seqs.filter((s) => s.id !== seq));
|
|
47
54
|
}, []);
|
|
48
|
-
const
|
|
55
|
+
const sequenceContext = (0, react_1.useMemo)(() => {
|
|
49
56
|
return {
|
|
50
57
|
registerSequence,
|
|
51
58
|
sequences,
|
|
52
59
|
unregisterSequence,
|
|
53
60
|
};
|
|
54
61
|
}, [registerSequence, sequences, unregisterSequence]);
|
|
55
|
-
|
|
62
|
+
const hiddenContext = (0, react_1.useMemo)(() => {
|
|
63
|
+
return {
|
|
64
|
+
hidden,
|
|
65
|
+
setHidden,
|
|
66
|
+
};
|
|
67
|
+
}, [hidden]);
|
|
68
|
+
return ((0, jsx_runtime_1.jsx)(exports.SequenceManager.Provider, { value: sequenceContext, children: (0, jsx_runtime_1.jsx)(exports.SequenceVisibilityToggleContext.Provider, { value: hiddenContext, children: children }) }));
|
|
56
69
|
};
|
|
57
70
|
exports.SequenceManagerProvider = SequenceManagerProvider;
|
|
@@ -13,4 +13,9 @@ export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.Deta
|
|
|
13
13
|
_remotionInternalNeedsDurationCalculation?: boolean | undefined;
|
|
14
14
|
_remotionInternalNativeLoopPassed?: boolean | undefined;
|
|
15
15
|
toneFrequency?: number | undefined;
|
|
16
|
-
} & RemotionMainAudioProps
|
|
16
|
+
} & RemotionMainAudioProps & {
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated For internal use only
|
|
19
|
+
*/
|
|
20
|
+
stack?: string | undefined;
|
|
21
|
+
}, "id" | "children" | "name" | "stack" | "style" | "className" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "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" | "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" | "muted" | "volume" | "allowAmplificationDuringRender" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "playsInline" | "preload" | "src" | "playbackRate" | "acceptableTimeShiftInSeconds" | "_remotionInternalNeedsDurationCalculation" | "_remotionInternalNativeLoopPassed" | "toneFrequency" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
|
package/dist/cjs/audio/Audio.js
CHANGED
|
@@ -7,6 +7,7 @@ const react_1 = require("react");
|
|
|
7
7
|
const absolute_src_js_1 = require("../absolute-src.js");
|
|
8
8
|
const calculate_loop_js_1 = require("../calculate-loop.js");
|
|
9
9
|
const cancel_render_js_1 = require("../cancel-render.js");
|
|
10
|
+
const enable_sequence_stack_traces_js_1 = require("../enable-sequence-stack-traces.js");
|
|
10
11
|
const get_remotion_environment_js_1 = require("../get-remotion-environment.js");
|
|
11
12
|
const index_js_1 = require("../loop/index.js");
|
|
12
13
|
const prefetch_js_1 = require("../prefetch.js");
|
|
@@ -21,7 +22,7 @@ const shared_audio_tags_js_1 = require("./shared-audio-tags.js");
|
|
|
21
22
|
const AudioRefForwardingFunction = (props, ref) => {
|
|
22
23
|
var _a, _b;
|
|
23
24
|
const audioContext = (0, react_1.useContext)(shared_audio_tags_js_1.SharedAudioContext);
|
|
24
|
-
const { startFrom, endAt, name, ...otherProps } = props;
|
|
25
|
+
const { startFrom, endAt, name, stack, ...otherProps } = props;
|
|
25
26
|
const { loop, ...propsOtherThanLoop } = props;
|
|
26
27
|
const { fps } = (0, use_video_config_js_1.useVideoConfig)();
|
|
27
28
|
const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
|
|
@@ -66,10 +67,11 @@ const AudioRefForwardingFunction = (props, ref) => {
|
|
|
66
67
|
if (environment.isRendering) {
|
|
67
68
|
return ((0, jsx_runtime_1.jsx)(AudioForRendering_js_1.AudioForRendering, { onDuration: onDuration, ...props, ref: ref, onError: onError, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
|
|
68
69
|
}
|
|
69
|
-
return ((0, jsx_runtime_1.jsx)(AudioForDevelopment_js_1.AudioForDevelopment, { _remotionInternalNativeLoopPassed: (_b = props._remotionInternalNativeLoopPassed) !== null && _b !== void 0 ? _b : false, shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0, ...props, ref: ref, onError: onError, onDuration: onDuration, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
|
|
70
|
+
return ((0, jsx_runtime_1.jsx)(AudioForDevelopment_js_1.AudioForDevelopment, { _remotionInternalNativeLoopPassed: (_b = props._remotionInternalNativeLoopPassed) !== null && _b !== void 0 ? _b : false, _remotionInternalStack: stack !== null && stack !== void 0 ? stack : null, shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0, ...props, ref: ref, onError: onError, onDuration: onDuration, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
|
|
70
71
|
};
|
|
71
72
|
/**
|
|
72
73
|
* @description With this component, you can add audio to your video. All audio formats which are supported by Chromium are supported by the component.
|
|
73
74
|
* @see [Documentation](https://www.remotion.dev/docs/audio)
|
|
74
75
|
*/
|
|
75
76
|
exports.Audio = (0, react_1.forwardRef)(AudioRefForwardingFunction);
|
|
77
|
+
(0, enable_sequence_stack_traces_js_1.addSequenceStackTraces)(exports.Audio);
|
|
@@ -13,4 +13,5 @@ export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.D
|
|
|
13
13
|
shouldPreMountAudioTags: boolean;
|
|
14
14
|
onDuration: (src: string, durationInSeconds: number) => void;
|
|
15
15
|
_remotionInternalNativeLoopPassed: boolean;
|
|
16
|
+
_remotionInternalStack: string | null;
|
|
16
17
|
} & RefAttributes<HTMLAudioElement>>;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const prefetch_js_1 = require("../prefetch.js");
|
|
7
7
|
const random_js_1 = require("../random.js");
|
|
8
8
|
const SequenceContext_js_1 = require("../SequenceContext.js");
|
|
9
|
+
const SequenceManager_js_1 = require("../SequenceManager.js");
|
|
9
10
|
const use_media_in_timeline_js_1 = require("../use-media-in-timeline.js");
|
|
10
11
|
const use_media_playback_js_1 = require("../use-media-playback.js");
|
|
11
12
|
const use_media_tag_volume_js_1 = require("../use-media-tag-volume.js");
|
|
@@ -14,6 +15,7 @@ const volume_position_state_js_1 = require("../volume-position-state.js");
|
|
|
14
15
|
const shared_audio_tags_js_1 = require("./shared-audio-tags.js");
|
|
15
16
|
const use_audio_frame_js_1 = require("./use-audio-frame.js");
|
|
16
17
|
const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
18
|
+
var _a;
|
|
17
19
|
const [initialShouldPreMountAudioElements] = (0, react_1.useState)(props.shouldPreMountAudioTags);
|
|
18
20
|
if (props.shouldPreMountAudioTags !== initialShouldPreMountAudioElements) {
|
|
19
21
|
throw new Error('Cannot change the behavior for pre-mounting audio tags dynamically.');
|
|
@@ -21,26 +23,30 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
21
23
|
const [mediaVolume] = (0, volume_position_state_js_1.useMediaVolumeState)();
|
|
22
24
|
const [mediaMuted] = (0, volume_position_state_js_1.useMediaMutedState)();
|
|
23
25
|
const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)();
|
|
24
|
-
const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, allowAmplificationDuringRender, name, ...nativeProps } = props;
|
|
26
|
+
const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, ...nativeProps } = props;
|
|
27
|
+
const { hidden } = (0, react_1.useContext)(SequenceManager_js_1.SequenceVisibilityToggleContext);
|
|
25
28
|
if (!src) {
|
|
26
29
|
throw new TypeError("No 'src' was passed to <Audio>.");
|
|
27
30
|
}
|
|
28
31
|
const preloadedSrc = (0, prefetch_js_1.usePreload)(src);
|
|
32
|
+
const sequenceContext = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
33
|
+
const [timelineId] = (0, react_1.useState)(() => String(Math.random()));
|
|
34
|
+
const isSequenceHidden = (_a = hidden[timelineId]) !== null && _a !== void 0 ? _a : false;
|
|
29
35
|
const propsToPass = (0, react_1.useMemo)(() => {
|
|
30
36
|
return {
|
|
31
|
-
muted: muted || mediaMuted,
|
|
37
|
+
muted: muted || mediaMuted || isSequenceHidden,
|
|
32
38
|
src: preloadedSrc,
|
|
33
39
|
loop: _remotionInternalNativeLoopPassed,
|
|
34
40
|
...nativeProps,
|
|
35
41
|
};
|
|
36
42
|
}, [
|
|
37
43
|
_remotionInternalNativeLoopPassed,
|
|
44
|
+
isSequenceHidden,
|
|
38
45
|
mediaMuted,
|
|
39
46
|
muted,
|
|
40
47
|
nativeProps,
|
|
41
48
|
preloadedSrc,
|
|
42
49
|
]);
|
|
43
|
-
const sequenceContext = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
44
50
|
// Generate a string that's as unique as possible for this asset
|
|
45
51
|
// but at the same time deterministic. We use it to combat strict mode issues.
|
|
46
52
|
const id = (0, react_1.useMemo)(() => `audio-${(0, random_js_1.random)(src !== null && src !== void 0 ? src : '')}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
@@ -68,6 +74,8 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
68
74
|
mediaType: 'audio',
|
|
69
75
|
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
70
76
|
displayName: name !== null && name !== void 0 ? name : null,
|
|
77
|
+
id: timelineId,
|
|
78
|
+
stack: props._remotionInternalStack,
|
|
71
79
|
});
|
|
72
80
|
(0, use_media_playback_js_1.useMediaPlayback)({
|
|
73
81
|
mediaRef: audioRef,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const addSequenceStackTraces: (component: unknown) => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.addSequenceStackTraces = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const get_remotion_environment_1 = require("./get-remotion-environment");
|
|
9
|
+
const originalCreateElement = react_1.default.createElement;
|
|
10
|
+
const componentsToAddStacksTo = [];
|
|
11
|
+
const enableSequenceStackTraces = () => {
|
|
12
|
+
const proxy = new Proxy(originalCreateElement, {
|
|
13
|
+
apply(target, thisArg, argArray) {
|
|
14
|
+
if (componentsToAddStacksTo.includes(argArray[0])) {
|
|
15
|
+
const [first, props, ...rest] = argArray;
|
|
16
|
+
const newProps = {
|
|
17
|
+
...(props !== null && props !== void 0 ? props : {}),
|
|
18
|
+
stack: new Error().stack,
|
|
19
|
+
};
|
|
20
|
+
return Reflect.apply(target, thisArg, [first, newProps, ...rest]);
|
|
21
|
+
}
|
|
22
|
+
return Reflect.apply(target, thisArg, argArray);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
react_1.default.createElement = proxy;
|
|
26
|
+
};
|
|
27
|
+
const addSequenceStackTraces = (component) => {
|
|
28
|
+
if (!(0, get_remotion_environment_1.getRemotionEnvironment)().isStudio) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
componentsToAddStacksTo.push(component);
|
|
32
|
+
enableSequenceStackTraces();
|
|
33
|
+
};
|
|
34
|
+
exports.addSequenceStackTraces = addSequenceStackTraces;
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,9 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.Config = exports.Experimental = exports.watchStaticFile = exports.useCurrentFrame = 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 = void 0;
|
|
18
18
|
require("./asset-types.js");
|
|
19
19
|
const Clipper_js_1 = require("./Clipper.js");
|
|
20
|
+
const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
|
|
20
21
|
const is_player_js_1 = require("./is-player.js");
|
|
21
22
|
const multiple_versions_warning_js_1 = require("./multiple-versions-warning.js");
|
|
22
23
|
const Null_js_1 = require("./Null.js");
|
|
24
|
+
const Sequence_js_1 = require("./Sequence.js");
|
|
23
25
|
(0, multiple_versions_warning_js_1.checkMultipleRemotionVersions)();
|
|
24
26
|
__exportStar(require("./AbsoluteFill.js"), exports);
|
|
25
27
|
__exportStar(require("./audio/index.js"), exports);
|
|
@@ -54,8 +56,8 @@ var prefetch_js_1 = require("./prefetch.js");
|
|
|
54
56
|
Object.defineProperty(exports, "prefetch", { enumerable: true, get: function () { return prefetch_js_1.prefetch; } });
|
|
55
57
|
var register_root_js_1 = require("./register-root.js");
|
|
56
58
|
Object.defineProperty(exports, "registerRoot", { enumerable: true, get: function () { return register_root_js_1.registerRoot; } });
|
|
57
|
-
var
|
|
58
|
-
Object.defineProperty(exports, "Sequence", { enumerable: true, get: function () { return
|
|
59
|
+
var Sequence_js_2 = require("./Sequence.js");
|
|
60
|
+
Object.defineProperty(exports, "Sequence", { enumerable: true, get: function () { return Sequence_js_2.Sequence; } });
|
|
59
61
|
var index_js_2 = require("./series/index.js");
|
|
60
62
|
Object.defineProperty(exports, "Series", { enumerable: true, get: function () { return index_js_2.Series; } });
|
|
61
63
|
__exportStar(require("./spring/index.js"), exports);
|
|
@@ -109,3 +111,4 @@ exports.Config = new Proxy(proxyObj, {
|
|
|
109
111
|
};
|
|
110
112
|
},
|
|
111
113
|
});
|
|
114
|
+
(0, enable_sequence_stack_traces_js_1.addSequenceStackTraces)(Sequence_js_1.Sequence);
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const Internals: {
|
|
|
16
16
|
readonly Timeline: typeof TimelinePosition;
|
|
17
17
|
readonly CompositionManager: import("react").Context<CompositionManagerContext>;
|
|
18
18
|
readonly SequenceManager: import("react").Context<import("./SequenceManager.js").SequenceManagerContext>;
|
|
19
|
+
readonly SequenceVisibilityToggleContext: import("react").Context<import("./SequenceManager.js").SequenceVisibilityToggleState>;
|
|
19
20
|
readonly RemotionRoot: import("react").FC<{
|
|
20
21
|
children: import("react").ReactNode;
|
|
21
22
|
numberOfAudioTags: number;
|
|
@@ -123,5 +124,6 @@ export declare const Internals: {
|
|
|
123
124
|
}>;
|
|
124
125
|
readonly isIosSafari: () => boolean;
|
|
125
126
|
readonly WATCH_REMOTION_STATIC_FILES: "remotion_staticFilesChanged";
|
|
127
|
+
readonly addSequenceStackTraces: (component: unknown) => void;
|
|
126
128
|
};
|
|
127
129
|
export type { TComposition, TimelinePosition as Timeline, TCompMetadata, TSequence, TRenderAsset as TAsset, TimelineContextValue, SetTimelineContextValue, CompProps, CompositionManagerContext, MediaVolumeContextValue, SetMediaVolumeContextValue, RemotionEnvironment, SerializedJSONWithCustomFields, WatchRemotionStaticFilesPayload, };
|
package/dist/cjs/internals.js
CHANGED
|
@@ -31,6 +31,7 @@ const CompositionManager_js_1 = require("./CompositionManager.js");
|
|
|
31
31
|
const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
|
|
32
32
|
const CSSUtils = __importStar(require("./default-css.js"));
|
|
33
33
|
const EditorProps_js_1 = require("./EditorProps.js");
|
|
34
|
+
const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
|
|
34
35
|
const get_preview_dom_element_js_1 = require("./get-preview-dom-element.js");
|
|
35
36
|
const get_remotion_environment_js_1 = require("./get-remotion-environment.js");
|
|
36
37
|
const input_props_serialization_js_1 = require("./input-props-serialization.js");
|
|
@@ -67,6 +68,7 @@ exports.Internals = {
|
|
|
67
68
|
Timeline: TimelinePosition,
|
|
68
69
|
CompositionManager: CompositionManagerContext_js_1.CompositionManager,
|
|
69
70
|
SequenceManager: SequenceManager_js_1.SequenceManager,
|
|
71
|
+
SequenceVisibilityToggleContext: SequenceManager_js_1.SequenceVisibilityToggleContext,
|
|
70
72
|
RemotionRoot: RemotionRoot_js_1.RemotionRoot,
|
|
71
73
|
useVideo: use_video_js_1.useVideo,
|
|
72
74
|
getRoot: register_root_js_1.getRoot,
|
|
@@ -114,4 +116,5 @@ exports.Internals = {
|
|
|
114
116
|
ClipComposition: Composition_js_1.ClipComposition,
|
|
115
117
|
isIosSafari: video_fragment_js_1.isIosSafari,
|
|
116
118
|
WATCH_REMOTION_STATIC_FILES: watch_static_file_js_1.WATCH_REMOTION_STATIC_FILES,
|
|
119
|
+
addSequenceStackTraces: enable_sequence_stack_traces_js_1.addSequenceStackTraces,
|
|
117
120
|
};
|
package/dist/cjs/loop/index.js
CHANGED
|
@@ -40,6 +40,6 @@ const Loop = ({ durationInFrames, times = Infinity, children, name, ...props })
|
|
|
40
40
|
durationInFrames,
|
|
41
41
|
};
|
|
42
42
|
}, [actualTimes, durationInFrames, from]);
|
|
43
|
-
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { durationInFrames: durationInFrames, from: from, name: name, loopDisplay: loopDisplay, layout: props.layout, style: style, children: children }));
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { durationInFrames: durationInFrames, from: from, name: name !== null && name !== void 0 ? name : '<Loop>', loopDisplay: loopDisplay, layout: props.layout, style: style, children: children }));
|
|
44
44
|
};
|
|
45
45
|
exports.Loop = Loop;
|
package/dist/cjs/series/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Series = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const enable_sequence_stack_traces_js_1 = require("../enable-sequence-stack-traces.js");
|
|
6
7
|
const Sequence_js_1 = require("../Sequence.js");
|
|
7
8
|
const validate_duration_in_frames_js_1 = require("../validation/validate-duration-in-frames.js");
|
|
8
9
|
const flatten_children_js_1 = require("./flatten-children.js");
|
|
@@ -38,7 +39,7 @@ const Series = ({ children }) => {
|
|
|
38
39
|
throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);
|
|
39
40
|
}
|
|
40
41
|
const durationInFramesProp = castedChild.props.durationInFrames;
|
|
41
|
-
const { durationInFrames, children: _children, from, ...passedProps } = castedChild.props; // `from` is not accepted and must be filtered out if used in JS
|
|
42
|
+
const { durationInFrames, children: _children, from, name, ...passedProps } = castedChild.props; // `from` is not accepted and must be filtered out if used in JS
|
|
42
43
|
if (i !== flattenedChildren.length - 1 ||
|
|
43
44
|
durationInFramesProp !== Infinity) {
|
|
44
45
|
(0, validate_duration_in_frames_js_1.validateDurationInFrames)(durationInFramesProp, {
|
|
@@ -58,7 +59,7 @@ const Series = ({ children }) => {
|
|
|
58
59
|
}
|
|
59
60
|
const currentStartFrame = startFrame + offset;
|
|
60
61
|
startFrame += durationInFramesProp + offset;
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { from: currentStartFrame, durationInFrames: durationInFramesProp, ...passedProps, ref: castedChild.ref, children: child }));
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { name: name || '<Series.Sequence>', from: currentStartFrame, durationInFrames: durationInFramesProp, ...passedProps, ref: castedChild.ref, children: child }));
|
|
62
63
|
});
|
|
63
64
|
}, [children]);
|
|
64
65
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
@@ -66,3 +67,4 @@ const Series = ({ children }) => {
|
|
|
66
67
|
};
|
|
67
68
|
exports.Series = Series;
|
|
68
69
|
Series.Sequence = SeriesSequence;
|
|
70
|
+
(0, enable_sequence_stack_traces_js_1.addSequenceStackTraces)(SeriesSequence);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
import type { VolumeProp } from './volume-prop.js';
|
|
3
|
-
export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, }: {
|
|
3
|
+
export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src, mediaType, playbackRate, displayName, id, stack, }: {
|
|
4
4
|
volume: VolumeProp | undefined;
|
|
5
5
|
mediaVolume: number;
|
|
6
6
|
mediaRef: RefObject<HTMLAudioElement | HTMLVideoElement>;
|
|
@@ -8,4 +8,6 @@ export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src,
|
|
|
8
8
|
mediaType: 'audio' | 'video';
|
|
9
9
|
playbackRate: number;
|
|
10
10
|
displayName: string | null;
|
|
11
|
+
id: string;
|
|
12
|
+
stack: string | null;
|
|
11
13
|
}) => void;
|