@remotion/media 4.0.470 → 4.0.471
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.mjs
CHANGED
|
@@ -4663,7 +4663,7 @@ var Audio = Internals16.wrapInSchema(AudioInner, audioSchema);
|
|
|
4663
4663
|
Internals16.addSequenceStackTraces(Audio);
|
|
4664
4664
|
|
|
4665
4665
|
// src/video/video.tsx
|
|
4666
|
-
import { useMemo as useMemo6, useState as useState6 } from "react";
|
|
4666
|
+
import React5, { useMemo as useMemo6, useState as useState6 } from "react";
|
|
4667
4667
|
import {
|
|
4668
4668
|
Internals as Internals20,
|
|
4669
4669
|
Sequence as Sequence2,
|
|
@@ -4673,6 +4673,7 @@ import {
|
|
|
4673
4673
|
|
|
4674
4674
|
// src/video/video-for-preview.tsx
|
|
4675
4675
|
import {
|
|
4676
|
+
useCallback,
|
|
4676
4677
|
useContext as useContext4,
|
|
4677
4678
|
useEffect as useEffect2,
|
|
4678
4679
|
useLayoutEffect as useLayoutEffect3,
|
|
@@ -4772,7 +4773,8 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4772
4773
|
objectFit: objectFitProp,
|
|
4773
4774
|
_experimentalInitiallyDrawCachedFrame,
|
|
4774
4775
|
effects,
|
|
4775
|
-
setMediaDurationInSeconds
|
|
4776
|
+
setMediaDurationInSeconds,
|
|
4777
|
+
refForOutline
|
|
4776
4778
|
}) => {
|
|
4777
4779
|
const src = usePreload2(unpreloadedSrc);
|
|
4778
4780
|
const canvasRef = useRef2(null);
|
|
@@ -4789,6 +4791,13 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4789
4791
|
const { playbackRate: globalPlaybackRate } = Internals18.usePlaybackRate();
|
|
4790
4792
|
const sharedAudioContext = useContext4(SharedAudioContext2);
|
|
4791
4793
|
const buffer = useBufferState2();
|
|
4794
|
+
const canvasRefCallback = useCallback((canvas) => {
|
|
4795
|
+
canvasRef.current = canvas;
|
|
4796
|
+
refForOutline.current = canvas;
|
|
4797
|
+
}, [refForOutline]);
|
|
4798
|
+
const fallbackVideoRef = useCallback((video) => {
|
|
4799
|
+
refForOutline.current = video;
|
|
4800
|
+
}, [refForOutline]);
|
|
4792
4801
|
const [mediaMuted] = useMediaMutedState2();
|
|
4793
4802
|
const [mediaVolume] = useMediaVolumeState2();
|
|
4794
4803
|
const volumePropFrame = useFrameForVolumeProp2(loopVolumeCurveBehavior);
|
|
@@ -5063,6 +5072,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
5063
5072
|
}, [objectFitProp, style]);
|
|
5064
5073
|
if (shouldFallbackToNativeVideo && !disallowFallbackToOffthreadVideo) {
|
|
5065
5074
|
return /* @__PURE__ */ jsx4(Html5Video, {
|
|
5075
|
+
ref: fallbackVideoRef,
|
|
5066
5076
|
src,
|
|
5067
5077
|
style: actualStyle,
|
|
5068
5078
|
className,
|
|
@@ -5083,7 +5093,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
5083
5093
|
return null;
|
|
5084
5094
|
}
|
|
5085
5095
|
return /* @__PURE__ */ jsx4("canvas", {
|
|
5086
|
-
ref:
|
|
5096
|
+
ref: canvasRefCallback,
|
|
5087
5097
|
style: actualStyle,
|
|
5088
5098
|
className: classNameValue
|
|
5089
5099
|
});
|
|
@@ -5517,7 +5527,8 @@ var InnerVideo = ({
|
|
|
5517
5527
|
objectFit,
|
|
5518
5528
|
_experimentalInitiallyDrawCachedFrame,
|
|
5519
5529
|
effects,
|
|
5520
|
-
setMediaDurationInSeconds
|
|
5530
|
+
setMediaDurationInSeconds,
|
|
5531
|
+
refForOutline
|
|
5521
5532
|
}) => {
|
|
5522
5533
|
const environment = useRemotionEnvironment4();
|
|
5523
5534
|
if (typeof src !== "string") {
|
|
@@ -5592,7 +5603,8 @@ var InnerVideo = ({
|
|
|
5592
5603
|
controls,
|
|
5593
5604
|
objectFit,
|
|
5594
5605
|
effects,
|
|
5595
|
-
_experimentalInitiallyDrawCachedFrame
|
|
5606
|
+
_experimentalInitiallyDrawCachedFrame,
|
|
5607
|
+
refForOutline
|
|
5596
5608
|
});
|
|
5597
5609
|
};
|
|
5598
5610
|
var VideoInner = ({
|
|
@@ -5675,6 +5687,7 @@ var VideoInner = ({
|
|
|
5675
5687
|
overrideId: controls?.overrideId ?? null
|
|
5676
5688
|
});
|
|
5677
5689
|
const memoizedEffectDefinitions = Internals20.useMemoizedEffectDefinitions(effects ?? []);
|
|
5690
|
+
const refForOutline = React5.useRef(null);
|
|
5678
5691
|
if (sequenceDurationInFrames === 0) {
|
|
5679
5692
|
return null;
|
|
5680
5693
|
}
|
|
@@ -5689,6 +5702,7 @@ var VideoInner = ({
|
|
|
5689
5702
|
_experimentalControls: controls,
|
|
5690
5703
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
5691
5704
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
5705
|
+
_remotionInternalRefForOutline: refForOutline,
|
|
5692
5706
|
showInTimeline: showInTimeline ?? true,
|
|
5693
5707
|
hidden,
|
|
5694
5708
|
children: /* @__PURE__ */ jsx6(InnerVideo, {
|
|
@@ -5721,7 +5735,8 @@ var VideoInner = ({
|
|
|
5721
5735
|
objectFit: objectFit ?? "contain",
|
|
5722
5736
|
_experimentalInitiallyDrawCachedFrame: _experimentalInitiallyDrawCachedFrame ?? false,
|
|
5723
5737
|
effects: memoizedEffects,
|
|
5724
|
-
setMediaDurationInSeconds
|
|
5738
|
+
setMediaDurationInSeconds,
|
|
5739
|
+
refForOutline
|
|
5725
5740
|
})
|
|
5726
5741
|
});
|
|
5727
5742
|
};
|
|
@@ -30,6 +30,7 @@ type VideoForPreviewProps = {
|
|
|
30
30
|
readonly setMediaDurationInSeconds: (durationInSeconds: number) => void;
|
|
31
31
|
readonly _experimentalInitiallyDrawCachedFrame: boolean;
|
|
32
32
|
readonly effects: EffectDefinitionAndStack<unknown>[];
|
|
33
|
+
readonly refForOutline: React.RefObject<HTMLElement | null>;
|
|
33
34
|
};
|
|
34
35
|
export declare const VideoForPreview: React.FC<VideoForPreviewProps & {
|
|
35
36
|
readonly controls: SequenceControls | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/media",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.471",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"module": "dist/esm/index.mjs",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"mediabunny": "1.45.0",
|
|
26
|
-
"remotion": "4.0.
|
|
26
|
+
"remotion": "4.0.471",
|
|
27
27
|
"zod": "4.3.6"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"react-dom": ">=16.8.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
34
|
+
"@remotion/eslint-config-internal": "4.0.471",
|
|
35
35
|
"@vitest/browser-webdriverio": "4.0.9",
|
|
36
36
|
"eslint": "9.19.0",
|
|
37
37
|
"react": "19.2.3",
|