remotion 3.1.8 → 3.2.0
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 +2 -2
- package/dist/audio/Audio.d.ts +2 -2
- package/dist/audio/Audio.js +1 -1
- package/dist/audio/AudioForDevelopment.d.ts +2 -2
- package/dist/audio/AudioForRendering.d.ts +1 -1
- package/dist/internals.d.ts +1 -0
- package/dist/static-file.js +6 -0
- package/dist/video/Video.d.ts +2 -2
- package/dist/video/VideoForDevelopment.d.ts +2 -2
- package/dist/video/VideoForDevelopment.js +20 -0
- package/dist/video/VideoForRendering.d.ts +1 -1
- package/dist/video/VideoForRendering.js +28 -18
- package/package.json +2 -2
- package/dist/audio/is-in-strict-mode.d.ts +0 -1
- package/dist/audio/is-in-strict-mode.js +0 -12
- package/dist/compress-assets.d.ts +0 -7
- package/dist/compress-assets.js +0 -25
- package/dist/config/browser-executable.d.ts +0 -3
- package/dist/config/browser-executable.js +0 -12
- package/dist/config/browser.d.ts +0 -4
- package/dist/config/browser.js +0 -19
- package/dist/config/bundle-out-dir.d.ts +0 -2
- package/dist/config/bundle-out-dir.js +0 -12
- package/dist/config/chromium-flags.d.ts +0 -10
- package/dist/config/chromium-flags.js +0 -34
- package/dist/config/codec.d.ts +0 -16
- package/dist/config/codec.js +0 -109
- package/dist/config/concurrency.d.ts +0 -3
- package/dist/config/concurrency.js +0 -12
- package/dist/config/crf.d.ts +0 -9
- package/dist/config/crf.js +0 -83
- package/dist/config/env-file.d.ts +0 -2
- package/dist/config/env-file.js +0 -10
- package/dist/config/every-nth-file.d.ts +0 -2
- package/dist/config/every-nth-file.js +0 -12
- package/dist/config/every-nth-frame.d.ts +0 -3
- package/dist/config/every-nth-frame.js +0 -20
- package/dist/config/ffmpeg-executable.d.ts +0 -5
- package/dist/config/ffmpeg-executable.js +0 -21
- package/dist/config/frame-range.d.ts +0 -5
- package/dist/config/frame-range.js +0 -80
- package/dist/config/image-format.d.ts +0 -8
- package/dist/config/image-format.js +0 -37
- package/dist/config/image-sequence.d.ts +0 -3
- package/dist/config/image-sequence.js +0 -15
- package/dist/config/index.d.ts +0 -182
- package/dist/config/index.js +0 -198
- package/dist/config/log.d.ts +0 -7
- package/dist/config/log.js +0 -25
- package/dist/config/loop.d.ts +0 -4
- package/dist/config/loop.js +0 -18
- package/dist/config/max-timeline-tracks.d.ts +0 -2
- package/dist/config/max-timeline-tracks.js +0 -24
- package/dist/config/number-of-gif-loops.d.ts +0 -4
- package/dist/config/number-of-gif-loops.js +0 -21
- package/dist/config/output-location.d.ts +0 -2
- package/dist/config/output-location.js +0 -16
- package/dist/config/override-webpack.d.ts +0 -6
- package/dist/config/override-webpack.js +0 -14
- package/dist/config/overwrite.d.ts +0 -3
- package/dist/config/overwrite.js +0 -14
- package/dist/config/pixel-format.d.ts +0 -8
- package/dist/config/pixel-format.js +0 -38
- package/dist/config/preview-server.d.ts +0 -2
- package/dist/config/preview-server.js +0 -20
- package/dist/config/prores-profile.d.ts +0 -7
- package/dist/config/prores-profile.js +0 -32
- package/dist/config/public-path.d.ts +0 -2
- package/dist/config/public-path.js +0 -12
- package/dist/config/quality.d.ts +0 -2
- package/dist/config/quality.js +0 -17
- package/dist/config/scale.d.ts +0 -3
- package/dist/config/scale.js +0 -15
- package/dist/config/skip-n-frames.d.ts +0 -2
- package/dist/config/skip-n-frames.js +0 -12
- package/dist/config/still-frame.d.ts +0 -2
- package/dist/config/still-frame.js +0 -12
- package/dist/config/timeout.d.ts +0 -2
- package/dist/config/timeout.js +0 -17
- package/dist/config/webpack-caching.d.ts +0 -3
- package/dist/config/webpack-caching.js +0 -16
- package/dist/feature-flags.d.ts +0 -1
- package/dist/feature-flags.js +0 -7
- package/dist/initial-frame.d.ts +0 -2
- package/dist/initial-frame.js +0 -12
- package/dist/interpolateColors.d.ts +0 -5
- package/dist/interpolateColors.js +0 -401
- package/dist/is-audio-codec.d.ts +0 -2
- package/dist/is-audio-codec.js +0 -7
- package/dist/perf/index.d.ts +0 -5
- package/dist/perf/index.js +0 -35
- package/dist/preload.d.ts +0 -7
- package/dist/preload.js +0 -39
- package/dist/sequencing/index.d.ts +0 -19
- package/dist/sequencing/index.js +0 -123
- package/dist/timeline-inout-position-state.d.ts +0 -12
- package/dist/timeline-inout-position-state.js +0 -23
- package/dist/timeout.d.ts +0 -2
- package/dist/timeout.js +0 -12
- package/dist/use-frame.d.ts +0 -7
- package/dist/use-frame.js +0 -25
- package/dist/validation/validate-every-nth-frame.d.ts +0 -1
- package/dist/validation/validate-every-nth-frame.js +0 -21
- package/dist/validation/validate-frame.d.ts +0 -1
- package/dist/validation/validate-frame.js +0 -24
- package/dist/validation/validate-image-format.d.ts +0 -2
- package/dist/validation/validate-image-format.js +0 -9
- package/dist/validation/validate-opengl-renderer.d.ts +0 -4
- package/dist/validation/validate-opengl-renderer.js +0 -14
- package/dist/validation/validate-quality.d.ts +0 -1
- package/dist/validation/validate-quality.js +0 -21
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[32mremotion:build: [0mcache hit, replaying output [
|
|
1
|
+
[32mremotion:build: [0mcache hit, replaying output [2m65e75aca5e26c42d[0m
|
|
2
2
|
[32mremotion:build: [0m
|
|
3
|
-
[32mremotion:build: [0m> remotion@3.1.
|
|
3
|
+
[32mremotion:build: [0m> remotion@3.1.11 build /Users/jonathanburger/remotion/packages/core
|
|
4
4
|
[32mremotion:build: [0m> tsc -d
|
|
5
5
|
[32mremotion:build: [0m
|
package/dist/audio/Audio.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RemotionMainAudioProps } from './props';
|
|
3
|
-
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "
|
|
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, "
|
|
6
|
+
} & RemotionMainAudioProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "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>>;
|
package/dist/audio/Audio.js
CHANGED
|
@@ -15,7 +15,7 @@ const AudioRefForwardingFunction = (props, ref) => {
|
|
|
15
15
|
const { startFrom, endAt, ...otherProps } = props;
|
|
16
16
|
const onError = (0, react_1.useCallback)((e) => {
|
|
17
17
|
console.log(e.currentTarget.error);
|
|
18
|
-
throw new Error(`Could not play audio with src ${otherProps.src}: ${e.currentTarget.error}
|
|
18
|
+
throw new Error(`Could not play audio with src ${otherProps.src}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`);
|
|
19
19
|
}, [otherProps.src]);
|
|
20
20
|
if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
|
|
21
21
|
(0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const AudioForDevelopment: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "
|
|
2
|
+
export declare const AudioForDevelopment: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
3
3
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
4
4
|
playbackRate?: number | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
shouldPreMountAudioTags: boolean;
|
|
7
|
-
}, "
|
|
7
|
+
}, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "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>>;
|
|
@@ -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, "
|
|
3
|
+
export declare const AudioForRendering: React.ForwardRefExoticComponent<Pick<RemotionAudioProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "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/internals.d.ts
CHANGED
package/dist/static-file.js
CHANGED
|
@@ -14,6 +14,12 @@ const inner = (path) => {
|
|
|
14
14
|
return `/${trimLeadingSlash(path)}`;
|
|
15
15
|
};
|
|
16
16
|
const staticFile = (path) => {
|
|
17
|
+
if (path.startsWith('http://') || path.startsWith('https://')) {
|
|
18
|
+
throw new TypeError(`staticFile() does not support remote URLs - got "${path}". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);
|
|
19
|
+
}
|
|
20
|
+
if (path.startsWith('..') || path.startsWith('./')) {
|
|
21
|
+
throw new TypeError(`staticFile() does not support relative paths - got "${path}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);
|
|
22
|
+
}
|
|
17
23
|
const preparsed = inner(path);
|
|
18
24
|
if (!preparsed.startsWith('/')) {
|
|
19
25
|
return `/${preparsed}`;
|
package/dist/video/Video.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RemotionMainVideoProps } from './props';
|
|
3
|
-
export declare const Video: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "
|
|
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, "
|
|
6
|
+
} & RemotionMainVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "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" | "height" | "width" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | keyof RemotionMainVideoProps> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "
|
|
2
|
+
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
3
3
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
4
4
|
playbackRate?: number | undefined;
|
|
5
5
|
} & {
|
|
6
6
|
onlyWarnForMediaSeekingError: boolean;
|
|
7
|
-
}, "
|
|
7
|
+
}, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "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" | "height" | "width" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | "onlyWarnForMediaSeekingError"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -41,6 +41,26 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
41
41
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
42
42
|
return videoRef.current;
|
|
43
43
|
});
|
|
44
|
+
(0, react_1.useEffect)(() => {
|
|
45
|
+
const { current } = videoRef;
|
|
46
|
+
if (!current) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const errorHandler = () => {
|
|
50
|
+
var _a;
|
|
51
|
+
if (current === null || current === void 0 ? void 0 : current.error) {
|
|
52
|
+
console.error('Error occurred in video', current === null || current === void 0 ? void 0 : current.error);
|
|
53
|
+
throw new Error(`The browser threw an error while playing the video: Code ${current.error.code} - ${(_a = current === null || current === void 0 ? void 0 : current.error) === null || _a === void 0 ? void 0 : _a.message}. See https://remotion.dev/docs/media-playback-error for help`);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
throw new Error('The browser threw an error');
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
current.addEventListener('error', errorHandler, { once: true });
|
|
60
|
+
return () => {
|
|
61
|
+
current.removeEventListener('error', errorHandler);
|
|
62
|
+
};
|
|
63
|
+
}, []);
|
|
44
64
|
return ((0, jsx_runtime_1.jsx)("video", { ref: videoRef, muted: muted || mediaMuted, playsInline: true, ...nativeProps }));
|
|
45
65
|
};
|
|
46
66
|
exports.VideoForDevelopment = (0, react_1.forwardRef)(VideoForDevelopmentRefForwardingFunction);
|
|
@@ -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, "
|
|
3
|
+
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "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" | "height" | "width" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -76,7 +76,8 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
76
76
|
return videoRef.current;
|
|
77
77
|
});
|
|
78
78
|
(0, react_1.useEffect)(() => {
|
|
79
|
-
|
|
79
|
+
const { current } = videoRef;
|
|
80
|
+
if (!current) {
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
83
|
const currentTime = (() => {
|
|
@@ -94,19 +95,22 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
94
95
|
(0, delay_render_1.continueRender)(handle);
|
|
95
96
|
return;
|
|
96
97
|
}
|
|
97
|
-
if ((0, is_approximately_the_same_1.isApproximatelyTheSame)(
|
|
98
|
-
if (
|
|
98
|
+
if ((0, is_approximately_the_same_1.isApproximatelyTheSame)(current.currentTime, currentTime)) {
|
|
99
|
+
if (current.readyState >= 2) {
|
|
99
100
|
(0, delay_render_1.continueRender)(handle);
|
|
100
101
|
return;
|
|
101
102
|
}
|
|
102
|
-
|
|
103
|
+
const loadedDataHandler = () => {
|
|
103
104
|
(0, delay_render_1.continueRender)(handle);
|
|
104
|
-
}
|
|
105
|
-
|
|
105
|
+
};
|
|
106
|
+
current.addEventListener('loadeddata', loadedDataHandler, { once: true });
|
|
107
|
+
return () => {
|
|
108
|
+
current.removeEventListener('loadeddata', loadedDataHandler);
|
|
109
|
+
};
|
|
106
110
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
(0, warn_about_non_seekable_media_1.warnAboutNonSeekableMedia)(
|
|
111
|
+
current.currentTime = currentTime;
|
|
112
|
+
const seekedHandler = () => {
|
|
113
|
+
(0, warn_about_non_seekable_media_1.warnAboutNonSeekableMedia)(current, 'exception');
|
|
110
114
|
if (window.navigator.platform.startsWith('Mac')) {
|
|
111
115
|
// Improve me: This is ensures frame perfectness but slows down render.
|
|
112
116
|
// Please see this issue for context: https://github.com/remotion-dev/remotion/issues/200
|
|
@@ -118,22 +122,28 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
118
122
|
else {
|
|
119
123
|
(0, delay_render_1.continueRender)(handle);
|
|
120
124
|
}
|
|
121
|
-
}
|
|
122
|
-
|
|
125
|
+
};
|
|
126
|
+
current.addEventListener('seeked', seekedHandler, { once: true });
|
|
127
|
+
const endedHandler = () => {
|
|
123
128
|
(0, delay_render_1.continueRender)(handle);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
};
|
|
130
|
+
current.addEventListener('ended', endedHandler, { once: true });
|
|
131
|
+
const errorHandler = () => {
|
|
132
|
+
var _a;
|
|
133
|
+
if (current === null || current === void 0 ? void 0 : current.error) {
|
|
134
|
+
console.error('Error occurred in video', current === null || current === void 0 ? void 0 : current.error);
|
|
135
|
+
throw new Error(`The browser threw an error while playing the video: Code ${current.error.code} - ${(_a = current === null || current === void 0 ? void 0 : current.error) === null || _a === void 0 ? void 0 : _a.message}. See https://remotion.dev/docs/media-playback-error for help`);
|
|
130
136
|
}
|
|
131
137
|
else {
|
|
132
138
|
throw new Error('The browser threw an error');
|
|
133
139
|
}
|
|
134
|
-
}
|
|
140
|
+
};
|
|
141
|
+
current.addEventListener('error', errorHandler, { once: true });
|
|
135
142
|
// If video skips to another frame or unmounts, we clear the created handle
|
|
136
143
|
return () => {
|
|
144
|
+
current.removeEventListener('ended', endedHandler);
|
|
145
|
+
current.removeEventListener('error', errorHandler);
|
|
146
|
+
current.removeEventListener('seeked', seekedHandler);
|
|
137
147
|
(0, delay_render_1.continueRender)(handle);
|
|
138
148
|
};
|
|
139
149
|
}, [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "47b188161a9e922a247eaa998e72d37af9137707"
|
|
58
58
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useIsInStrictMode: () => void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useIsInStrictMode = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const useIsInStrictMode = () => {
|
|
6
|
-
const state = (0, react_1.useRef)(1);
|
|
7
|
-
(0, react_1.useState)(() => {
|
|
8
|
-
state.current++;
|
|
9
|
-
});
|
|
10
|
-
console.log(state);
|
|
11
|
-
};
|
|
12
|
-
exports.useIsInStrictMode = useIsInStrictMode;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TAsset } from './CompositionManager';
|
|
2
|
-
/**
|
|
3
|
-
* Since audio or video can be base64-encoded, those can be really long strings.
|
|
4
|
-
* Since we track the `src` property for every frame, Node.JS can run out of memory easily. Instead of duplicating the src for every frame, we save memory by replacing the full base 64 encoded data with a string `same-as-[asset-id]-[frame]` referencing a previous asset with the same src.
|
|
5
|
-
*/
|
|
6
|
-
export declare const compressAsset: (previousAssets: TAsset[], newAsset: TAsset) => TAsset;
|
|
7
|
-
export declare const isAssetCompressed: (src: string) => boolean;
|
package/dist/compress-assets.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAssetCompressed = exports.compressAsset = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Since audio or video can be base64-encoded, those can be really long strings.
|
|
6
|
-
* Since we track the `src` property for every frame, Node.JS can run out of memory easily. Instead of duplicating the src for every frame, we save memory by replacing the full base 64 encoded data with a string `same-as-[asset-id]-[frame]` referencing a previous asset with the same src.
|
|
7
|
-
*/
|
|
8
|
-
const compressAsset = (previousAssets, newAsset) => {
|
|
9
|
-
if (newAsset.src.length < 400) {
|
|
10
|
-
return newAsset;
|
|
11
|
-
}
|
|
12
|
-
const assetWithSameSrc = previousAssets.find((a) => a.src === newAsset.src);
|
|
13
|
-
if (!assetWithSameSrc) {
|
|
14
|
-
return newAsset;
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
...newAsset,
|
|
18
|
-
src: `same-as-${assetWithSameSrc.id}-${assetWithSameSrc.frame}`,
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
exports.compressAsset = compressAsset;
|
|
22
|
-
const isAssetCompressed = (src) => {
|
|
23
|
-
return src.startsWith('same-as');
|
|
24
|
-
};
|
|
25
|
-
exports.isAssetCompressed = isAssetCompressed;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBrowserExecutable = exports.setBrowserExecutable = void 0;
|
|
4
|
-
let currentBrowserExecutablePath = null;
|
|
5
|
-
const setBrowserExecutable = (newBrowserExecutablePath) => {
|
|
6
|
-
currentBrowserExecutablePath = newBrowserExecutablePath;
|
|
7
|
-
};
|
|
8
|
-
exports.setBrowserExecutable = setBrowserExecutable;
|
|
9
|
-
const getBrowserExecutable = () => {
|
|
10
|
-
return currentBrowserExecutablePath;
|
|
11
|
-
};
|
|
12
|
-
exports.getBrowserExecutable = getBrowserExecutable;
|
package/dist/config/browser.d.ts
DELETED
package/dist/config/browser.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBrowser = exports.setBrowser = exports.DEFAULT_BROWSER = void 0;
|
|
4
|
-
exports.DEFAULT_BROWSER = 'chrome';
|
|
5
|
-
let currentBrowser = null;
|
|
6
|
-
const setBrowser = (browser) => {
|
|
7
|
-
if (browser === 'chrome') {
|
|
8
|
-
process.env.PUPPETEER_PRODUCT = 'chrome';
|
|
9
|
-
}
|
|
10
|
-
if (browser === 'firefox') {
|
|
11
|
-
process.env.PUPPETEER_PRODUCT = 'firefox';
|
|
12
|
-
}
|
|
13
|
-
currentBrowser = browser;
|
|
14
|
-
};
|
|
15
|
-
exports.setBrowser = setBrowser;
|
|
16
|
-
const getBrowser = () => {
|
|
17
|
-
return currentBrowser;
|
|
18
|
-
};
|
|
19
|
-
exports.getBrowser = getBrowser;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setBundleOutDir = exports.getBundleOutDir = void 0;
|
|
4
|
-
let bundleOutDir = null;
|
|
5
|
-
const getBundleOutDir = () => {
|
|
6
|
-
return bundleOutDir;
|
|
7
|
-
};
|
|
8
|
-
exports.getBundleOutDir = getBundleOutDir;
|
|
9
|
-
const setBundleOutDir = (path) => {
|
|
10
|
-
bundleOutDir = path;
|
|
11
|
-
};
|
|
12
|
-
exports.setBundleOutDir = setBundleOutDir;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { OpenGlRenderer } from '../validation/validate-opengl-renderer';
|
|
2
|
-
export declare const DEFAULT_OPENGL_RENDERER: OpenGlRenderer | null;
|
|
3
|
-
export declare const getChromiumDisableWebSecurity: () => boolean;
|
|
4
|
-
export declare const setChromiumDisableWebSecurity: (should: boolean) => void;
|
|
5
|
-
export declare const getIgnoreCertificateErrors: () => boolean;
|
|
6
|
-
export declare const setChromiumIgnoreCertificateErrors: (should: boolean) => void;
|
|
7
|
-
export declare const getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
8
|
-
export declare const setChromiumOpenGlRenderer: (renderer: OpenGlRenderer) => void;
|
|
9
|
-
export declare const getChromiumHeadlessMode: () => boolean;
|
|
10
|
-
export declare const setChromiumHeadlessMode: (should: boolean) => void;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setChromiumHeadlessMode = exports.getChromiumHeadlessMode = exports.setChromiumOpenGlRenderer = exports.getChromiumOpenGlRenderer = exports.setChromiumIgnoreCertificateErrors = exports.getIgnoreCertificateErrors = exports.setChromiumDisableWebSecurity = exports.getChromiumDisableWebSecurity = exports.DEFAULT_OPENGL_RENDERER = void 0;
|
|
4
|
-
const validate_opengl_renderer_1 = require("../validation/validate-opengl-renderer");
|
|
5
|
-
exports.DEFAULT_OPENGL_RENDERER = null;
|
|
6
|
-
let chromiumDisableWebSecurity = false;
|
|
7
|
-
let ignoreCertificateErrors = false;
|
|
8
|
-
let openGlRenderer = exports.DEFAULT_OPENGL_RENDERER;
|
|
9
|
-
let headlessMode = true;
|
|
10
|
-
const getChromiumDisableWebSecurity = () => chromiumDisableWebSecurity;
|
|
11
|
-
exports.getChromiumDisableWebSecurity = getChromiumDisableWebSecurity;
|
|
12
|
-
const setChromiumDisableWebSecurity = (should) => {
|
|
13
|
-
chromiumDisableWebSecurity = should;
|
|
14
|
-
};
|
|
15
|
-
exports.setChromiumDisableWebSecurity = setChromiumDisableWebSecurity;
|
|
16
|
-
const getIgnoreCertificateErrors = () => ignoreCertificateErrors;
|
|
17
|
-
exports.getIgnoreCertificateErrors = getIgnoreCertificateErrors;
|
|
18
|
-
const setChromiumIgnoreCertificateErrors = (should) => {
|
|
19
|
-
ignoreCertificateErrors = should;
|
|
20
|
-
};
|
|
21
|
-
exports.setChromiumIgnoreCertificateErrors = setChromiumIgnoreCertificateErrors;
|
|
22
|
-
const getChromiumOpenGlRenderer = () => openGlRenderer;
|
|
23
|
-
exports.getChromiumOpenGlRenderer = getChromiumOpenGlRenderer;
|
|
24
|
-
const setChromiumOpenGlRenderer = (renderer) => {
|
|
25
|
-
(0, validate_opengl_renderer_1.validateOpenGlRenderer)(renderer);
|
|
26
|
-
openGlRenderer = renderer;
|
|
27
|
-
};
|
|
28
|
-
exports.setChromiumOpenGlRenderer = setChromiumOpenGlRenderer;
|
|
29
|
-
const getChromiumHeadlessMode = () => headlessMode;
|
|
30
|
-
exports.getChromiumHeadlessMode = getChromiumHeadlessMode;
|
|
31
|
-
const setChromiumHeadlessMode = (should) => {
|
|
32
|
-
headlessMode = should;
|
|
33
|
-
};
|
|
34
|
-
exports.setChromiumHeadlessMode = setChromiumHeadlessMode;
|
package/dist/config/codec.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare const validCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"];
|
|
2
|
-
export declare type Codec = typeof validCodecs[number];
|
|
3
|
-
export declare type CodecOrUndefined = Codec | undefined;
|
|
4
|
-
declare const validLegacyFormats: readonly ["mp4", "png-sequence"];
|
|
5
|
-
declare type LegacyFormat = typeof validLegacyFormats[number];
|
|
6
|
-
declare let codec: CodecOrUndefined;
|
|
7
|
-
export declare const getOutputCodecOrUndefined: () => CodecOrUndefined;
|
|
8
|
-
export declare const DEFAULT_CODEC: Codec;
|
|
9
|
-
export declare const getFinalOutputCodec: ({ codec: inputCodec, fileExtension, emitWarning, }: {
|
|
10
|
-
codec: CodecOrUndefined;
|
|
11
|
-
fileExtension: string | null;
|
|
12
|
-
emitWarning: boolean;
|
|
13
|
-
}) => Codec;
|
|
14
|
-
export declare const setOutputFormat: (newLegacyFormat: LegacyFormat) => void;
|
|
15
|
-
export declare const setCodec: (newCodec: CodecOrUndefined) => void;
|
|
16
|
-
export {};
|