@remotion/media 4.0.460 → 4.0.461

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.
@@ -5435,6 +5435,7 @@ var VideoInner = ({
5435
5435
  type: "video",
5436
5436
  data: basicInfo
5437
5437
  }), [basicInfo]);
5438
+ const memoizedEffects = Internals20.useMemoizedEffects(Internals20.flattenEffects(_experimentalEffects ?? []));
5438
5439
  if (sequenceDurationInFrames === 0) {
5439
5440
  return null;
5440
5441
  }
@@ -5447,6 +5448,7 @@ var VideoInner = ({
5447
5448
  name: name ?? "<Video>",
5448
5449
  _experimentalControls: controls,
5449
5450
  _remotionInternalLoopDisplay: loopDisplay,
5451
+ _experimentalEffects: memoizedEffects,
5450
5452
  showInTimeline: showInTimeline ?? true,
5451
5453
  children: /* @__PURE__ */ jsx6(InnerVideo, {
5452
5454
  audioStreamIndex: audioStreamIndex ?? 0,
@@ -5476,7 +5478,7 @@ var VideoInner = ({
5476
5478
  _experimentalControls: controls,
5477
5479
  objectFit: objectFit ?? "contain",
5478
5480
  _experimentalInitiallyDrawCachedFrame: _experimentalInitiallyDrawCachedFrame ?? false,
5479
- _experimentalEffects: _experimentalEffects ?? [],
5481
+ _experimentalEffects: memoizedEffects,
5480
5482
  setMediaDurationInSeconds
5481
5483
  })
5482
5484
  });
package/dist/index.d.ts CHANGED
@@ -59,7 +59,7 @@ export declare const experimental_Video: import("react").ComponentType<{
59
59
  credentials: RequestCredentials | undefined;
60
60
  objectFit: import(".").VideoObjectFit;
61
61
  _experimentalInitiallyDrawCachedFrame: boolean;
62
- _experimentalEffects: import("remotion").EffectsProp;
62
+ _experimentalEffects: import("remotion").EffectDescriptor<unknown>[];
63
63
  }> & Pick<import("remotion").SequenceProps, "durationInFrames" | "from" | "name">>;
64
64
  export { AudioForPreview } from './audio/audio-for-preview';
65
65
  export { AudioProps, FallbackHtml5AudioProps } from './audio/props';
@@ -1,6 +1,5 @@
1
- import type { LogLevel, useBufferState } from 'remotion';
1
+ import type { EffectDefinitionAndStack, LogLevel, useBufferState } from 'remotion';
2
2
  import type { EffectChainState } from 'remotion';
3
- import type { EffectsProp } from 'remotion';
4
3
  import { type AudioIteratorManager } from './audio-iterator-manager';
5
4
  import type { SharedAudioContextForMediaPlayer } from './shared-audio-context-for-media-player';
6
5
  import type { VideoIteratorManager } from './video-iterator-manager';
@@ -71,7 +70,7 @@ export declare class MediaPlayer {
71
70
  sequenceOffset: number;
72
71
  credentials: RequestCredentials | undefined;
73
72
  tagType: 'audio' | 'video';
74
- getEffects: () => EffectsProp;
73
+ getEffects: () => EffectDefinitionAndStack<unknown>[];
75
74
  getEffectChainState: (width: number, height: number) => EffectChainState | null;
76
75
  getCurrentFrame: () => number;
77
76
  });
@@ -0,0 +1,21 @@
1
+ import type { EffectDefinitionAndStack, LoopDisplay, SequenceControls } from 'remotion';
2
+ import { type VolumeProp } from 'remotion';
3
+ export declare const useMediaInTimeline: ({ volume, mediaVolume, src, mediaType, playbackRate, displayName, stack, showInTimeline, premountDisplay, postmountDisplay, loopDisplay, trimBefore, trimAfter, controls, _experimentalEffects, }: {
4
+ volume: VolumeProp | undefined;
5
+ mediaVolume: number;
6
+ src: string | undefined;
7
+ mediaType: "audio" | "video";
8
+ playbackRate: number;
9
+ displayName: string | null;
10
+ stack: string | null;
11
+ showInTimeline: boolean;
12
+ premountDisplay: number | null;
13
+ postmountDisplay: number | null;
14
+ loopDisplay: LoopDisplay | undefined;
15
+ trimBefore: number | undefined;
16
+ trimAfter: number | undefined;
17
+ controls: SequenceControls | undefined;
18
+ _experimentalEffects: EffectDefinitionAndStack<unknown>[];
19
+ }) => {
20
+ id: string;
21
+ };
@@ -1,5 +1,4 @@
1
- import type { LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, SequenceProps, VolumeProp } from 'remotion';
2
- import type { EffectsProp } from 'remotion';
1
+ import type { EffectDefinitionAndStack, EffectDescriptor, LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, SequenceProps, VolumeProp } from 'remotion';
3
2
  import type { MediaOnError } from '../on-error';
4
3
  export type MediaErrorEvent = {
5
4
  error: Error;
@@ -51,8 +50,10 @@ type OptionalVideoProps = {
51
50
  credentials: RequestCredentials | undefined;
52
51
  objectFit: VideoObjectFit;
53
52
  _experimentalInitiallyDrawCachedFrame: boolean;
54
- _experimentalEffects: EffectsProp;
53
+ _experimentalEffects: EffectDescriptor<unknown>[];
54
+ };
55
+ export type InnerVideoProps = MandatoryVideoProps & OuterVideoProps & Omit<OptionalVideoProps, '_experimentalEffects'> & {
56
+ _experimentalEffects: EffectDefinitionAndStack<unknown>[];
55
57
  };
56
- export type InnerVideoProps = MandatoryVideoProps & OuterVideoProps & OptionalVideoProps;
57
58
  export type VideoProps = MandatoryVideoProps & Partial<OuterVideoProps> & Partial<OptionalVideoProps> & Pick<SequenceProps, 'durationInFrames' | 'from' | 'name'>;
58
59
  export {};
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { EffectsProp, LogLevel, LoopVolumeCurveBehavior, SequenceControls, VolumeProp } from 'remotion';
2
+ import type { EffectDefinitionAndStack, LogLevel, LoopVolumeCurveBehavior, SequenceControls, VolumeProp } from 'remotion';
3
3
  import { type MediaOnError } from '../on-error';
4
4
  import type { FallbackOffthreadVideoProps, VideoObjectFit } from './props';
5
5
  type VideoForPreviewProps = {
@@ -27,7 +27,7 @@ type VideoForPreviewProps = {
27
27
  readonly objectFit: VideoObjectFit;
28
28
  readonly setMediaDurationInSeconds: (durationInSeconds: number) => void;
29
29
  readonly _experimentalInitiallyDrawCachedFrame: boolean;
30
- readonly _experimentalEffects: EffectsProp;
30
+ readonly _experimentalEffects: EffectDefinitionAndStack<unknown>[];
31
31
  };
32
32
  export declare const VideoForPreview: React.FC<VideoForPreviewProps & {
33
33
  readonly controls: SequenceControls | undefined;
@@ -30,5 +30,5 @@ export declare const Video: React.ComponentType<{
30
30
  credentials: RequestCredentials | undefined;
31
31
  objectFit: import("./props").VideoObjectFit;
32
32
  _experimentalInitiallyDrawCachedFrame: boolean;
33
- _experimentalEffects: import("remotion").EffectsProp;
33
+ _experimentalEffects: import("remotion").EffectDescriptor<unknown>[];
34
34
  }> & Pick<import("remotion").SequenceProps, "durationInFrames" | "from" | "name">>;
@@ -1,5 +1,5 @@
1
1
  import type { InputVideoTrack, WrappedCanvas } from 'mediabunny';
2
- import type { EffectChainState, EffectsProp } from 'remotion';
2
+ import type { EffectChainState, EffectDefinitionAndStack } from 'remotion';
3
3
  import type { DelayPlaybackIfNotPremounting } from './delay-playback-if-not-premounting';
4
4
  import type { Nonce } from './nonce-manager';
5
5
  export declare const videoIteratorManager: ({ delayPlaybackHandleIfNotPremounting, canvas, context, drawDebugOverlay, logLevel, getOnVideoFrameCallback, videoTrack, getLoopSegmentMediaEndTimestamp, getStartTime, getIsLooping, getEffects, getEffectChainState, getCurrentFrame, }: {
@@ -13,7 +13,7 @@ export declare const videoIteratorManager: ({ delayPlaybackHandleIfNotPremountin
13
13
  getLoopSegmentMediaEndTimestamp: () => number;
14
14
  getStartTime: () => number;
15
15
  getIsLooping: () => boolean;
16
- getEffects: () => EffectsProp;
16
+ getEffects: () => EffectDefinitionAndStack<unknown>[];
17
17
  getEffectChainState: (width: number, height: number) => EffectChainState | null;
18
18
  getCurrentFrame: () => number;
19
19
  }) => Promise<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/media",
3
- "version": "4.0.460",
3
+ "version": "4.0.461",
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.42.0",
26
- "remotion": "4.0.460",
26
+ "remotion": "4.0.461",
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.460",
34
+ "@remotion/eslint-config-internal": "4.0.461",
35
35
  "@vitest/browser-webdriverio": "4.0.9",
36
36
  "eslint": "9.19.0",
37
37
  "react": "19.2.3",
@@ -1,37 +0,0 @@
1
- import type { InputAudioTrack, InputVideoTrack } from 'mediabunny';
2
- import { AudioBufferSink, CanvasSink, Input } from 'mediabunny';
3
- type VideoSinkBundle = {
4
- videoTrack: InputVideoTrack;
5
- canvasSink: CanvasSink;
6
- };
7
- type AudioSinkBundle = {
8
- audioTrack: InputAudioTrack;
9
- audioSink: AudioBufferSink;
10
- };
11
- export declare const acquireInput: ({ src, credentials, }: {
12
- src: string;
13
- credentials: RequestCredentials | undefined;
14
- }) => Input<import("mediabunny").Source>;
15
- export declare const releaseInput: ({ src, credentials, }: {
16
- src: string;
17
- credentials: RequestCredentials | undefined;
18
- }) => void;
19
- export declare const acquireVideoSink: ({ src, credentials, }: {
20
- src: string;
21
- credentials: RequestCredentials | undefined;
22
- }) => Promise<VideoSinkBundle | null>;
23
- export declare const releaseVideoSink: ({ src, credentials, }: {
24
- src: string;
25
- credentials: RequestCredentials | undefined;
26
- }) => void;
27
- export declare const acquireAudioSink: ({ src, credentials, audioStreamIndex, }: {
28
- src: string;
29
- credentials: RequestCredentials | undefined;
30
- audioStreamIndex: number | null;
31
- }) => Promise<AudioSinkBundle | null>;
32
- export declare const releaseAudioSink: ({ src, credentials, audioStreamIndex, }: {
33
- src: string;
34
- credentials: RequestCredentials | undefined;
35
- audioStreamIndex: number | null;
36
- }) => void;
37
- export {};