remotion 3.3.11 → 3.3.12
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 +1 -1
- package/dist/Clipper.d.ts +9 -0
- package/dist/Clipper.js +18 -0
- package/dist/audio/Audio.d.ts +2 -2
- package/dist/audio/AudioForDevelopment.d.ts +1 -1
- package/dist/audio/AudioForRendering.d.ts +1 -1
- package/dist/get-static-files.d.ts +2 -0
- package/dist/get-static-files.js +31 -0
- package/dist/internals.d.ts +0 -1
- package/dist/use-video.d.ts +0 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/video/Video.d.ts +2 -2
- package/dist/video/VideoForDevelopment.d.ts +1 -1
- package/dist/video/VideoForDevelopment.js +17 -1
- package/dist/video/VideoForRendering.d.ts +1 -1
- package/dist/video/video-fragment.d.ts +6 -0
- package/dist/video/video-fragment.js +26 -0
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
package/dist/Clipper.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Clipper = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const AbsoluteFill_1 = require("./AbsoluteFill");
|
|
7
|
+
const CompositionManager_1 = require("./CompositionManager");
|
|
8
|
+
const Clipper = ({ height, width, x, y, hide, children }) => {
|
|
9
|
+
const context = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
context.setClipRegion({ height, hide: Boolean(hide), width, x, y });
|
|
12
|
+
return () => {
|
|
13
|
+
context.setClipRegion(null);
|
|
14
|
+
};
|
|
15
|
+
}, [context, height, hide, width, x, y]);
|
|
16
|
+
return (0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { children: children });
|
|
17
|
+
};
|
|
18
|
+
exports.Clipper = Clipper;
|
package/dist/audio/Audio.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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>, "nonce" | "
|
|
3
|
+
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "autoPlay" | "controls" | "onEnded"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
7
|
-
} & RemotionMainAudioProps, "id" | "
|
|
7
|
+
} & RemotionMainAudioProps, "id" | "children" | "src" | "volume" | "playbackRate" | "slot" | "style" | "title" | "property" | "key" | "is" | "color" | "hidden" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "acceptableTimeShiftInSeconds" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "
|
|
3
|
+
export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "autoPlay" | "controls" | "onEnded"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const AudioForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "
|
|
3
|
+
export declare const AudioForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "autoPlay" | "controls" | "onEnded"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStaticFiles = void 0;
|
|
4
|
+
let warnedServer = false;
|
|
5
|
+
let warnedPlayer = false;
|
|
6
|
+
const warnServerOnce = () => {
|
|
7
|
+
if (warnedServer) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
warnedServer = true;
|
|
11
|
+
console.warn('Called getStaticFiles() on the server. The API is only available in the browser. An empty array was returned.');
|
|
12
|
+
};
|
|
13
|
+
const warnPlayerOnce = () => {
|
|
14
|
+
if (warnedPlayer) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
warnedPlayer = true;
|
|
18
|
+
console.warn('Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Preview. An empty array was returned.');
|
|
19
|
+
};
|
|
20
|
+
const getStaticFiles = () => {
|
|
21
|
+
if (typeof document === 'undefined') {
|
|
22
|
+
warnServerOnce();
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
if (window.remotion_isPlayer) {
|
|
26
|
+
warnPlayerOnce();
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
return window.remotion_staticFiles;
|
|
30
|
+
};
|
|
31
|
+
exports.getStaticFiles = getStaticFiles;
|
package/dist/internals.d.ts
CHANGED
package/dist/use-video.d.ts
CHANGED
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.3.
|
|
1
|
+
export declare const VERSION = "3.3.12";
|
package/dist/version.js
CHANGED
package/dist/video/Video.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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>, "nonce" | "
|
|
3
|
+
export declare const Video: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "autoPlay" | "controls" | "onEnded"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeshift?: number | undefined;
|
|
7
|
-
} & RemotionMainVideoProps, "id" | "height" | "width" | "
|
|
7
|
+
} & RemotionMainVideoProps, "id" | "height" | "width" | "children" | "src" | "volume" | "playbackRate" | "slot" | "style" | "title" | "property" | "key" | "is" | "color" | "hidden" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | "acceptableTimeshift" | keyof RemotionMainVideoProps> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const VideoForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "
|
|
3
|
+
export declare const VideoForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "autoPlay" | "controls" | "onEnded"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeshift?: number | undefined;
|
|
@@ -5,15 +5,20 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const use_audio_frame_1 = require("../audio/use-audio-frame");
|
|
7
7
|
const prefetch_1 = require("../prefetch");
|
|
8
|
+
const Sequence_1 = require("../Sequence");
|
|
8
9
|
const use_media_in_timeline_1 = require("../use-media-in-timeline");
|
|
9
10
|
const use_media_playback_1 = require("../use-media-playback");
|
|
10
11
|
const use_media_tag_volume_1 = require("../use-media-tag-volume");
|
|
11
12
|
const use_sync_volume_with_media_tag_1 = require("../use-sync-volume-with-media-tag");
|
|
13
|
+
const use_video_config_1 = require("../use-video-config");
|
|
12
14
|
const volume_position_state_1 = require("../volume-position-state");
|
|
15
|
+
const video_fragment_1 = require("./video-fragment");
|
|
13
16
|
const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
14
17
|
var _a;
|
|
15
18
|
const videoRef = (0, react_1.useRef)(null);
|
|
16
19
|
const volumePropFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
20
|
+
const { fps, durationInFrames } = (0, use_video_config_1.useVideoConfig)();
|
|
21
|
+
const parentSequence = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
17
22
|
const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, src, onDuration, acceptableTimeshift, ...nativeProps } = props;
|
|
18
23
|
const actualVolume = (0, use_media_tag_volume_1.useMediaTagVolume)(videoRef);
|
|
19
24
|
const [mediaVolume] = (0, volume_position_state_1.useMediaVolumeState)();
|
|
@@ -40,7 +45,18 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
40
45
|
onlyWarnForMediaSeekingError,
|
|
41
46
|
acceptableTimeshift: acceptableTimeshift !== null && acceptableTimeshift !== void 0 ? acceptableTimeshift : use_media_playback_1.DEFAULT_ACCEPTABLE_TIMESHIFT,
|
|
42
47
|
});
|
|
43
|
-
const
|
|
48
|
+
const actualFrom = parentSequence
|
|
49
|
+
? parentSequence.relativeFrom + parentSequence.cumulatedFrom
|
|
50
|
+
: 0;
|
|
51
|
+
const duration = parentSequence
|
|
52
|
+
? Math.min(parentSequence.durationInFrames, durationInFrames)
|
|
53
|
+
: durationInFrames;
|
|
54
|
+
const actualSrc = (0, video_fragment_1.appendVideoFragment)({
|
|
55
|
+
actualSrc: (0, prefetch_1.usePreload)(src),
|
|
56
|
+
actualFrom,
|
|
57
|
+
duration,
|
|
58
|
+
fps,
|
|
59
|
+
});
|
|
44
60
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
45
61
|
return videoRef.current;
|
|
46
62
|
}, []);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const VideoForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "
|
|
3
|
+
export declare const VideoForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "autoPlay" | "controls" | "onEnded"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeshift?: number | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appendVideoFragment = void 0;
|
|
4
|
+
const toSeconds = (time, fps) => {
|
|
5
|
+
return Math.round((time / fps) * 100) / 100;
|
|
6
|
+
};
|
|
7
|
+
const appendVideoFragment = ({ actualSrc, actualFrom, duration, fps, }) => {
|
|
8
|
+
var _a;
|
|
9
|
+
if (actualSrc.startsWith('data:')) {
|
|
10
|
+
return actualSrc;
|
|
11
|
+
}
|
|
12
|
+
const existingHash = Boolean(new URL(actualSrc, (_a = window.location.href) !== null && _a !== void 0 ? _a : 'http://localhost:3000').hash);
|
|
13
|
+
if (existingHash) {
|
|
14
|
+
return actualSrc;
|
|
15
|
+
}
|
|
16
|
+
if (!Number.isFinite(actualFrom)) {
|
|
17
|
+
return actualSrc;
|
|
18
|
+
}
|
|
19
|
+
actualSrc += `#t=${toSeconds(-actualFrom, fps)}`;
|
|
20
|
+
if (!Number.isFinite(duration)) {
|
|
21
|
+
return actualSrc;
|
|
22
|
+
}
|
|
23
|
+
actualSrc += `,${toSeconds(duration, fps)}`;
|
|
24
|
+
return actualSrc;
|
|
25
|
+
};
|
|
26
|
+
exports.appendVideoFragment = appendVideoFragment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.12",
|
|
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": "0c7c54df00df527cd7e395658324102461883e87"
|
|
59
59
|
}
|