@remotion/media 4.0.441 → 4.0.442
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 +77 -39
- package/dist/index.d.ts +2 -1
- package/dist/video/props.d.ts +2 -0
- package/dist/video/video-for-preview.d.ts +2 -1
- package/dist/video/video-for-rendering.d.ts +2 -1
- package/dist/video/video.d.ts +1 -0
- package/dist/video/warn-object-fit-css.d.ts +5 -0
- package/package.json +3 -3
- package/dist/calculate-playbacktime.d.ts +0 -5
package/dist/esm/index.mjs
CHANGED
|
@@ -4491,7 +4491,7 @@ var Audio = Internals19.wrapInSchema(AudioInner, audioSchema);
|
|
|
4491
4491
|
Internals19.addSequenceStackTraces(Audio);
|
|
4492
4492
|
|
|
4493
4493
|
// src/video/video.tsx
|
|
4494
|
-
import { Internals as
|
|
4494
|
+
import { Internals as Internals23, useRemotionEnvironment as useRemotionEnvironment4 } from "remotion";
|
|
4495
4495
|
|
|
4496
4496
|
// src/video/video-for-preview.tsx
|
|
4497
4497
|
import {
|
|
@@ -4504,11 +4504,33 @@ import {
|
|
|
4504
4504
|
} from "react";
|
|
4505
4505
|
import {
|
|
4506
4506
|
Html5Video,
|
|
4507
|
-
Internals as
|
|
4507
|
+
Internals as Internals21,
|
|
4508
4508
|
useBufferState as useBufferState2,
|
|
4509
4509
|
useCurrentFrame as useCurrentFrame4,
|
|
4510
4510
|
useVideoConfig as useVideoConfig3
|
|
4511
4511
|
} from "remotion";
|
|
4512
|
+
|
|
4513
|
+
// src/video/warn-object-fit-css.ts
|
|
4514
|
+
import { Internals as Internals20 } from "remotion";
|
|
4515
|
+
var OBJECT_FIT_CLASS_PATTERN = /\bobject-(contain|cover|fill|none|scale-down)\b/;
|
|
4516
|
+
var warnedStyle = false;
|
|
4517
|
+
var warnedClassName = false;
|
|
4518
|
+
var warnAboutObjectFitInStyleOrClassName = ({
|
|
4519
|
+
style,
|
|
4520
|
+
className,
|
|
4521
|
+
logLevel
|
|
4522
|
+
}) => {
|
|
4523
|
+
if (!warnedStyle && style?.objectFit) {
|
|
4524
|
+
warnedStyle = true;
|
|
4525
|
+
Internals20.Log.warn({ logLevel, tag: "@remotion/media" }, "Use the `objectFit` prop instead of the `style` prop.");
|
|
4526
|
+
}
|
|
4527
|
+
if (!warnedClassName && className && OBJECT_FIT_CLASS_PATTERN.test(className)) {
|
|
4528
|
+
warnedClassName = true;
|
|
4529
|
+
Internals20.Log.warn({ logLevel, tag: "@remotion/media" }, "Use the `objectFit` prop instead of `object-*` CSS class names.");
|
|
4530
|
+
}
|
|
4531
|
+
};
|
|
4532
|
+
|
|
4533
|
+
// src/video/video-for-preview.tsx
|
|
4512
4534
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
4513
4535
|
var {
|
|
4514
4536
|
useUnsafeVideoConfig: useUnsafeVideoConfig2,
|
|
@@ -4522,7 +4544,7 @@ var {
|
|
|
4522
4544
|
usePreload: usePreload2,
|
|
4523
4545
|
SequenceContext: SequenceContext2,
|
|
4524
4546
|
SequenceVisibilityToggleContext
|
|
4525
|
-
} =
|
|
4547
|
+
} = Internals21;
|
|
4526
4548
|
var VideoForPreviewAssertedShowing = ({
|
|
4527
4549
|
src: unpreloadedSrc,
|
|
4528
4550
|
style,
|
|
@@ -4547,7 +4569,8 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4547
4569
|
headless,
|
|
4548
4570
|
onError,
|
|
4549
4571
|
credentials,
|
|
4550
|
-
controls
|
|
4572
|
+
controls,
|
|
4573
|
+
objectFit: objectFitProp
|
|
4551
4574
|
}) => {
|
|
4552
4575
|
const src = usePreload2(unpreloadedSrc);
|
|
4553
4576
|
const canvasRef = useRef2(null);
|
|
@@ -4560,7 +4583,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4560
4583
|
const [mediaPlayerReady, setMediaPlayerReady] = useState4(false);
|
|
4561
4584
|
const [shouldFallbackToNativeVideo, setShouldFallbackToNativeVideo] = useState4(false);
|
|
4562
4585
|
const [playing] = Timeline2.usePlayingState();
|
|
4563
|
-
const timelineContext =
|
|
4586
|
+
const timelineContext = Internals21.useTimelineContext();
|
|
4564
4587
|
const globalPlaybackRate = timelineContext.playbackRate;
|
|
4565
4588
|
const sharedAudioContext = useContext5(SharedAudioContext2);
|
|
4566
4589
|
const buffer = useBufferState2();
|
|
@@ -4610,12 +4633,12 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4610
4633
|
const currentTimeRef = useRef2(currentTime);
|
|
4611
4634
|
currentTimeRef.current = currentTime;
|
|
4612
4635
|
const preloadedSrc = usePreload2(src);
|
|
4613
|
-
const buffering = useContext5(
|
|
4636
|
+
const buffering = useContext5(Internals21.BufferingContextReact);
|
|
4614
4637
|
if (!buffering) {
|
|
4615
4638
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
4616
4639
|
}
|
|
4617
4640
|
const effectiveMuted = isSequenceHidden || muted || mediaMuted || userPreferredVolume <= 0;
|
|
4618
|
-
const isPlayerBuffering =
|
|
4641
|
+
const isPlayerBuffering = Internals21.useIsPlayerBuffering(buffering);
|
|
4619
4642
|
const initialPlaying = useRef2(playing && !isPlayerBuffering);
|
|
4620
4643
|
const initialIsPremounting = useRef2(isPremounting);
|
|
4621
4644
|
const initialIsPostmounting = useRef2(isPostmounting);
|
|
@@ -4670,7 +4693,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4670
4693
|
if (action === "fail") {
|
|
4671
4694
|
throw errorToUse;
|
|
4672
4695
|
}
|
|
4673
|
-
|
|
4696
|
+
Internals21.Log.warn({ logLevel, tag: "@remotion/media" }, fallbackMessage);
|
|
4674
4697
|
setShouldFallbackToNativeVideo(true);
|
|
4675
4698
|
};
|
|
4676
4699
|
if (result.type === "unknown-container-format") {
|
|
@@ -4704,7 +4727,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4704
4727
|
if (action === "fail") {
|
|
4705
4728
|
throw errorToUse;
|
|
4706
4729
|
}
|
|
4707
|
-
|
|
4730
|
+
Internals21.Log.error({ logLevel, tag: "@remotion/media" }, "[VideoForPreview] Failed to initialize MediaPlayer", errorToUse);
|
|
4708
4731
|
setShouldFallbackToNativeVideo(true);
|
|
4709
4732
|
});
|
|
4710
4733
|
} catch (error) {
|
|
@@ -4718,12 +4741,12 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4718
4741
|
if (action === "fail") {
|
|
4719
4742
|
throw errorToUse;
|
|
4720
4743
|
}
|
|
4721
|
-
|
|
4744
|
+
Internals21.Log.error({ logLevel, tag: "@remotion/media" }, "[VideoForPreview] MediaPlayer initialization failed", errorToUse);
|
|
4722
4745
|
setShouldFallbackToNativeVideo(true);
|
|
4723
4746
|
}
|
|
4724
4747
|
return () => {
|
|
4725
4748
|
if (mediaPlayerRef.current) {
|
|
4726
|
-
|
|
4749
|
+
Internals21.Log.trace({ logLevel, tag: "@remotion/media" }, `[VideoForPreview] Disposing MediaPlayer`);
|
|
4727
4750
|
mediaPlayerRef.current.dispose();
|
|
4728
4751
|
mediaPlayerRef.current = null;
|
|
4729
4752
|
}
|
|
@@ -4744,8 +4767,9 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4744
4767
|
onError,
|
|
4745
4768
|
credentials
|
|
4746
4769
|
]);
|
|
4770
|
+
warnAboutObjectFitInStyleOrClassName({ style, className, logLevel });
|
|
4747
4771
|
const classNameValue = useMemo4(() => {
|
|
4748
|
-
return [
|
|
4772
|
+
return [Internals21.OBJECTFIT_CONTAIN_CLASS_NAME, className].filter(Internals21.truthy).join(" ");
|
|
4749
4773
|
}, [className]);
|
|
4750
4774
|
useCommonEffects({
|
|
4751
4775
|
mediaPlayerRef,
|
|
@@ -4789,9 +4813,10 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
4789
4813
|
const actualStyle = useMemo4(() => {
|
|
4790
4814
|
return {
|
|
4791
4815
|
...style,
|
|
4792
|
-
opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
|
|
4816
|
+
opacity: isSequenceHidden ? 0 : style?.opacity ?? 1,
|
|
4817
|
+
objectFit: objectFitProp
|
|
4793
4818
|
};
|
|
4794
|
-
}, [isSequenceHidden, style]);
|
|
4819
|
+
}, [isSequenceHidden, objectFitProp, style]);
|
|
4795
4820
|
if (shouldFallbackToNativeVideo && !disallowFallbackToOffthreadVideo) {
|
|
4796
4821
|
return /* @__PURE__ */ jsx4(Html5Video, {
|
|
4797
4822
|
src,
|
|
@@ -4862,7 +4887,7 @@ import {
|
|
|
4862
4887
|
useState as useState5
|
|
4863
4888
|
} from "react";
|
|
4864
4889
|
import {
|
|
4865
|
-
Internals as
|
|
4890
|
+
Internals as Internals22,
|
|
4866
4891
|
Loop,
|
|
4867
4892
|
random as random2,
|
|
4868
4893
|
useCurrentFrame as useCurrentFrame5,
|
|
@@ -4894,17 +4919,18 @@ var VideoForRendering = ({
|
|
|
4894
4919
|
trimBeforeValue,
|
|
4895
4920
|
headless,
|
|
4896
4921
|
onError,
|
|
4897
|
-
credentials
|
|
4922
|
+
credentials,
|
|
4923
|
+
objectFit: objectFitProp
|
|
4898
4924
|
}) => {
|
|
4899
4925
|
if (!src) {
|
|
4900
4926
|
throw new TypeError("No `src` was passed to <Video>.");
|
|
4901
4927
|
}
|
|
4902
4928
|
const frame = useCurrentFrame5();
|
|
4903
|
-
const absoluteFrame =
|
|
4929
|
+
const absoluteFrame = Internals22.useTimelinePosition();
|
|
4904
4930
|
const { fps } = useVideoConfig4();
|
|
4905
|
-
const { registerRenderAsset, unregisterRenderAsset } = useContext6(
|
|
4906
|
-
const startsAt =
|
|
4907
|
-
const sequenceContext = useContext6(
|
|
4931
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext6(Internals22.RenderAssetManager);
|
|
4932
|
+
const startsAt = Internals22.useMediaStartsAt();
|
|
4933
|
+
const sequenceContext = useContext6(Internals22.SequenceContext);
|
|
4908
4934
|
const id = useMemo5(() => `media-video-${random2(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
4909
4935
|
src,
|
|
4910
4936
|
sequenceContext?.cumulatedFrom,
|
|
@@ -4915,8 +4941,8 @@ var VideoForRendering = ({
|
|
|
4915
4941
|
const { delayRender, continueRender, cancelRender: cancelRender3 } = useDelayRender2();
|
|
4916
4942
|
const canvasRef = useRef3(null);
|
|
4917
4943
|
const [replaceWithOffthreadVideo, setReplaceWithOffthreadVideo] = useState5(false);
|
|
4918
|
-
const audioEnabled =
|
|
4919
|
-
const videoEnabled =
|
|
4944
|
+
const audioEnabled = Internals22.useAudioEnabled();
|
|
4945
|
+
const videoEnabled = Internals22.useVideoEnabled();
|
|
4920
4946
|
const maxCacheSize = useMaxMediaCacheSize(logLevel);
|
|
4921
4947
|
const [error, setError] = useState5(null);
|
|
4922
4948
|
if (error) {
|
|
@@ -4981,7 +5007,7 @@ var VideoForRendering = ({
|
|
|
4981
5007
|
return;
|
|
4982
5008
|
}
|
|
4983
5009
|
if (window.remotion_isMainTab) {
|
|
4984
|
-
|
|
5010
|
+
Internals22.Log.warn({ logLevel, tag: "@remotion/media" }, fallbackMessage);
|
|
4985
5011
|
}
|
|
4986
5012
|
setReplaceWithOffthreadVideo({
|
|
4987
5013
|
durationInSeconds: mediaDurationInSeconds
|
|
@@ -5036,12 +5062,12 @@ var VideoForRendering = ({
|
|
|
5036
5062
|
frame,
|
|
5037
5063
|
startsAt
|
|
5038
5064
|
});
|
|
5039
|
-
const volume =
|
|
5065
|
+
const volume = Internals22.evaluateVolume({
|
|
5040
5066
|
volume: volumeProp,
|
|
5041
5067
|
frame: volumePropsFrame,
|
|
5042
5068
|
mediaVolume: 1
|
|
5043
5069
|
});
|
|
5044
|
-
|
|
5070
|
+
Internals22.warnAboutTooHighVolume(volume);
|
|
5045
5071
|
if (audio && volume > 0) {
|
|
5046
5072
|
applyVolume(audio.data, volume);
|
|
5047
5073
|
registerRenderAsset({
|
|
@@ -5097,11 +5123,18 @@ var VideoForRendering = ({
|
|
|
5097
5123
|
onError,
|
|
5098
5124
|
credentials
|
|
5099
5125
|
]);
|
|
5126
|
+
warnAboutObjectFitInStyleOrClassName({ style, className, logLevel });
|
|
5100
5127
|
const classNameValue = useMemo5(() => {
|
|
5101
|
-
return [
|
|
5128
|
+
return [Internals22.OBJECTFIT_CONTAIN_CLASS_NAME, className].filter(Internals22.truthy).join(" ");
|
|
5102
5129
|
}, [className]);
|
|
5130
|
+
const styleWithObjectFit = useMemo5(() => {
|
|
5131
|
+
return {
|
|
5132
|
+
...style,
|
|
5133
|
+
objectFit: objectFitProp
|
|
5134
|
+
};
|
|
5135
|
+
}, [objectFitProp, style]);
|
|
5103
5136
|
if (replaceWithOffthreadVideo) {
|
|
5104
|
-
const fallback = /* @__PURE__ */ jsx5(
|
|
5137
|
+
const fallback = /* @__PURE__ */ jsx5(Internals22.InnerOffthreadVideo, {
|
|
5105
5138
|
src,
|
|
5106
5139
|
playbackRate: playbackRate ?? 1,
|
|
5107
5140
|
muted: muted ?? false,
|
|
@@ -5109,7 +5142,7 @@ var VideoForRendering = ({
|
|
|
5109
5142
|
loopVolumeCurveBehavior: loopVolumeCurveBehavior ?? "repeat",
|
|
5110
5143
|
delayRenderRetries: delayRenderRetries ?? undefined,
|
|
5111
5144
|
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined,
|
|
5112
|
-
style,
|
|
5145
|
+
style: styleWithObjectFit,
|
|
5113
5146
|
allowAmplificationDuringRender: true,
|
|
5114
5147
|
transparent: fallbackOffthreadVideoProps?.transparent ?? true,
|
|
5115
5148
|
toneMapped: fallbackOffthreadVideoProps?.toneMapped ?? true,
|
|
@@ -5141,7 +5174,7 @@ var VideoForRendering = ({
|
|
|
5141
5174
|
}
|
|
5142
5175
|
return /* @__PURE__ */ jsx5(Loop, {
|
|
5143
5176
|
layout: "none",
|
|
5144
|
-
durationInFrames:
|
|
5177
|
+
durationInFrames: Internals22.calculateMediaDuration({
|
|
5145
5178
|
trimAfter: trimAfterValue,
|
|
5146
5179
|
mediaDurationInFrames: replaceWithOffthreadVideo.durationInSeconds * fps,
|
|
5147
5180
|
playbackRate,
|
|
@@ -5157,14 +5190,14 @@ var VideoForRendering = ({
|
|
|
5157
5190
|
}
|
|
5158
5191
|
return /* @__PURE__ */ jsx5("canvas", {
|
|
5159
5192
|
ref: canvasRef,
|
|
5160
|
-
style,
|
|
5193
|
+
style: styleWithObjectFit,
|
|
5161
5194
|
className: classNameValue
|
|
5162
5195
|
});
|
|
5163
5196
|
};
|
|
5164
5197
|
|
|
5165
5198
|
// src/video/video.tsx
|
|
5166
5199
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
5167
|
-
var { validateMediaTrimProps, resolveTrimProps, validateMediaProps: validateMediaProps2 } =
|
|
5200
|
+
var { validateMediaTrimProps, resolveTrimProps, validateMediaProps: validateMediaProps2 } = Internals23;
|
|
5168
5201
|
var videoSchema = {
|
|
5169
5202
|
volume: {
|
|
5170
5203
|
type: "number",
|
|
@@ -5238,7 +5271,8 @@ var InnerVideo = ({
|
|
|
5238
5271
|
headless,
|
|
5239
5272
|
onError,
|
|
5240
5273
|
credentials,
|
|
5241
|
-
controls
|
|
5274
|
+
controls,
|
|
5275
|
+
objectFit
|
|
5242
5276
|
}) => {
|
|
5243
5277
|
const environment = useRemotionEnvironment4();
|
|
5244
5278
|
if (typeof src !== "string") {
|
|
@@ -5281,7 +5315,8 @@ var InnerVideo = ({
|
|
|
5281
5315
|
trimBeforeValue,
|
|
5282
5316
|
headless,
|
|
5283
5317
|
onError,
|
|
5284
|
-
credentials
|
|
5318
|
+
credentials,
|
|
5319
|
+
objectFit
|
|
5285
5320
|
});
|
|
5286
5321
|
}
|
|
5287
5322
|
return /* @__PURE__ */ jsx6(VideoForPreview, {
|
|
@@ -5308,7 +5343,8 @@ var InnerVideo = ({
|
|
|
5308
5343
|
headless: headless ?? false,
|
|
5309
5344
|
onError,
|
|
5310
5345
|
credentials,
|
|
5311
|
-
controls
|
|
5346
|
+
controls,
|
|
5347
|
+
objectFit
|
|
5312
5348
|
});
|
|
5313
5349
|
};
|
|
5314
5350
|
var VideoInner = ({
|
|
@@ -5338,9 +5374,10 @@ var VideoInner = ({
|
|
|
5338
5374
|
headless,
|
|
5339
5375
|
onError,
|
|
5340
5376
|
credentials,
|
|
5341
|
-
controls
|
|
5377
|
+
controls,
|
|
5378
|
+
objectFit
|
|
5342
5379
|
}) => {
|
|
5343
|
-
const fallbackLogLevel =
|
|
5380
|
+
const fallbackLogLevel = Internals23.useLogLevel();
|
|
5344
5381
|
return /* @__PURE__ */ jsx6(InnerVideo, {
|
|
5345
5382
|
audioStreamIndex: audioStreamIndex ?? 0,
|
|
5346
5383
|
className,
|
|
@@ -5368,11 +5405,12 @@ var VideoInner = ({
|
|
|
5368
5405
|
headless: headless ?? false,
|
|
5369
5406
|
onError,
|
|
5370
5407
|
credentials,
|
|
5371
|
-
controls
|
|
5408
|
+
controls,
|
|
5409
|
+
objectFit: objectFit ?? "contain"
|
|
5372
5410
|
});
|
|
5373
5411
|
};
|
|
5374
|
-
var Video =
|
|
5375
|
-
|
|
5412
|
+
var Video = Internals23.wrapInSchema(VideoInner, videoSchema);
|
|
5413
|
+
Internals23.addSequenceStackTraces(Video);
|
|
5376
5414
|
|
|
5377
5415
|
// src/index.ts
|
|
5378
5416
|
var experimental_Audio = Audio;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,9 +38,10 @@ export declare const experimental_Video: import("react").ComponentType<{
|
|
|
38
38
|
headless: boolean;
|
|
39
39
|
onError: import("./on-error").MediaOnError | undefined;
|
|
40
40
|
credentials: RequestCredentials | undefined;
|
|
41
|
+
objectFit: import(".").VideoObjectFit;
|
|
41
42
|
}>>;
|
|
42
43
|
export { AudioForPreview } from './audio/audio-for-preview';
|
|
43
44
|
export { AudioProps, FallbackHtml5AudioProps } from './audio/props';
|
|
44
45
|
export { MediaErrorAction } from './on-error';
|
|
45
|
-
export { FallbackOffthreadVideoProps, VideoProps } from './video/props';
|
|
46
|
+
export { FallbackOffthreadVideoProps, VideoObjectFit, VideoProps, } from './video/props';
|
|
46
47
|
export { Audio, Video };
|
package/dist/video/props.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { MediaOnError } from '../on-error';
|
|
|
3
3
|
export type MediaErrorEvent = {
|
|
4
4
|
error: Error;
|
|
5
5
|
};
|
|
6
|
+
export type VideoObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
|
|
6
7
|
export type FallbackOffthreadVideoProps = {
|
|
7
8
|
acceptableTimeShiftInSeconds?: number;
|
|
8
9
|
transparent?: boolean;
|
|
@@ -49,6 +50,7 @@ type OptionalVideoProps = {
|
|
|
49
50
|
headless: boolean;
|
|
50
51
|
onError: MediaOnError | undefined;
|
|
51
52
|
credentials: RequestCredentials | undefined;
|
|
53
|
+
objectFit: VideoObjectFit;
|
|
52
54
|
};
|
|
53
55
|
export type InnerVideoProps = MandatoryVideoProps & OuterVideoProps & OptionalVideoProps;
|
|
54
56
|
export type VideoProps = MandatoryVideoProps & Partial<OuterVideoProps> & Partial<OptionalVideoProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LogLevel, LoopVolumeCurveBehavior, SequenceControls, VolumeProp } from 'remotion';
|
|
3
3
|
import { type MediaOnError } from '../on-error';
|
|
4
|
-
import type { FallbackOffthreadVideoProps } from './props';
|
|
4
|
+
import type { FallbackOffthreadVideoProps, VideoObjectFit } from './props';
|
|
5
5
|
type VideoForPreviewProps = {
|
|
6
6
|
readonly src: string;
|
|
7
7
|
readonly style: React.CSSProperties | undefined;
|
|
@@ -26,6 +26,7 @@ type VideoForPreviewProps = {
|
|
|
26
26
|
readonly headless: boolean;
|
|
27
27
|
readonly onError: MediaOnError | undefined;
|
|
28
28
|
readonly credentials: RequestCredentials | undefined;
|
|
29
|
+
readonly objectFit: VideoObjectFit;
|
|
29
30
|
};
|
|
30
31
|
export declare const VideoForPreview: React.FC<VideoForPreviewProps & {
|
|
31
32
|
readonly controls: SequenceControls | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, VolumeProp } from 'remotion';
|
|
3
3
|
import { type MediaOnError } from '../on-error';
|
|
4
|
-
import type { FallbackOffthreadVideoProps } from './props';
|
|
4
|
+
import type { FallbackOffthreadVideoProps, VideoObjectFit } from './props';
|
|
5
5
|
type InnerVideoProps = {
|
|
6
6
|
readonly className: string | undefined;
|
|
7
7
|
readonly loop: boolean;
|
|
@@ -26,6 +26,7 @@ type InnerVideoProps = {
|
|
|
26
26
|
readonly headless: boolean;
|
|
27
27
|
readonly onError: MediaOnError | undefined;
|
|
28
28
|
readonly credentials: RequestCredentials | undefined;
|
|
29
|
+
readonly objectFit: VideoObjectFit;
|
|
29
30
|
};
|
|
30
31
|
export declare const VideoForRendering: React.FC<InnerVideoProps>;
|
|
31
32
|
export {};
|
package/dist/video/video.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/media",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.442",
|
|
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.39.2",
|
|
26
|
-
"remotion": "4.0.
|
|
26
|
+
"remotion": "4.0.442",
|
|
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.442",
|
|
35
35
|
"@vitest/browser-webdriverio": "4.0.9",
|
|
36
36
|
"eslint": "9.19.0",
|
|
37
37
|
"react": "19.2.3",
|