remotion 3.0.24 → 3.0.27
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/.turbo/turbo-build.log +5 -5
- package/dist/Sequence.d.ts +8 -2
- package/dist/Sequence.js +15 -11
- package/dist/audio/Audio.d.ts +1 -1
- package/dist/audio/AudioForDevelopment.d.ts +1 -1
- package/dist/audio/AudioForDevelopment.js +1 -0
- package/dist/audio/AudioForRendering.d.ts +1 -1
- package/dist/config/codec.d.ts +1 -2
- package/dist/config/codec.js +2 -3
- package/dist/config/index.d.ts +1 -1
- package/dist/config/input-props.js +12 -14
- package/dist/config/log.d.ts +1 -1
- package/dist/internals.d.ts +1 -2
- package/dist/preload.d.ts +7 -0
- package/dist/preload.js +39 -0
- package/dist/spring/index.d.ts +7 -3
- package/dist/spring/index.js +21 -6
- package/dist/use-media-playback.d.ts +2 -1
- package/dist/use-media-playback.js +5 -2
- package/dist/validation/validation-spring-duration.d.ts +1 -0
- package/dist/validation/validation-spring-duration.js +21 -0
- package/dist/video/OffthreadVideo.js +1 -1
- package/dist/video/Video.d.ts +1 -1
- package/dist/video/Video.js +1 -1
- package/dist/video/VideoForDevelopment.d.ts +6 -2
- package/dist/video/VideoForDevelopment.js +2 -1
- package/dist/video/VideoForRendering.d.ts +1 -1
- package/dist/video/VideoForRendering.js +3 -1
- package/dist/volume-prop.js +1 -1
- package/dist/warn-about-non-seekable-media.d.ts +1 -1
- package/dist/warn-about-non-seekable-media.js +11 -2
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
1
|
+
[35mremotion:build: [0mcache hit, replaying output [2m9623fc5f8daba5b9[0m
|
|
2
|
+
[35mremotion:build: [0m
|
|
3
|
+
[35mremotion:build: [0m> remotion@3.0.26 build /Users/jonathanburger/remotion/packages/core
|
|
4
|
+
[35mremotion:build: [0m> tsc -d
|
|
5
|
+
[35mremotion:build: [0m
|
package/dist/Sequence.d.ts
CHANGED
|
@@ -7,13 +7,19 @@ export declare type SequenceContextType = {
|
|
|
7
7
|
id: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const SequenceContext: React.Context<SequenceContextType | null>;
|
|
10
|
+
declare type LayoutAndStyle = {
|
|
11
|
+
layout: 'none';
|
|
12
|
+
} | {
|
|
13
|
+
layout?: 'absolute-fill';
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
};
|
|
10
16
|
export declare type SequenceProps = {
|
|
11
17
|
children: React.ReactNode;
|
|
12
18
|
from: number;
|
|
13
19
|
durationInFrames?: number;
|
|
14
20
|
name?: string;
|
|
15
|
-
layout?: 'absolute-fill' | 'none';
|
|
16
21
|
showInTimeline?: boolean;
|
|
17
22
|
showLoopTimesInTimeline?: number;
|
|
18
|
-
};
|
|
23
|
+
} & LayoutAndStyle;
|
|
19
24
|
export declare const Sequence: React.FC<SequenceProps>;
|
|
25
|
+
export {};
|
package/dist/Sequence.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Sequence = exports.SequenceContext = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const AbsoluteFill_1 = require("./AbsoluteFill");
|
|
6
7
|
const CompositionManager_1 = require("./CompositionManager");
|
|
7
8
|
const get_timeline_clip_name_1 = require("./get-timeline-clip-name");
|
|
8
9
|
const nonce_1 = require("./nonce");
|
|
@@ -10,7 +11,8 @@ const timeline_position_state_1 = require("./timeline-position-state");
|
|
|
10
11
|
const use_current_frame_1 = require("./use-current-frame");
|
|
11
12
|
const use_unsafe_video_config_1 = require("./use-unsafe-video-config");
|
|
12
13
|
exports.SequenceContext = (0, react_1.createContext)(null);
|
|
13
|
-
const Sequence = ({ from, durationInFrames = Infinity, children, name,
|
|
14
|
+
const Sequence = ({ from, durationInFrames = Infinity, children, name, showInTimeline = true, showLoopTimesInTimeline, ...other }) => {
|
|
15
|
+
const { layout = 'absolute-fill' } = other;
|
|
14
16
|
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
15
17
|
const parentSequence = (0, react_1.useContext)(exports.SequenceContext);
|
|
16
18
|
const { rootId } = (0, react_1.useContext)(timeline_position_state_1.TimelineContext);
|
|
@@ -22,6 +24,10 @@ const Sequence = ({ from, durationInFrames = Infinity, children, name, layout =
|
|
|
22
24
|
if (layout !== 'absolute-fill' && layout !== 'none') {
|
|
23
25
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
24
26
|
}
|
|
27
|
+
// @ts-expect-error
|
|
28
|
+
if (layout === 'none' && typeof other.style !== 'undefined') {
|
|
29
|
+
throw new TypeError('If layout="none", you may not pass a style.');
|
|
30
|
+
}
|
|
25
31
|
if (typeof durationInFrames !== 'number') {
|
|
26
32
|
throw new TypeError(`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`);
|
|
27
33
|
}
|
|
@@ -109,15 +115,13 @@ const Sequence = ({ from, durationInFrames = Infinity, children, name, layout =
|
|
|
109
115
|
: absoluteFrame > endThreshold
|
|
110
116
|
? null
|
|
111
117
|
: children;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
right: 0,
|
|
121
|
-
}, children: content })) : (content) }));
|
|
118
|
+
const styleIfThere = other.layout === 'none' ? undefined : other.style;
|
|
119
|
+
const defaultStyle = (0, react_1.useMemo)(() => {
|
|
120
|
+
return {
|
|
121
|
+
flexDirection: undefined,
|
|
122
|
+
...(styleIfThere !== null && styleIfThere !== void 0 ? styleIfThere : {}),
|
|
123
|
+
};
|
|
124
|
+
}, [styleIfThere]);
|
|
125
|
+
return ((0, jsx_runtime_1.jsx)(exports.SequenceContext.Provider, { value: contextValue, children: content === null ? null : layout === 'absolute-fill' ? ((0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { style: defaultStyle, children: content })) : (content) }));
|
|
122
126
|
};
|
|
123
127
|
exports.Sequence = Sequence;
|
package/dist/audio/Audio.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import type { RemotionMainAudioProps } from './props';
|
|
|
3
3
|
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
|
-
} & RemotionMainAudioProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
6
|
+
} & RemotionMainAudioProps, "id" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "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" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -4,4 +4,4 @@ export declare const AudioForDevelopment: React.ForwardRefExoticComponent<Pick<O
|
|
|
4
4
|
playbackRate?: number | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
shouldPreMountAudioTags: boolean;
|
|
7
|
-
}, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
7
|
+
}, "id" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "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" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "shouldPreMountAudioTags"> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -46,6 +46,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
46
46
|
src: nativeProps.src,
|
|
47
47
|
mediaType: 'audio',
|
|
48
48
|
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
49
|
+
onlyWarnForMediaSeekingError: false,
|
|
49
50
|
});
|
|
50
51
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
51
52
|
return audioRef.current;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RemotionAudioProps } from './props';
|
|
3
|
-
export declare const AudioForRendering: React.ForwardRefExoticComponent<Pick<RemotionAudioProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
3
|
+
export declare const AudioForRendering: React.ForwardRefExoticComponent<Pick<RemotionAudioProps, "id" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "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" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key"> & React.RefAttributes<HTMLAudioElement>>;
|
package/dist/config/codec.d.ts
CHANGED
|
@@ -6,11 +6,10 @@ declare type LegacyFormat = typeof validLegacyFormats[number];
|
|
|
6
6
|
declare let codec: CodecOrUndefined;
|
|
7
7
|
export declare const getOutputCodecOrUndefined: () => CodecOrUndefined;
|
|
8
8
|
export declare const DEFAULT_CODEC: Codec;
|
|
9
|
-
export declare const getFinalOutputCodec: ({ codec: inputCodec, fileExtension, emitWarning,
|
|
9
|
+
export declare const getFinalOutputCodec: ({ codec: inputCodec, fileExtension, emitWarning, }: {
|
|
10
10
|
codec: CodecOrUndefined;
|
|
11
11
|
fileExtension: string | null;
|
|
12
12
|
emitWarning: boolean;
|
|
13
|
-
isLambda: boolean;
|
|
14
13
|
}) => Codec;
|
|
15
14
|
export declare const setOutputFormat: (newLegacyFormat: LegacyFormat) => void;
|
|
16
15
|
export declare const setCodec: (newCodec: CodecOrUndefined) => void;
|
package/dist/config/codec.js
CHANGED
|
@@ -19,8 +19,7 @@ const getOutputCodecOrUndefined = () => {
|
|
|
19
19
|
};
|
|
20
20
|
exports.getOutputCodecOrUndefined = getOutputCodecOrUndefined;
|
|
21
21
|
exports.DEFAULT_CODEC = 'h264';
|
|
22
|
-
const
|
|
23
|
-
const getFinalOutputCodec = ({ codec: inputCodec, fileExtension, emitWarning, isLambda, }) => {
|
|
22
|
+
const getFinalOutputCodec = ({ codec: inputCodec, fileExtension, emitWarning, }) => {
|
|
24
23
|
if (inputCodec === undefined && fileExtension === 'webm') {
|
|
25
24
|
if (emitWarning) {
|
|
26
25
|
console.info('You have specified a .webm extension, using the VP8 encoder. Use --codec=vp9 to use the Vp9 encoder.');
|
|
@@ -69,7 +68,7 @@ const getFinalOutputCodec = ({ codec: inputCodec, fileExtension, emitWarning, is
|
|
|
69
68
|
}
|
|
70
69
|
return 'h264-mkv';
|
|
71
70
|
}
|
|
72
|
-
return inputCodec !== null && inputCodec !== void 0 ? inputCodec :
|
|
71
|
+
return inputCodec !== null && inputCodec !== void 0 ? inputCodec : exports.DEFAULT_CODEC;
|
|
73
72
|
};
|
|
74
73
|
exports.getFinalOutputCodec = getFinalOutputCodec;
|
|
75
74
|
const setOutputFormat = (newLegacyFormat) => {
|
package/dist/config/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare const Config: {
|
|
|
44
44
|
*
|
|
45
45
|
* Set this to 'verbose' to get browser logs and other IO.
|
|
46
46
|
*/
|
|
47
|
-
readonly setLevel: (newLogLevel: "
|
|
47
|
+
readonly setLevel: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
48
48
|
};
|
|
49
49
|
readonly Puppeteer: {
|
|
50
50
|
/**
|
|
@@ -13,21 +13,19 @@ const warnOnceSSRImport = () => {
|
|
|
13
13
|
console.warn(" typeof window === 'undefined' ? {} : getInputProps()");
|
|
14
14
|
};
|
|
15
15
|
const getInputProps = () => {
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return {};
|
|
20
|
-
}
|
|
21
|
-
const param = window.remotion_inputProps;
|
|
22
|
-
if (!param) {
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
25
|
-
const parsed = JSON.parse(param);
|
|
26
|
-
return parsed;
|
|
16
|
+
if (typeof window === 'undefined') {
|
|
17
|
+
warnOnceSSRImport();
|
|
18
|
+
return {};
|
|
27
19
|
}
|
|
28
|
-
if ((0, get_environment_1.getRemotionEnvironment)() === '
|
|
29
|
-
|
|
20
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'player-development' ||
|
|
21
|
+
(0, get_environment_1.getRemotionEnvironment)() === 'player-production') {
|
|
22
|
+
throw new Error('You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.');
|
|
30
23
|
}
|
|
31
|
-
|
|
24
|
+
const param = window.remotion_inputProps;
|
|
25
|
+
if (!param) {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
const parsed = JSON.parse(param);
|
|
29
|
+
return parsed;
|
|
32
30
|
};
|
|
33
31
|
exports.getInputProps = getInputProps;
|
package/dist/config/log.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const logLevels: readonly ["verbose", "info", "warn", "error"];
|
|
2
2
|
export declare type LogLevel = typeof logLevels[number];
|
|
3
3
|
export declare const DEFAULT_LOG_LEVEL: LogLevel;
|
|
4
|
-
export declare const getLogLevel: () => "
|
|
4
|
+
export declare const getLogLevel: () => "verbose" | "info" | "warn" | "error";
|
|
5
5
|
export declare const setLogLevel: (newLogLevel: LogLevel) => void;
|
|
6
6
|
export declare const isValidLogLevel: (level: string) => boolean;
|
|
7
7
|
export declare const isEqualOrBelowLogLevel: (currentLevel: LogLevel, level: LogLevel) => boolean;
|
package/dist/internals.d.ts
CHANGED
|
@@ -59,11 +59,10 @@ export declare const Internals: {
|
|
|
59
59
|
getScale: () => number;
|
|
60
60
|
getShouldOutputImageSequence: (frameRange: import("./config/frame-range").FrameRange | null) => boolean;
|
|
61
61
|
validateSelectedCrfAndCodecCombination: (crf: unknown, codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv") => void;
|
|
62
|
-
getFinalOutputCodec: ({ codec: inputCodec, fileExtension, emitWarning,
|
|
62
|
+
getFinalOutputCodec: ({ codec: inputCodec, fileExtension, emitWarning, }: {
|
|
63
63
|
codec: import("./config/codec").CodecOrUndefined;
|
|
64
64
|
fileExtension: string | null;
|
|
65
65
|
emitWarning: boolean;
|
|
66
|
-
isLambda: boolean;
|
|
67
66
|
}) => "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv";
|
|
68
67
|
useMediaVolumeState: () => readonly [number, (u: number) => void];
|
|
69
68
|
useMediaMutedState: () => readonly [boolean, (u: import("react").SetStateAction<boolean>) => void];
|
package/dist/preload.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Preload = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const Sequence_1 = require("./Sequence");
|
|
7
|
+
const timeline_position_state_1 = require("./timeline-position-state");
|
|
8
|
+
const Preload = ({ for: preloadFor, children, }) => {
|
|
9
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
10
|
+
if (typeof preloadFor === 'undefined') {
|
|
11
|
+
throw new Error(`The <Preload /> component requires a 'for' prop, but none was passed.`);
|
|
12
|
+
}
|
|
13
|
+
if (typeof preloadFor !== 'number') {
|
|
14
|
+
throw new Error(`The 'for' prop of <Preload /> must be a number, but is of type ${typeof preloadFor}`);
|
|
15
|
+
}
|
|
16
|
+
if (Number.isNaN(preloadFor)) {
|
|
17
|
+
throw new Error(`The 'for' prop of <Preload /> must be a real number, but it is NaN.`);
|
|
18
|
+
}
|
|
19
|
+
if (!Number.isFinite(preloadFor)) {
|
|
20
|
+
throw new Error(`The 'for' prop of <Preload /> must be a finite number, but it is ${preloadFor}.`);
|
|
21
|
+
}
|
|
22
|
+
const context = (0, react_1.useContext)(timeline_position_state_1.TimelineContext);
|
|
23
|
+
const value = (0, react_1.useMemo)(() => {
|
|
24
|
+
const contextOffset = sequenceContext
|
|
25
|
+
? sequenceContext.cumulatedFrom + sequenceContext.relativeFrom
|
|
26
|
+
: 0;
|
|
27
|
+
const currentFrame = context.frame - contextOffset;
|
|
28
|
+
return {
|
|
29
|
+
...context,
|
|
30
|
+
playing: currentFrame < preloadFor ? false : context.playing,
|
|
31
|
+
imperativePlaying: {
|
|
32
|
+
current: currentFrame < preloadFor ? false : context.imperativePlaying.current,
|
|
33
|
+
},
|
|
34
|
+
frame: Math.max(0, currentFrame - preloadFor) + contextOffset,
|
|
35
|
+
};
|
|
36
|
+
}, [context, preloadFor, sequenceContext]);
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(timeline_position_state_1.TimelineContext.Provider, { value: value, children: children }));
|
|
38
|
+
};
|
|
39
|
+
exports.Preload = Preload;
|
package/dist/spring/index.d.ts
CHANGED
|
@@ -9,15 +9,19 @@ import type { SpringConfig } from './spring-utils';
|
|
|
9
9
|
* @param {number} [config.damping=10] How hard the animation decelerates.
|
|
10
10
|
* @param {number} [config.stiffness=100] Affects bounciness of the animation.
|
|
11
11
|
* @param {boolean} [config.overshootClamping=false] Whether to prevent the animation going beyond the target value.
|
|
12
|
-
* @param {?number} from The initial value of the animation. Default `0`
|
|
13
|
-
* @param {?number} to The end value of the animation. Default `1`
|
|
12
|
+
* @param {?number} [config.from] The initial value of the animation. Default `0`
|
|
13
|
+
* @param {?number} [config.to] The end value of the animation. Default `1`
|
|
14
|
+
* @param {?number} [config.durationInFrames] Stretch the duration of an animation to a set value.. Default `undefined`
|
|
15
|
+
* @param {?number} [config.durationThreshold] How close to the end the animation is considered to be done. Default `0.005`
|
|
14
16
|
*/
|
|
15
|
-
export declare function spring({ frame, fps, config, from, to, }: {
|
|
17
|
+
export declare function spring({ frame, fps, config, from, to, durationInFrames, durationRestThreshold, }: {
|
|
16
18
|
frame: number;
|
|
17
19
|
fps: number;
|
|
18
20
|
config?: Partial<SpringConfig>;
|
|
19
21
|
from?: number;
|
|
20
22
|
to?: number;
|
|
23
|
+
durationInFrames?: number;
|
|
24
|
+
durationRestThreshold?: number;
|
|
21
25
|
}): number;
|
|
22
26
|
export { measureSpring } from './measure-spring';
|
|
23
27
|
export { SpringConfig } from './spring-utils';
|
package/dist/spring/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.measureSpring = exports.spring = void 0;
|
|
4
|
+
const validation_spring_duration_1 = require("../validation/validation-spring-duration");
|
|
5
|
+
const measure_spring_1 = require("./measure-spring");
|
|
4
6
|
const spring_utils_1 = require("./spring-utils");
|
|
5
7
|
/**
|
|
6
8
|
* Calculates a position based on physical parameters, start and end value, and time.
|
|
@@ -12,13 +14,26 @@ const spring_utils_1 = require("./spring-utils");
|
|
|
12
14
|
* @param {number} [config.damping=10] How hard the animation decelerates.
|
|
13
15
|
* @param {number} [config.stiffness=100] Affects bounciness of the animation.
|
|
14
16
|
* @param {boolean} [config.overshootClamping=false] Whether to prevent the animation going beyond the target value.
|
|
15
|
-
* @param {?number} from The initial value of the animation. Default `0`
|
|
16
|
-
* @param {?number} to The end value of the animation. Default `1`
|
|
17
|
+
* @param {?number} [config.from] The initial value of the animation. Default `0`
|
|
18
|
+
* @param {?number} [config.to] The end value of the animation. Default `1`
|
|
19
|
+
* @param {?number} [config.durationInFrames] Stretch the duration of an animation to a set value.. Default `undefined`
|
|
20
|
+
* @param {?number} [config.durationThreshold] How close to the end the animation is considered to be done. Default `0.005`
|
|
17
21
|
*/
|
|
18
|
-
function spring({ frame, fps, config = {}, from = 0, to = 1, }) {
|
|
22
|
+
function spring({ frame, fps, config = {}, from = 0, to = 1, durationInFrames, durationRestThreshold, }) {
|
|
23
|
+
(0, validation_spring_duration_1.validateSpringDuration)(durationInFrames);
|
|
24
|
+
const durationRatio = durationInFrames === undefined
|
|
25
|
+
? 1
|
|
26
|
+
: durationInFrames /
|
|
27
|
+
(0, measure_spring_1.measureSpring)({
|
|
28
|
+
fps,
|
|
29
|
+
config,
|
|
30
|
+
from,
|
|
31
|
+
to,
|
|
32
|
+
threshold: durationRestThreshold,
|
|
33
|
+
});
|
|
19
34
|
const spr = (0, spring_utils_1.springCalculation)({
|
|
20
35
|
fps,
|
|
21
|
-
frame,
|
|
36
|
+
frame: frame / durationRatio,
|
|
22
37
|
config,
|
|
23
38
|
from,
|
|
24
39
|
to,
|
|
@@ -32,5 +47,5 @@ function spring({ frame, fps, config = {}, from = 0, to = 1, }) {
|
|
|
32
47
|
return Math.max(spr.current, to);
|
|
33
48
|
}
|
|
34
49
|
exports.spring = spring;
|
|
35
|
-
var
|
|
36
|
-
Object.defineProperty(exports, "measureSpring", { enumerable: true, get: function () { return
|
|
50
|
+
var measure_spring_2 = require("./measure-spring");
|
|
51
|
+
Object.defineProperty(exports, "measureSpring", { enumerable: true, get: function () { return measure_spring_2.measureSpring; } });
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
|
-
export declare const useMediaPlayback: ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, }: {
|
|
2
|
+
export declare const useMediaPlayback: ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, onlyWarnForMediaSeekingError, }: {
|
|
3
3
|
mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>;
|
|
4
4
|
src: string | undefined;
|
|
5
5
|
mediaType: 'audio' | 'video';
|
|
6
6
|
playbackRate: number;
|
|
7
|
+
onlyWarnForMediaSeekingError: boolean;
|
|
7
8
|
}) => void;
|
|
@@ -9,7 +9,7 @@ const use_current_frame_1 = require("./use-current-frame");
|
|
|
9
9
|
const use_video_config_1 = require("./use-video-config");
|
|
10
10
|
const get_current_time_1 = require("./video/get-current-time");
|
|
11
11
|
const warn_about_non_seekable_media_1 = require("./warn-about-non-seekable-media");
|
|
12
|
-
const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, }) => {
|
|
12
|
+
const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, onlyWarnForMediaSeekingError, }) => {
|
|
13
13
|
const { playbackRate: globalPlaybackRate } = (0, react_1.useContext)(timeline_position_state_1.TimelineContext);
|
|
14
14
|
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
15
15
|
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
@@ -46,7 +46,9 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
|
|
|
46
46
|
// If scrubbing around, adjust timing
|
|
47
47
|
// or if time shift is bigger than 0.2sec
|
|
48
48
|
mediaRef.current.currentTime = shouldBeTime;
|
|
49
|
-
|
|
49
|
+
if (!onlyWarnForMediaSeekingError) {
|
|
50
|
+
(0, warn_about_non_seekable_media_1.warnAboutNonSeekableMedia)(mediaRef.current, onlyWarnForMediaSeekingError ? 'console-warning' : 'console-error');
|
|
51
|
+
}
|
|
50
52
|
}
|
|
51
53
|
if (!playing || absoluteFrame === 0) {
|
|
52
54
|
mediaRef.current.currentTime = shouldBeTime;
|
|
@@ -67,6 +69,7 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
|
|
|
67
69
|
src,
|
|
68
70
|
mediaStartsAt,
|
|
69
71
|
localPlaybackRate,
|
|
72
|
+
onlyWarnForMediaSeekingError,
|
|
70
73
|
]);
|
|
71
74
|
};
|
|
72
75
|
exports.useMediaPlayback = useMediaPlayback;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateSpringDuration: (dur: unknown) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSpringDuration = void 0;
|
|
4
|
+
const validateSpringDuration = (dur) => {
|
|
5
|
+
if (typeof dur === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (typeof dur !== 'number') {
|
|
9
|
+
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
|
|
10
|
+
}
|
|
11
|
+
if (Number.isNaN(dur)) {
|
|
12
|
+
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
|
|
13
|
+
}
|
|
14
|
+
if (!Number.isFinite(dur)) {
|
|
15
|
+
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
|
|
16
|
+
}
|
|
17
|
+
if (dur <= 0) {
|
|
18
|
+
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.validateSpringDuration = validateSpringDuration;
|
|
@@ -22,6 +22,6 @@ const OffthreadVideo = (props) => {
|
|
|
22
22
|
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
23
23
|
return (0, jsx_runtime_1.jsx)(OffthreadVideoForRendering_1.OffthreadVideoForRendering, { ...otherProps });
|
|
24
24
|
}
|
|
25
|
-
return (0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { ...otherProps });
|
|
25
|
+
return (0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { onlyWarnForMediaSeekingError: true, ...otherProps });
|
|
26
26
|
};
|
|
27
27
|
exports.OffthreadVideo = OffthreadVideo;
|
package/dist/video/Video.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import type { RemotionMainVideoProps } from './props';
|
|
|
3
3
|
export declare const Video: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
|
-
} & RemotionMainVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
6
|
+
} & RemotionMainVideoProps, "id" | "height" | "width" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "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" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | keyof RemotionMainVideoProps> & React.RefAttributes<HTMLVideoElement>>;
|
package/dist/video/Video.js
CHANGED
|
@@ -24,6 +24,6 @@ const VideoForwardingFunction = (props, ref) => {
|
|
|
24
24
|
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
25
25
|
return (0, jsx_runtime_1.jsx)(VideoForRendering_1.VideoForRendering, { ...otherProps, ref: ref });
|
|
26
26
|
}
|
|
27
|
-
return (0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { ...otherProps, ref: ref });
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref }));
|
|
28
28
|
};
|
|
29
29
|
exports.Video = (0, react_1.forwardRef)(VideoForwardingFunction);
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
3
|
+
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
4
|
+
playbackRate?: number | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
onlyWarnForMediaSeekingError: boolean;
|
|
7
|
+
}, "id" | "height" | "width" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "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" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | "onlyWarnForMediaSeekingError"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -13,7 +13,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
13
13
|
var _a;
|
|
14
14
|
const videoRef = (0, react_1.useRef)(null);
|
|
15
15
|
const volumePropFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
16
|
-
const { volume, muted, playbackRate, ...nativeProps } = props;
|
|
16
|
+
const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, ...nativeProps } = props;
|
|
17
17
|
const actualVolume = (0, use_media_tag_volume_1.useMediaTagVolume)(videoRef);
|
|
18
18
|
const [mediaVolume] = (0, volume_position_state_1.useMediaVolumeState)();
|
|
19
19
|
const [mediaMuted] = (0, volume_position_state_1.useMediaMutedState)();
|
|
@@ -36,6 +36,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
36
36
|
src: nativeProps.src,
|
|
37
37
|
mediaType: 'video',
|
|
38
38
|
playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
|
|
39
|
+
onlyWarnForMediaSeekingError,
|
|
39
40
|
});
|
|
40
41
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
41
42
|
return videoRef.current;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RemotionVideoProps } from './props';
|
|
3
|
-
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
3
|
+
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "id" | "height" | "width" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "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" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -13,6 +13,7 @@ const Sequence_1 = require("../Sequence");
|
|
|
13
13
|
const use_current_frame_1 = require("../use-current-frame");
|
|
14
14
|
const use_unsafe_video_config_1 = require("../use-unsafe-video-config");
|
|
15
15
|
const volume_prop_1 = require("../volume-prop");
|
|
16
|
+
const warn_about_non_seekable_media_1 = require("../warn-about-non-seekable-media");
|
|
16
17
|
const get_current_time_1 = require("./get-current-time");
|
|
17
18
|
const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbackRate, ...props }, ref) => {
|
|
18
19
|
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
@@ -104,6 +105,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
104
105
|
}
|
|
105
106
|
videoRef.current.currentTime = currentTime;
|
|
106
107
|
videoRef.current.addEventListener('seeked', () => {
|
|
108
|
+
(0, warn_about_non_seekable_media_1.warnAboutNonSeekableMedia)(videoRef.current, 'exception');
|
|
107
109
|
if (window.navigator.platform.startsWith('Mac')) {
|
|
108
110
|
// Improve me: This is ensures frame perfectness but slows down render.
|
|
109
111
|
// Please see this issue for context: https://github.com/remotion-dev/remotion/issues/200
|
|
@@ -126,7 +128,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
126
128
|
throw new Error(`The browser threw an error while playing the video: ${(_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.error) === null || _d === void 0 ? void 0 : _d.message}`);
|
|
127
129
|
}
|
|
128
130
|
else {
|
|
129
|
-
throw new Error('The browser threw an
|
|
131
|
+
throw new Error('The browser threw an error');
|
|
130
132
|
}
|
|
131
133
|
}, { once: true });
|
|
132
134
|
// If video skips to another frame or unmounts, we clear the created handle
|
package/dist/volume-prop.js
CHANGED
|
@@ -18,6 +18,6 @@ const evaluateVolume = ({ frame, volume, mediaVolume = 1, }) => {
|
|
|
18
18
|
if (!Number.isFinite(evaluated)) {
|
|
19
19
|
throw new TypeError(`You passed in a function to the volume prop but it returned a non-finite number for frame ${frame}.`);
|
|
20
20
|
}
|
|
21
|
-
return Math.min(1, evaluated);
|
|
21
|
+
return Math.max(0, Math.min(1, evaluated));
|
|
22
22
|
};
|
|
23
23
|
exports.evaluateVolume = evaluateVolume;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const warnAboutNonSeekableMedia: (ref: HTMLMediaElement) => void;
|
|
1
|
+
export declare const warnAboutNonSeekableMedia: (ref: HTMLMediaElement, type: 'console-warning' | 'console-error' | 'exception') => void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.warnAboutNonSeekableMedia = void 0;
|
|
4
4
|
const alreadyWarned = {};
|
|
5
|
-
const warnAboutNonSeekableMedia = (ref) => {
|
|
5
|
+
const warnAboutNonSeekableMedia = (ref, type) => {
|
|
6
6
|
// Media is not loaded yet, but this does not yet mean something is wrong with the media
|
|
7
7
|
if (ref.seekable.length === 0) {
|
|
8
8
|
return;
|
|
@@ -15,7 +15,16 @@ const warnAboutNonSeekableMedia = (ref) => {
|
|
|
15
15
|
}
|
|
16
16
|
const range = { start: ref.seekable.start(0), end: ref.seekable.end(0) };
|
|
17
17
|
if (range.start === 0 && range.end === 0) {
|
|
18
|
-
|
|
18
|
+
const msg = `The media does not support seeking. Remotion cannot properly render it. Please see https://remotion.dev/docs/non-seekable-media for assistance. Source: ${ref.src}`;
|
|
19
|
+
if (type === 'console-error') {
|
|
20
|
+
console.error(msg);
|
|
21
|
+
}
|
|
22
|
+
else if (type === 'console-warning') {
|
|
23
|
+
console.warn(`The media ${ref.src} does not support seeking. The video will render fine, but may not play correctly in preview and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
throw new Error(msg);
|
|
27
|
+
}
|
|
19
28
|
alreadyWarned[ref.src] = true;
|
|
20
29
|
}
|
|
21
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.27",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "16f54241ee403a938c1af372bebc4ac83a4a24f0"
|
|
59
59
|
}
|