@remotion/media 4.0.499 → 4.0.501

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.
@@ -22,7 +22,7 @@ type InnerAudioProps = {
22
22
  readonly showInTimeline?: boolean;
23
23
  readonly trimAfter?: number | undefined;
24
24
  readonly trimBefore?: number | undefined;
25
- readonly stack: string | null;
25
+ readonly _remotionInternalStack: string | null;
26
26
  readonly disallowFallbackToHtml5Audio?: boolean;
27
27
  readonly toneFrequency?: number;
28
28
  readonly audioStreamIndex?: number;
@@ -10,7 +10,6 @@ export declare const Audio: React.ComponentType<{
10
10
  playbackRate?: number | undefined;
11
11
  muted?: boolean | undefined;
12
12
  style?: React.CSSProperties | undefined;
13
- stack?: string | undefined;
14
13
  logLevel?: "error" | "info" | "trace" | "verbose" | "warn" | undefined;
15
14
  loop?: boolean | undefined;
16
15
  audioStreamIndex?: number | undefined;
@@ -18,10 +18,6 @@ export type AudioProps = {
18
18
  playbackRate?: number;
19
19
  muted?: boolean;
20
20
  style?: React.CSSProperties;
21
- /**
22
- * @deprecated For internal use only
23
- */
24
- stack?: string;
25
21
  logLevel?: LogLevel;
26
22
  loop?: boolean;
27
23
  audioStreamIndex?: number;
@@ -2445,7 +2445,7 @@ var AudioForPreviewAssertedShowing = ({
2445
2445
  trimBefore,
2446
2446
  name,
2447
2447
  showInTimeline,
2448
- stack,
2448
+ _remotionInternalStack,
2449
2449
  disallowFallbackToHtml5Audio,
2450
2450
  toneFrequency,
2451
2451
  audioStreamIndex,
@@ -2685,7 +2685,7 @@ var AudioForPreviewAssertedShowing = ({
2685
2685
  loop,
2686
2686
  showInTimeline,
2687
2687
  style: style ?? undefined,
2688
- stack: stack ?? undefined,
2688
+ _remotionInternalStack: _remotionInternalStack ?? undefined,
2689
2689
  toneFrequency,
2690
2690
  audioStreamIndex,
2691
2691
  pauseWhenBuffering: fallbackHtml5AudioProps?.pauseWhenBuffering,
@@ -2707,7 +2707,7 @@ var AudioForPreview = ({
2707
2707
  trimAfter,
2708
2708
  trimBefore,
2709
2709
  showInTimeline,
2710
- stack,
2710
+ _remotionInternalStack,
2711
2711
  disallowFallbackToHtml5Audio,
2712
2712
  toneFrequency,
2713
2713
  audioStreamIndex,
@@ -2763,7 +2763,7 @@ var AudioForPreview = ({
2763
2763
  trimBefore,
2764
2764
  name,
2765
2765
  showInTimeline: showInTimeline ?? true,
2766
- stack,
2766
+ _remotionInternalStack,
2767
2767
  disallowFallbackToHtml5Audio: disallowFallbackToHtml5Audio ?? false,
2768
2768
  toneFrequency,
2769
2769
  onError,
@@ -4985,7 +4985,6 @@ var audioSchema = {
4985
4985
  var AudioInner = (props) => {
4986
4986
  const {
4987
4987
  name,
4988
- stack,
4989
4988
  showInTimeline,
4990
4989
  controls,
4991
4990
  from,
@@ -4998,6 +4997,7 @@ var AudioInner = (props) => {
4998
4997
  ...otherProps
4999
4998
  } = props;
5000
4999
  const environment = useRemotionEnvironment2();
5000
+ const sourceStack = controls ? Internals17.getStackForControls(controls) : null;
5001
5001
  const [mediaVolume] = Internals17.useMediaVolumeState();
5002
5002
  const mediaStartsAt = Internals17.useMediaStartsAt();
5003
5003
  const videoConfig = useVideoConfig2();
@@ -5070,7 +5070,6 @@ var AudioInner = (props) => {
5070
5070
  from: from ?? 0,
5071
5071
  durationInFrames: basicInfo.duration,
5072
5072
  freeze,
5073
- _remotionInternalStack: stack,
5074
5073
  _remotionInternalIsMedia: isMedia,
5075
5074
  _remotionInternalPremountDisplay: effectivePremountFor || null,
5076
5075
  _remotionInternalPostmountDisplay: effectivePostmountFor || null,
@@ -5089,7 +5088,7 @@ var AudioInner = (props) => {
5089
5088
  name,
5090
5089
  ...otherProps,
5091
5090
  style: premountingStyle,
5092
- stack: stack ?? null,
5091
+ _remotionInternalStack: sourceStack,
5093
5092
  setMediaDurationInSeconds
5094
5093
  })
5095
5094
  })
@@ -5238,7 +5237,7 @@ var VideoForPreviewAssertedShowing = ({
5238
5237
  loop,
5239
5238
  trimAfter,
5240
5239
  trimBefore,
5241
- stack,
5240
+ _remotionInternalStack,
5242
5241
  disallowFallbackToOffthreadVideo,
5243
5242
  fallbackOffthreadVideoProps,
5244
5243
  audioStreamIndex,
@@ -5559,7 +5558,7 @@ var VideoForPreviewAssertedShowing = ({
5559
5558
  name: "<Html5Video> (fallback)",
5560
5559
  loop,
5561
5560
  showInTimeline,
5562
- stack: stack ?? undefined,
5561
+ _remotionInternalStack: _remotionInternalStack ?? undefined,
5563
5562
  ...fallbackOffthreadVideoProps
5564
5563
  });
5565
5564
  }
@@ -5640,7 +5639,7 @@ var VideoForRendering = ({
5640
5639
  fallbackOffthreadVideoProps,
5641
5640
  audioStreamIndex,
5642
5641
  disallowFallbackToOffthreadVideo,
5643
- stack,
5642
+ _remotionInternalStack,
5644
5643
  toneFrequency,
5645
5644
  trimAfterValue,
5646
5645
  trimBeforeValue,
@@ -5921,7 +5920,7 @@ var VideoForRendering = ({
5921
5920
  preservePitch: fallbackOffthreadVideoProps?.preservePitch ?? true,
5922
5921
  startFrom: undefined,
5923
5922
  endAt: undefined,
5924
- stack,
5923
+ _remotionInternalStack,
5925
5924
  _remotionInternalNativeLoopPassed: false
5926
5925
  });
5927
5926
  if (loop) {
@@ -5956,7 +5955,12 @@ var VideoForRendering = ({
5956
5955
 
5957
5956
  // src/video/video.tsx
5958
5957
  import { jsx as jsx6 } from "react/jsx-runtime";
5959
- var { validateMediaTrimProps, resolveTrimProps, validateMediaProps: validateMediaProps2 } = Internals22;
5958
+ var {
5959
+ validateMediaTrimProps,
5960
+ resolveTrimProps,
5961
+ validateMediaProps: validateMediaProps2,
5962
+ useCropStyle
5963
+ } = Internals22;
5960
5964
  var videoSchema = {
5961
5965
  src: {
5962
5966
  type: "asset",
@@ -5988,7 +5992,9 @@ var videoSchema = {
5988
5992
  loop: { type: "boolean", default: false, description: "Loop" },
5989
5993
  ...Internals22.transformSchema,
5990
5994
  ...Interactive2.backgroundSchema,
5991
- ...Interactive2.borderSchema
5995
+ ...Interactive2.borderSchema,
5996
+ ...Interactive2.borderRadiusSchema,
5997
+ ...Interactive2.cropSchema
5992
5998
  };
5993
5999
  var InnerVideo = ({
5994
6000
  src,
@@ -6008,7 +6014,7 @@ var InnerVideo = ({
6008
6014
  trimAfter,
6009
6015
  trimBefore,
6010
6016
  volume,
6011
- stack,
6017
+ _remotionInternalStack,
6012
6018
  toneFrequency,
6013
6019
  showInTimeline,
6014
6020
  debugOverlay,
@@ -6057,7 +6063,7 @@ var InnerVideo = ({
6057
6063
  onVideoFrame,
6058
6064
  playbackRate,
6059
6065
  src,
6060
- stack,
6066
+ _remotionInternalStack,
6061
6067
  style,
6062
6068
  volume,
6063
6069
  toneFrequency,
@@ -6088,7 +6094,7 @@ var InnerVideo = ({
6088
6094
  showInTimeline,
6089
6095
  trimAfter: trimAfterValue,
6090
6096
  trimBefore: trimBeforeValue,
6091
- stack: stack ?? null,
6097
+ _remotionInternalStack: _remotionInternalStack ?? null,
6092
6098
  disallowFallbackToOffthreadVideo,
6093
6099
  fallbackOffthreadVideoProps,
6094
6100
  debugOverlay: debugOverlay ?? false,
@@ -6123,7 +6129,6 @@ var VideoInner = ({
6123
6129
  trimAfter,
6124
6130
  trimBefore,
6125
6131
  volume,
6126
- stack,
6127
6132
  toneFrequency,
6128
6133
  debugOverlay,
6129
6134
  headless,
@@ -6142,8 +6147,13 @@ var VideoInner = ({
6142
6147
  postmountFor,
6143
6148
  styleWhilePremounted,
6144
6149
  styleWhilePostmounted,
6150
+ cropLeft,
6151
+ cropRight,
6152
+ cropTop,
6153
+ cropBottom,
6145
6154
  ...props
6146
6155
  }) => {
6156
+ const sourceStack = controls ? Internals22.getStackForControls(controls) ?? undefined : undefined;
6147
6157
  const fallbackLogLevel = Internals22.useLogLevel();
6148
6158
  const [mediaVolume] = Internals22.useMediaVolumeState();
6149
6159
  const mediaStartsAt = Internals22.useMediaStartsAt();
@@ -6215,6 +6225,14 @@ var VideoInner = ({
6215
6225
  styleWhilePostmounted: styleWhilePostmounted ?? null,
6216
6226
  hideWhilePremounted: "display-none"
6217
6227
  });
6228
+ const croppedStyle = useCropStyle({
6229
+ cropLeft,
6230
+ cropRight,
6231
+ cropTop,
6232
+ cropBottom,
6233
+ style: premountingStyle,
6234
+ componentName: "<Video />"
6235
+ });
6218
6236
  if (sequenceDurationInFrames === 0) {
6219
6237
  return null;
6220
6238
  }
@@ -6226,7 +6244,6 @@ var VideoInner = ({
6226
6244
  from: from ?? 0,
6227
6245
  durationInFrames: videoSequenceDuration,
6228
6246
  freeze,
6229
- _remotionInternalStack: stack,
6230
6247
  _remotionInternalIsMedia: isMedia,
6231
6248
  _remotionInternalPremountDisplay: effectivePremountFor || null,
6232
6249
  _remotionInternalPostmountDisplay: effectivePostmountFor || null,
@@ -6256,12 +6273,12 @@ var VideoInner = ({
6256
6273
  playbackRate: playbackRate ?? 1,
6257
6274
  showInTimeline: showInTimeline ?? true,
6258
6275
  src,
6259
- style: premountingStyle ?? {},
6276
+ style: croppedStyle ?? {},
6260
6277
  trimAfter,
6261
6278
  trimBefore,
6262
6279
  volume: volume ?? 1,
6263
6280
  toneFrequency: toneFrequency ?? 1,
6264
- stack,
6281
+ _remotionInternalStack: sourceStack,
6265
6282
  debugOverlay: debugOverlay ?? false,
6266
6283
  headless: headless ?? false,
6267
6284
  onError,
package/dist/index.d.ts CHANGED
@@ -12,7 +12,6 @@ export declare const experimental_Audio: import("react").ComponentType<{
12
12
  playbackRate?: number | undefined;
13
13
  muted?: boolean | undefined;
14
14
  style?: import("react").CSSProperties | undefined;
15
- stack?: string | undefined;
16
15
  logLevel?: "error" | "info" | "trace" | "verbose" | "warn" | undefined;
17
16
  loop?: boolean | undefined;
18
17
  audioStreamIndex?: number | undefined;
@@ -44,7 +43,6 @@ export declare const experimental_Video: import("react").ComponentType<{
44
43
  delayRenderRetries: number | null;
45
44
  delayRenderTimeoutInMilliseconds: number | null;
46
45
  style: import("react").CSSProperties;
47
- stack: string | undefined;
48
46
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
49
47
  loop: boolean;
50
48
  audioStreamIndex: number;
@@ -62,7 +60,7 @@ export declare const experimental_Video: import("react").ComponentType<{
62
60
  objectFit: import(".").VideoObjectFit;
63
61
  _experimentalInitiallyDrawCachedFrame: boolean;
64
62
  effects: import("remotion").EffectsProp;
65
- }> & Omit<import("react").HTMLAttributes<HTMLElement>, "_experimentalInitiallyDrawCachedFrame" | "audioStreamIndex" | "className" | "credentials" | "debugOverlay" | "delayRenderRetries" | "delayRenderTimeoutInMilliseconds" | "disallowFallbackToOffthreadVideo" | "effects" | "fallbackOffthreadVideoProps" | "headless" | "logLevel" | "loop" | "loopVolumeCurveBehavior" | "muted" | "objectFit" | "onError" | "onVideoFrame" | "playbackRate" | "requestInit" | "showInTimeline" | "src" | "stack" | "style" | "toneFrequency" | "trimAfter" | "trimBefore" | "volume"> & Record<`data-${string}`, string | undefined> & import("remotion").InteractiveBaseProps & import("remotion").InteractivePremountProps>;
63
+ }> & Omit<import("react").HTMLAttributes<HTMLElement>, "_experimentalInitiallyDrawCachedFrame" | "audioStreamIndex" | "className" | "credentials" | "debugOverlay" | "delayRenderRetries" | "delayRenderTimeoutInMilliseconds" | "disallowFallbackToOffthreadVideo" | "effects" | "fallbackOffthreadVideoProps" | "headless" | "logLevel" | "loop" | "loopVolumeCurveBehavior" | "muted" | "objectFit" | "onError" | "onVideoFrame" | "playbackRate" | "requestInit" | "showInTimeline" | "src" | "style" | "toneFrequency" | "trimAfter" | "trimBefore" | "volume"> & Record<`data-${string}`, string | undefined> & import("remotion").InteractiveBaseProps & import("remotion").InteractiveCropProps & import("remotion").InteractivePremountProps>;
66
64
  export { AudioForPreview } from './audio/audio-for-preview';
67
65
  export { AudioProps, FallbackHtml5AudioProps } from './audio/props';
68
66
  export { MediaErrorAction } from './on-error';
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- import type { EffectDefinitionAndStack, EffectsProp, InteractiveBaseProps, InteractivePremountProps, LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, VolumeProp } from 'remotion';
2
+ import type { EffectDefinitionAndStack, EffectsProp, InteractiveBaseProps, InteractiveCropProps, InteractivePremountProps, LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, VolumeProp } from 'remotion';
3
3
  import type { MediaOnError } from '../on-error';
4
4
  import type { MediaRequestInit } from '../request-init';
5
5
  export type MediaErrorEvent = {
@@ -34,10 +34,6 @@ type OptionalVideoProps = {
34
34
  delayRenderRetries: number | null;
35
35
  delayRenderTimeoutInMilliseconds: number | null;
36
36
  style: React.CSSProperties;
37
- /**
38
- * @deprecated For internal use only
39
- */
40
- stack: string | undefined;
41
37
  logLevel: LogLevel;
42
38
  loop: boolean;
43
39
  audioStreamIndex: number;
@@ -63,6 +59,7 @@ type OptionalVideoProps = {
63
59
  export type NativeVideoProps = Omit<React.HTMLAttributes<HTMLElement>, keyof MandatoryVideoProps | keyof OuterVideoProps | keyof OptionalVideoProps | 'onError'> & Record<`data-${string}`, string | undefined>;
64
60
  export type InnerVideoProps = MandatoryVideoProps & OuterVideoProps & Omit<OptionalVideoProps, 'effects'> & NativeVideoProps & {
65
61
  effects: EffectDefinitionAndStack<unknown>[];
62
+ _remotionInternalStack: string | undefined;
66
63
  };
67
- export type VideoProps = MandatoryVideoProps & Partial<OuterVideoProps> & Partial<OptionalVideoProps> & NativeVideoProps & InteractiveBaseProps & InteractivePremountProps;
64
+ export type VideoProps = MandatoryVideoProps & Partial<OuterVideoProps> & Partial<OptionalVideoProps> & NativeVideoProps & InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps;
68
65
  export {};
@@ -17,7 +17,7 @@ type VideoForPreviewProps = NativeVideoProps & {
17
17
  readonly loop: boolean;
18
18
  readonly trimAfter: number | undefined;
19
19
  readonly trimBefore: number | undefined;
20
- readonly stack: string | null;
20
+ readonly _remotionInternalStack: string | null;
21
21
  readonly disallowFallbackToOffthreadVideo: boolean;
22
22
  readonly fallbackOffthreadVideoProps: FallbackOffthreadVideoProps;
23
23
  readonly audioStreamIndex: number;
@@ -19,7 +19,7 @@ type InnerVideoProps = NativeVideoProps & {
19
19
  readonly fallbackOffthreadVideoProps: FallbackOffthreadVideoProps;
20
20
  readonly audioStreamIndex: number;
21
21
  readonly disallowFallbackToOffthreadVideo: boolean;
22
- readonly stack: string | undefined;
22
+ readonly _remotionInternalStack: string | undefined;
23
23
  readonly toneFrequency: number;
24
24
  readonly trimBeforeValue: number | undefined;
25
25
  readonly trimAfterValue: number | undefined;
@@ -16,7 +16,6 @@ export declare const Video: React.ComponentType<{
16
16
  delayRenderRetries: number | null;
17
17
  delayRenderTimeoutInMilliseconds: number | null;
18
18
  style: React.CSSProperties;
19
- stack: string | undefined;
20
19
  logLevel: "error" | "info" | "trace" | "verbose" | "warn";
21
20
  loop: boolean;
22
21
  audioStreamIndex: number;
@@ -34,4 +33,4 @@ export declare const Video: React.ComponentType<{
34
33
  objectFit: import("./props").VideoObjectFit;
35
34
  _experimentalInitiallyDrawCachedFrame: boolean;
36
35
  effects: import("remotion").EffectsProp;
37
- }> & Omit<React.HTMLAttributes<HTMLElement>, "_experimentalInitiallyDrawCachedFrame" | "audioStreamIndex" | "className" | "credentials" | "debugOverlay" | "delayRenderRetries" | "delayRenderTimeoutInMilliseconds" | "disallowFallbackToOffthreadVideo" | "effects" | "fallbackOffthreadVideoProps" | "headless" | "logLevel" | "loop" | "loopVolumeCurveBehavior" | "muted" | "objectFit" | "onError" | "onVideoFrame" | "playbackRate" | "requestInit" | "showInTimeline" | "src" | "stack" | "style" | "toneFrequency" | "trimAfter" | "trimBefore" | "volume"> & Record<`data-${string}`, string | undefined> & import("remotion").InteractiveBaseProps & import("remotion").InteractivePremountProps>;
36
+ }> & Omit<React.HTMLAttributes<HTMLElement>, "_experimentalInitiallyDrawCachedFrame" | "audioStreamIndex" | "className" | "credentials" | "debugOverlay" | "delayRenderRetries" | "delayRenderTimeoutInMilliseconds" | "disallowFallbackToOffthreadVideo" | "effects" | "fallbackOffthreadVideoProps" | "headless" | "logLevel" | "loop" | "loopVolumeCurveBehavior" | "muted" | "objectFit" | "onError" | "onVideoFrame" | "playbackRate" | "requestInit" | "showInTimeline" | "src" | "style" | "toneFrequency" | "trimAfter" | "trimBefore" | "volume"> & Record<`data-${string}`, string | undefined> & import("remotion").InteractiveBaseProps & import("remotion").InteractiveCropProps & import("remotion").InteractivePremountProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/media",
3
- "version": "4.0.499",
3
+ "version": "4.0.501",
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.50.8",
26
- "remotion": "4.0.499",
26
+ "remotion": "4.0.501",
27
27
  "zod": "4.4.3"
28
28
  },
29
29
  "peerDependencies": {
@@ -31,8 +31,8 @@
31
31
  "react-dom": ">=16.8.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@remotion/eslint-config-internal": "4.0.499",
35
- "@remotion/player": "4.0.499",
34
+ "@remotion/eslint-config-internal": "4.0.501",
35
+ "@remotion/player": "4.0.501",
36
36
  "@vitest/browser-webdriverio": "4.0.9",
37
37
  "eslint": "9.19.0",
38
38
  "react": "19.2.3",