remotion 4.0.349 → 4.0.351

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.
@@ -265,5 +265,32 @@ export declare const Internals: {
265
265
  } | null>;
266
266
  readonly RemotionEnvironmentContext: import("react").Context<RemotionEnvironment | null>;
267
267
  readonly warnAboutTooHighVolume: (volume: number) => void;
268
+ readonly AudioForPreview: import("react").ForwardRefExoticComponent<Omit<import("./index.js").NativeAudioProps & {
269
+ name?: string;
270
+ volume?: import("./volume-prop.js").VolumeProp;
271
+ playbackRate?: number;
272
+ acceptableTimeShiftInSeconds?: number;
273
+ allowAmplificationDuringRender?: boolean;
274
+ _remotionInternalNeedsDurationCalculation?: boolean;
275
+ _remotionInternalNativeLoopPassed?: boolean;
276
+ toneFrequency?: number;
277
+ useWebAudioApi?: boolean;
278
+ pauseWhenBuffering?: boolean;
279
+ showInTimeline?: boolean;
280
+ delayRenderTimeoutInMilliseconds?: number;
281
+ delayRenderRetries?: number;
282
+ loopVolumeCurveBehavior?: import("./audio/use-audio-frame.js").LoopVolumeCurveBehavior;
283
+ onError?: (err: Error) => void;
284
+ audioStreamIndex?: number;
285
+ } & {
286
+ readonly shouldPreMountAudioTags: boolean;
287
+ readonly onDuration: (src: string, durationInSeconds: number) => void;
288
+ readonly pauseWhenBuffering: boolean;
289
+ readonly _remotionInternalNativeLoopPassed: boolean;
290
+ readonly _remotionInternalStack: string | null;
291
+ readonly showInTimeline: boolean;
292
+ readonly stack?: string | undefined;
293
+ readonly onNativeError: React.ReactEventHandler<HTMLAudioElement>;
294
+ }, "ref"> & import("react").RefAttributes<HTMLAudioElement>>;
268
295
  };
269
296
  export type { CompositionManagerContext, CompProps, LoggingContextValue, MediaVolumeContextValue, RemotionEnvironment, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TCompMetadata, TComposition, TimelineContextValue, TRenderAsset, TSequence, WatchRemotionStaticFilesPayload, };
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Internals = void 0;
37
37
  const react_1 = require("react");
38
38
  const absolute_src_js_1 = require("./absolute-src.js");
39
+ const AudioForPreview_js_1 = require("./audio/AudioForPreview.js");
39
40
  const shared_audio_tags_js_1 = require("./audio/shared-audio-tags.js");
40
41
  const use_audio_frame_js_1 = require("./audio/use-audio-frame.js");
41
42
  const buffering_js_1 = require("./buffering.js");
@@ -165,4 +166,5 @@ exports.Internals = {
165
166
  compositionSelectorRef,
166
167
  RemotionEnvironmentContext: remotion_environment_context_js_1.RemotionEnvironmentContext,
167
168
  warnAboutTooHighVolume: volume_safeguard_js_1.warnAboutTooHighVolume,
169
+ AudioForPreview: AudioForPreview_js_1.AudioForPreview,
168
170
  };
@@ -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.349";
6
+ export declare const VERSION = "4.0.351";
@@ -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.349';
10
+ exports.VERSION = '4.0.351';
@@ -0,0 +1,4 @@
1
+ export declare const useAudioChannelIndex: ({ ref, audioChannelIndex, }: {
2
+ ref: React.RefObject<HTMLVideoElement | HTMLAudioElement | null>;
3
+ audioChannelIndex: number;
4
+ }) => void;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAudioChannelIndex = void 0;
4
+ const react_1 = require("react");
5
+ const useAudioChannelIndex = ({ ref, audioChannelIndex, }) => {
6
+ (0, react_1.useEffect)(() => {
7
+ var _a;
8
+ // @ts-expect-error
9
+ const audioChannels = (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.audioTracks;
10
+ console.log({ audioChannels, audioChannelIndex });
11
+ }, [ref, audioChannelIndex]);
12
+ };
13
+ exports.useAudioChannelIndex = useAudioChannelIndex;
@@ -105,7 +105,7 @@ function truthy(value) {
105
105
  }
106
106
 
107
107
  // src/version.ts
108
- var VERSION = "4.0.349";
108
+ var VERSION = "4.0.351";
109
109
 
110
110
  // src/multiple-versions-warning.ts
111
111
  var checkMultipleRemotionVersions = () => {
@@ -6483,7 +6483,8 @@ var Internals = {
6483
6483
  timeValueRef,
6484
6484
  compositionSelectorRef,
6485
6485
  RemotionEnvironmentContext,
6486
- warnAboutTooHighVolume
6486
+ warnAboutTooHighVolume,
6487
+ AudioForPreview
6487
6488
  };
6488
6489
  // src/interpolate-colors.ts
6489
6490
  var NUMBER = "[-+]?\\d*\\.?\\d+";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.349";
2
+ var VERSION = "4.0.351";
3
3
  export {
4
4
  VERSION
5
5
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
4
4
  },
5
5
  "name": "remotion",
6
- "version": "4.0.349",
6
+ "version": "4.0.351",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "webpack": "5.96.1",
29
29
  "zod": "3.22.3",
30
30
  "eslint": "9.19.0",
31
- "@remotion/eslint-config-internal": "4.0.349"
31
+ "@remotion/eslint-config-internal": "4.0.351"
32
32
  },
33
33
  "keywords": [
34
34
  "video",