@remotion/media 4.0.471 → 4.0.473

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.
@@ -37,12 +37,13 @@ var __callDispose = (stack, error, hasError) => {
37
37
  };
38
38
 
39
39
  // src/audio/audio.tsx
40
- import { useState as useState3 } from "react";
41
- import { useMemo as useMemo3 } from "react";
40
+ import { useMemo as useMemo3, useState as useState3 } from "react";
42
41
  import {
42
+ Internals as Internals16,
43
+ Sequence,
44
+ useRemotionEnvironment as useRemotionEnvironment2,
43
45
  useVideoConfig as useVideoConfig2
44
46
  } from "remotion";
45
- import { Internals as Internals16, Sequence, useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
46
47
 
47
48
  // src/show-in-timeline.ts
48
49
  import { Internals } from "remotion";
@@ -4567,14 +4568,17 @@ var audioSchema = {
4567
4568
  max: 20,
4568
4569
  step: 0.01,
4569
4570
  default: 1,
4570
- description: "Volume"
4571
+ description: "Volume",
4572
+ hiddenFromList: false
4571
4573
  },
4572
4574
  playbackRate: {
4573
4575
  type: "number",
4574
4576
  min: 0.1,
4575
4577
  step: 0.01,
4576
4578
  default: 1,
4577
- description: "Playback Rate"
4579
+ description: "Playback Rate",
4580
+ hiddenFromList: false,
4581
+ keyframable: false
4578
4582
  },
4579
4583
  loop: { type: "boolean", default: false, description: "Loop" },
4580
4584
  hidden: Internals16.hiddenField
@@ -4659,11 +4663,15 @@ var AudioInner = (props) => {
4659
4663
  })
4660
4664
  });
4661
4665
  };
4662
- var Audio = Internals16.wrapInSchema(AudioInner, audioSchema);
4666
+ var Audio = Internals16.wrapInSchema({
4667
+ Component: AudioInner,
4668
+ schema: audioSchema,
4669
+ supportsEffects: false
4670
+ });
4663
4671
  Internals16.addSequenceStackTraces(Audio);
4664
4672
 
4665
4673
  // src/video/video.tsx
4666
- import React5, { useMemo as useMemo6, useState as useState6 } from "react";
4674
+ import React6, { useMemo as useMemo6, useState as useState6 } from "react";
4667
4675
  import {
4668
4676
  Internals as Internals20,
4669
4677
  Sequence as Sequence2,
@@ -4774,7 +4782,8 @@ var VideoForPreviewAssertedShowing = ({
4774
4782
  _experimentalInitiallyDrawCachedFrame,
4775
4783
  effects,
4776
4784
  setMediaDurationInSeconds,
4777
- refForOutline
4785
+ refForOutline,
4786
+ ...props
4778
4787
  }) => {
4779
4788
  const src = usePreload2(unpreloadedSrc);
4780
4789
  const canvasRef = useRef2(null);
@@ -4867,8 +4876,8 @@ var VideoForPreviewAssertedShowing = ({
4867
4876
  if (!_experimentalInitiallyDrawCachedFrame) {
4868
4877
  return;
4869
4878
  }
4870
- const canvas = canvasRef.current;
4871
4879
  return () => {
4880
+ const canvas = canvasRef.current;
4872
4881
  if (!canvas || !hasDrawnRealFrameRef.current || isPremountingRef.current) {
4873
4882
  return;
4874
4883
  }
@@ -5072,6 +5081,7 @@ var VideoForPreviewAssertedShowing = ({
5072
5081
  }, [objectFitProp, style]);
5073
5082
  if (shouldFallbackToNativeVideo && !disallowFallbackToOffthreadVideo) {
5074
5083
  return /* @__PURE__ */ jsx4(Html5Video, {
5084
+ ...props,
5075
5085
  ref: fallbackVideoRef,
5076
5086
  src,
5077
5087
  style: actualStyle,
@@ -5093,6 +5103,7 @@ var VideoForPreviewAssertedShowing = ({
5093
5103
  return null;
5094
5104
  }
5095
5105
  return /* @__PURE__ */ jsx4("canvas", {
5106
+ ...props,
5096
5107
  ref: canvasRefCallback,
5097
5108
  style: actualStyle,
5098
5109
  className: classNameValue
@@ -5174,7 +5185,8 @@ var VideoForRendering = ({
5174
5185
  credentials,
5175
5186
  requestInit,
5176
5187
  objectFit: objectFitProp,
5177
- effects
5188
+ effects,
5189
+ ...props
5178
5190
  }) => {
5179
5191
  if (!src) {
5180
5192
  throw new TypeError("No `src` was passed to <Video>.");
@@ -5409,6 +5421,7 @@ var VideoForRendering = ({
5409
5421
  }, [objectFitProp, style]);
5410
5422
  if (replaceWithOffthreadVideo) {
5411
5423
  const fallback = /* @__PURE__ */ jsx5(Internals19.InnerOffthreadVideo, {
5424
+ ...props,
5412
5425
  src,
5413
5426
  playbackRate: playbackRate ?? 1,
5414
5427
  muted: muted ?? false,
@@ -5464,6 +5477,7 @@ var VideoForRendering = ({
5464
5477
  return null;
5465
5478
  }
5466
5479
  return /* @__PURE__ */ jsx5("canvas", {
5480
+ ...props,
5467
5481
  ref: canvasRef,
5468
5482
  style: styleWithObjectFit,
5469
5483
  className: classNameValue
@@ -5480,14 +5494,17 @@ var videoSchema = {
5480
5494
  max: 20,
5481
5495
  step: 0.01,
5482
5496
  default: 1,
5483
- description: "Volume"
5497
+ description: "Volume",
5498
+ hiddenFromList: false
5484
5499
  },
5485
5500
  playbackRate: {
5486
5501
  type: "number",
5487
5502
  min: 0.1,
5488
5503
  step: 0.01,
5489
5504
  default: 1,
5490
- description: "Playback Rate"
5505
+ description: "Playback Rate",
5506
+ hiddenFromList: false,
5507
+ keyframable: false
5491
5508
  },
5492
5509
  hidden: {
5493
5510
  type: "boolean",
@@ -5528,7 +5545,8 @@ var InnerVideo = ({
5528
5545
  _experimentalInitiallyDrawCachedFrame,
5529
5546
  effects,
5530
5547
  setMediaDurationInSeconds,
5531
- refForOutline
5548
+ refForOutline,
5549
+ ...props
5532
5550
  }) => {
5533
5551
  const environment = useRemotionEnvironment4();
5534
5552
  if (typeof src !== "string") {
@@ -5549,6 +5567,7 @@ var InnerVideo = ({
5549
5567
  validateMediaProps2({ playbackRate, volume }, "Video");
5550
5568
  if (environment.isRendering) {
5551
5569
  return /* @__PURE__ */ jsx6(VideoForRendering, {
5570
+ ...props,
5552
5571
  audioStreamIndex: audioStreamIndex ?? 0,
5553
5572
  className,
5554
5573
  delayRenderRetries: delayRenderRetries ?? null,
@@ -5577,6 +5596,7 @@ var InnerVideo = ({
5577
5596
  });
5578
5597
  }
5579
5598
  return /* @__PURE__ */ jsx6(VideoForPreview, {
5599
+ ...props,
5580
5600
  setMediaDurationInSeconds,
5581
5601
  audioStreamIndex: audioStreamIndex ?? 0,
5582
5602
  className,
@@ -5640,7 +5660,8 @@ var VideoInner = ({
5640
5660
  effects,
5641
5661
  durationInFrames,
5642
5662
  from,
5643
- hidden
5663
+ hidden,
5664
+ ...props
5644
5665
  }) => {
5645
5666
  const fallbackLogLevel = Internals20.useLogLevel();
5646
5667
  const [mediaVolume] = Internals20.useMediaVolumeState();
@@ -5687,7 +5708,7 @@ var VideoInner = ({
5687
5708
  overrideId: controls?.overrideId ?? null
5688
5709
  });
5689
5710
  const memoizedEffectDefinitions = Internals20.useMemoizedEffectDefinitions(effects ?? []);
5690
- const refForOutline = React5.useRef(null);
5711
+ const refForOutline = React6.useRef(null);
5691
5712
  if (sequenceDurationInFrames === 0) {
5692
5713
  return null;
5693
5714
  }
@@ -5706,6 +5727,7 @@ var VideoInner = ({
5706
5727
  showInTimeline: showInTimeline ?? true,
5707
5728
  hidden,
5708
5729
  children: /* @__PURE__ */ jsx6(InnerVideo, {
5730
+ ...props,
5709
5731
  audioStreamIndex: audioStreamIndex ?? 0,
5710
5732
  className,
5711
5733
  delayRenderRetries: delayRenderRetries ?? null,
@@ -5740,7 +5762,11 @@ var VideoInner = ({
5740
5762
  })
5741
5763
  });
5742
5764
  };
5743
- var Video = Internals20.wrapInSchema(VideoInner, videoSchema);
5765
+ var Video = Internals20.wrapInSchema({
5766
+ Component: VideoInner,
5767
+ schema: videoSchema,
5768
+ supportsEffects: true
5769
+ });
5744
5770
  Internals20.addSequenceStackTraces(Video);
5745
5771
 
5746
5772
  // src/index.ts
package/dist/index.d.ts CHANGED
@@ -62,7 +62,7 @@ export declare const experimental_Video: import("react").ComponentType<{
62
62
  objectFit: import(".").VideoObjectFit;
63
63
  _experimentalInitiallyDrawCachedFrame: boolean;
64
64
  effects: import("remotion").EffectsProp;
65
- }> & Pick<import("remotion").SequenceProps, "durationInFrames" | "from" | "hidden" | "name">>;
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> & Pick<import("remotion").SequenceProps, "durationInFrames" | "from" | "hidden" | "name">>;
66
66
  export { AudioForPreview } from './audio/audio-for-preview';
67
67
  export { AudioProps, FallbackHtml5AudioProps } from './audio/props';
68
68
  export { MediaErrorAction } from './on-error';
@@ -1,3 +1,4 @@
1
+ import type React from 'react';
1
2
  import type { EffectDefinitionAndStack, EffectsProp, LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, SequenceProps, VolumeProp } from 'remotion';
2
3
  import type { MediaOnError } from '../on-error';
3
4
  import type { MediaRequestInit } from '../request-init';
@@ -59,8 +60,9 @@ type OptionalVideoProps = {
59
60
  _experimentalInitiallyDrawCachedFrame: boolean;
60
61
  effects: EffectsProp;
61
62
  };
62
- export type InnerVideoProps = MandatoryVideoProps & OuterVideoProps & Omit<OptionalVideoProps, 'effects'> & {
63
+ export type NativeVideoProps = Omit<React.HTMLAttributes<HTMLElement>, keyof MandatoryVideoProps | keyof OuterVideoProps | keyof OptionalVideoProps | 'onError'> & Record<`data-${string}`, string | undefined>;
64
+ export type InnerVideoProps = MandatoryVideoProps & OuterVideoProps & Omit<OptionalVideoProps, 'effects'> & NativeVideoProps & {
63
65
  effects: EffectDefinitionAndStack<unknown>[];
64
66
  };
65
- export type VideoProps = MandatoryVideoProps & Partial<OuterVideoProps> & Partial<OptionalVideoProps> & Pick<SequenceProps, 'durationInFrames' | 'from' | 'name' | 'hidden'>;
67
+ export type VideoProps = MandatoryVideoProps & Partial<OuterVideoProps> & Partial<OptionalVideoProps> & NativeVideoProps & Pick<SequenceProps, 'durationInFrames' | 'from' | 'name' | 'hidden'>;
66
68
  export {};
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import type { EffectDefinitionAndStack, LogLevel, LoopVolumeCurveBehavior, SequenceControls, VolumeProp } from 'remotion';
3
3
  import { type MediaOnError } from '../on-error';
4
4
  import type { MediaRequestInit } from '../request-init';
5
- import type { FallbackOffthreadVideoProps, VideoObjectFit } from './props';
6
- type VideoForPreviewProps = {
5
+ import type { FallbackOffthreadVideoProps, NativeVideoProps, VideoObjectFit } from './props';
6
+ type VideoForPreviewProps = NativeVideoProps & {
7
7
  readonly src: string;
8
8
  readonly style: React.CSSProperties | undefined;
9
9
  readonly playbackRate: number;
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import type { EffectDefinitionAndStack, LogLevel, LoopVolumeCurveBehavior, OnVideoFrame, VolumeProp } from 'remotion';
3
3
  import { type MediaOnError } from '../on-error';
4
4
  import type { MediaRequestInit } from '../request-init';
5
- import type { FallbackOffthreadVideoProps, VideoObjectFit } from './props';
6
- type InnerVideoProps = {
5
+ import type { FallbackOffthreadVideoProps, NativeVideoProps, VideoObjectFit } from './props';
6
+ type InnerVideoProps = NativeVideoProps & {
7
7
  readonly className: string | undefined;
8
8
  readonly loop: boolean;
9
9
  readonly src: string;
@@ -32,4 +32,4 @@ export declare const Video: React.ComponentType<{
32
32
  objectFit: import("./props").VideoObjectFit;
33
33
  _experimentalInitiallyDrawCachedFrame: boolean;
34
34
  effects: import("remotion").EffectsProp;
35
- }> & Pick<import("remotion").SequenceProps, "durationInFrames" | "from" | "hidden" | "name">>;
35
+ }> & 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> & Pick<import("remotion").SequenceProps, "durationInFrames" | "from" | "hidden" | "name">>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/media",
3
- "version": "4.0.471",
3
+ "version": "4.0.473",
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.471",
26
+ "remotion": "4.0.473",
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.471",
34
+ "@remotion/eslint-config-internal": "4.0.473",
35
35
  "@vitest/browser-webdriverio": "4.0.9",
36
36
  "eslint": "9.19.0",
37
37
  "react": "19.2.3",