@remotion/media 4.0.460 → 4.0.462

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,11 @@ var VideoInner = ({
5435
5435
  type: "video",
5436
5436
  data: basicInfo
5437
5437
  }), [basicInfo]);
5438
+ const memoizedEffects = Internals20.useMemoizedEffects({
5439
+ effects: _experimentalEffects ?? [],
5440
+ overrideId: controls?.overrideId ?? null
5441
+ });
5442
+ const memoizedEffectDefinitions = Internals20.useMemoizedEffectDefinitions(_experimentalEffects ?? []);
5438
5443
  if (sequenceDurationInFrames === 0) {
5439
5444
  return null;
5440
5445
  }
@@ -5447,6 +5452,7 @@ var VideoInner = ({
5447
5452
  name: name ?? "<Video>",
5448
5453
  _experimentalControls: controls,
5449
5454
  _remotionInternalLoopDisplay: loopDisplay,
5455
+ _experimentalEffects: memoizedEffectDefinitions,
5450
5456
  showInTimeline: showInTimeline ?? true,
5451
5457
  children: /* @__PURE__ */ jsx6(InnerVideo, {
5452
5458
  audioStreamIndex: audioStreamIndex ?? 0,
@@ -5476,7 +5482,7 @@ var VideoInner = ({
5476
5482
  _experimentalControls: controls,
5477
5483
  objectFit: objectFit ?? "contain",
5478
5484
  _experimentalInitiallyDrawCachedFrame: _experimentalInitiallyDrawCachedFrame ?? false,
5479
- _experimentalEffects: _experimentalEffects ?? [],
5485
+ _experimentalEffects: memoizedEffects,
5480
5486
  setMediaDurationInSeconds
5481
5487
  })
5482
5488
  });
@@ -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
  });
@@ -1,5 +1,4 @@
1
- import type { LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, SequenceProps, VolumeProp } from 'remotion';
2
- import type { EffectsProp } from 'remotion';
1
+ import type { EffectDefinitionAndStack, EffectsProp, LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, SequenceProps, VolumeProp } from 'remotion';
3
2
  import type { MediaOnError } from '../on-error';
4
3
  export type MediaErrorEvent = {
5
4
  error: Error;
@@ -53,6 +52,8 @@ type OptionalVideoProps = {
53
52
  _experimentalInitiallyDrawCachedFrame: boolean;
54
53
  _experimentalEffects: EffectsProp;
55
54
  };
56
- export type InnerVideoProps = MandatoryVideoProps & OuterVideoProps & OptionalVideoProps;
55
+ export type InnerVideoProps = MandatoryVideoProps & OuterVideoProps & Omit<OptionalVideoProps, '_experimentalEffects'> & {
56
+ _experimentalEffects: EffectDefinitionAndStack<unknown>[];
57
+ };
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;
@@ -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.462",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/esm/index.mjs",
@@ -22,8 +22,8 @@
22
22
  "make": "tsgo && bun --env-file=../.env.bundle bundle.ts"
23
23
  },
24
24
  "dependencies": {
25
- "mediabunny": "1.42.0",
26
- "remotion": "4.0.460",
25
+ "mediabunny": "1.45.0",
26
+ "remotion": "4.0.462",
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.462",
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 {};