remotion 4.0.467 → 4.0.469

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.
@@ -26,6 +26,14 @@ export type TranslateFieldSchema = {
26
26
  default: string | undefined;
27
27
  description?: string;
28
28
  };
29
+ export type UvCoordinateFieldSchema = {
30
+ type: 'uv-coordinate';
31
+ min?: number;
32
+ max?: number;
33
+ step?: number;
34
+ default: readonly [number, number] | undefined;
35
+ description?: string;
36
+ };
29
37
  export type ColorFieldSchema = {
30
38
  type: 'color';
31
39
  default: string | undefined;
@@ -37,7 +45,7 @@ export type EnumFieldSchema = {
37
45
  description?: string;
38
46
  variants: Record<string, SequenceSchema>;
39
47
  };
40
- export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationFieldSchema | TranslateFieldSchema | ColorFieldSchema | EnumFieldSchema;
48
+ export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationFieldSchema | TranslateFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | EnumFieldSchema;
41
49
  export type SequenceFieldSchema = VisibleFieldSchema | HiddenFieldSchema;
42
50
  export type SequenceSchema = {
43
51
  [key: string]: SequenceFieldSchema;
@@ -0,0 +1 @@
1
+ export declare function truncateSrcForLabel(src: string): string;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.truncateSrcForLabel = truncateSrcForLabel;
4
+ // Data URLs like the ones from canvas.toDataURL() can be many megabytes, which makes the delayRender() label
5
+ // unreadable and bloats log output
6
+ function truncateSrcForLabel(src) {
7
+ if (src.startsWith('data:') && src.length > 100) {
8
+ return src.slice(0, 60) + '...[' + src.length + ' chars total]';
9
+ }
10
+ return src;
11
+ }
@@ -24,7 +24,7 @@ export declare const useBasicMediaInTimeline: ({ volume, mediaVolume, mediaType,
24
24
  playbackRate: number;
25
25
  };
26
26
  export type BasicMediaInTimelineReturnType = ReturnType<typeof useBasicMediaInTimeline>;
27
- export declare const useMediaInTimeline: ({ volume, mediaVolume, src, mediaType, playbackRate, displayName, id, getStack, showInTimeline, premountDisplay, postmountDisplay, loopDisplay, documentationLink, }: {
27
+ export declare const useMediaInTimeline: ({ volume, mediaVolume, src, mediaType, playbackRate, displayName, id, getStack, showInTimeline, premountDisplay, postmountDisplay, loopDisplay, documentationLink, refForOutline, }: {
28
28
  volume: VolumeProp | undefined;
29
29
  mediaVolume: number;
30
30
  src: string | undefined;
@@ -38,4 +38,5 @@ export declare const useMediaInTimeline: ({ volume, mediaVolume, src, mediaType,
38
38
  postmountDisplay: number | null;
39
39
  loopDisplay: LoopDisplay | undefined;
40
40
  documentationLink: string | null;
41
+ refForOutline: React.RefObject<HTMLElement | null> | null;
41
42
  }) => void;
@@ -86,7 +86,7 @@ const useBasicMediaInTimeline = ({ volume, mediaVolume, mediaType, src, displayN
86
86
  return memoizedResult;
87
87
  };
88
88
  exports.useBasicMediaInTimeline = useBasicMediaInTimeline;
89
- const useMediaInTimeline = ({ volume, mediaVolume, src, mediaType, playbackRate, displayName, id, getStack, showInTimeline, premountDisplay, postmountDisplay, loopDisplay, documentationLink, }) => {
89
+ const useMediaInTimeline = ({ volume, mediaVolume, src, mediaType, playbackRate, displayName, id, getStack, showInTimeline, premountDisplay, postmountDisplay, loopDisplay, documentationLink, refForOutline, }) => {
90
90
  const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
91
91
  const startsAt = (0, use_audio_frame_js_1.useMediaStartsAt)();
92
92
  const { registerSequence, unregisterSequence } = (0, react_1.useContext)(SequenceManager_js_1.SequenceManager);
@@ -139,6 +139,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, src, mediaType, playbackRate,
139
139
  postmountDisplay,
140
140
  controls: null,
141
141
  effects: [],
142
+ refForOutline,
142
143
  });
143
144
  return () => {
144
145
  unregisterSequence(id);
@@ -165,6 +166,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, src, mediaType, playbackRate,
165
166
  rootId,
166
167
  finalDisplayName,
167
168
  isStudio,
169
+ refForOutline,
168
170
  ]);
169
171
  };
170
172
  exports.useMediaInTimeline = useMediaInTimeline;
@@ -1,3 +1,4 @@
1
+ import type { ExtrapolateType } from './interpolate.js';
1
2
  import type { SequenceSchema } from './sequence-field-schema.js';
2
3
  import type { CanUpdateSequencePropsResponse, SequencePropsSubscriptionKey } from './SequenceManager.js';
3
4
  export type CanUpdateSequencePropStatusTrue = {
@@ -8,11 +9,23 @@ export type CanUpdateSequencePropStatusKeyframe = {
8
9
  frame: number;
9
10
  value: unknown;
10
11
  };
11
- export type CanUpdateSequencePropStatusFalse = {
12
+ export type CanUpdateSequencePropStatusEasing = 'linear' | [number, number, number, number];
13
+ export type CanUpdateSequencePropStatusClamping = {
14
+ left: ExtrapolateType;
15
+ right: ExtrapolateType;
16
+ };
17
+ export type CanUpdateSequencePropStatusComputed = {
12
18
  canUpdate: false;
13
19
  reason: 'computed';
14
- keyframes?: CanUpdateSequencePropStatusKeyframe[];
15
20
  };
21
+ export type CanUpdateSequencePropStatusKeyframed = {
22
+ canUpdate: false;
23
+ reason: 'keyframed';
24
+ keyframes: CanUpdateSequencePropStatusKeyframe[];
25
+ easing: CanUpdateSequencePropStatusEasing[];
26
+ clamping: CanUpdateSequencePropStatusClamping;
27
+ };
28
+ export type CanUpdateSequencePropStatusFalse = CanUpdateSequencePropStatusComputed | CanUpdateSequencePropStatusKeyframed;
16
29
  export type CanUpdateSequencePropStatus = CanUpdateSequencePropStatusTrue | CanUpdateSequencePropStatusFalse;
17
30
  export type DragOverrides = Record<string, Record<string, unknown>>;
18
31
  export type EffectDragOverrides = Record<string, Record<string, unknown>>;
@@ -3,4 +3,4 @@
3
3
  * @see [Documentation](https://remotion.dev/docs/version)
4
4
  * @returns {string} The current version of the remotion package
5
5
  */
6
- export declare const VERSION = "4.0.467";
6
+ export declare const VERSION = "4.0.469";
@@ -7,4 +7,4 @@ exports.VERSION = void 0;
7
7
  * @see [Documentation](https://remotion.dev/docs/version)
8
8
  * @returns {string} The current version of the remotion package
9
9
  */
10
- exports.VERSION = '4.0.467';
10
+ exports.VERSION = '4.0.469';
@@ -74,7 +74,7 @@ crossOrigin, audioStreamIndex, preservePitch: _preservePitch, ...props }) => {
74
74
  mediaFrame: frame,
75
75
  playbackRate,
76
76
  toneFrequency,
77
- audioStartFrame: Math.max(0, -((_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _a !== void 0 ? _a : 0)),
77
+ audioStartFrame: Math.max(0, -((_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedNegativeFrom) !== null && _a !== void 0 ? _a : 0)),
78
78
  audioStreamIndex,
79
79
  });
80
80
  return () => unregisterRenderAsset(id);
@@ -89,7 +89,7 @@ crossOrigin, audioStreamIndex, preservePitch: _preservePitch, ...props }) => {
89
89
  absoluteFrame,
90
90
  playbackRate,
91
91
  toneFrequency,
92
- sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
92
+ sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedNegativeFrom,
93
93
  audioStreamIndex,
94
94
  ]);
95
95
  const currentTime = (0, react_1.useMemo)(() => {
@@ -136,6 +136,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
136
136
  ? 'https://www.remotion.dev/docs/offthreadvideo'
137
137
  : 'https://www.remotion.dev/docs/html5-video'
138
138
  : null,
139
+ refForOutline: videoRef,
139
140
  });
140
141
  // putting playback before useVolume
141
142
  // because volume looks at playbackrate
@@ -76,7 +76,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
76
76
  mediaFrame: frame,
77
77
  playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
78
78
  toneFrequency: toneFrequency !== null && toneFrequency !== void 0 ? toneFrequency : 1,
79
- audioStartFrame: Math.max(0, -((_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _a !== void 0 ? _a : 0)),
79
+ audioStartFrame: Math.max(0, -((_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedNegativeFrom) !== null && _a !== void 0 ? _a : 0)),
80
80
  audioStreamIndex: audioStreamIndex !== null && audioStreamIndex !== void 0 ? audioStreamIndex : 0,
81
81
  });
82
82
  return () => unregisterRenderAsset(id);
@@ -91,7 +91,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
91
91
  absoluteFrame,
92
92
  playbackRate,
93
93
  toneFrequency,
94
- sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
94
+ sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedNegativeFrom,
95
95
  audioStreamIndex,
96
96
  ]);
97
97
  (0, react_1.useImperativeHandle)(ref, () => {