remotion 4.0.446 → 4.0.448

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.
@@ -24,6 +24,7 @@ export type CalcMetadataReturnType<T extends Record<string, unknown>> = {
24
24
  defaultVideoImageFormat?: VideoImageFormat;
25
25
  defaultPixelFormat?: PixelFormat;
26
26
  defaultProResProfile?: ProResProfile;
27
+ defaultSampleRate?: number;
27
28
  };
28
29
  export type CalculateMetadataFunction<T extends Record<string, unknown>> = (options: {
29
30
  defaultProps: T;
@@ -4,7 +4,7 @@ import type { AnyComposition, TComposition } from './CompositionManager.js';
4
4
  import type { TFolder } from './Folder.js';
5
5
  import type { NonceHistory } from './nonce.js';
6
6
  import type { VideoConfig } from './video-config.js';
7
- export type BaseMetadata = Pick<VideoConfig, 'durationInFrames' | 'fps' | 'props' | 'height' | 'width' | 'defaultCodec' | 'defaultOutName' | 'defaultVideoImageFormat' | 'defaultPixelFormat' | 'defaultProResProfile'>;
7
+ export type BaseMetadata = Pick<VideoConfig, 'durationInFrames' | 'fps' | 'props' | 'height' | 'width' | 'defaultCodec' | 'defaultOutName' | 'defaultVideoImageFormat' | 'defaultPixelFormat' | 'defaultProResProfile' | 'defaultSampleRate'>;
8
8
  export type CanvasContent = {
9
9
  type: 'composition';
10
10
  compositionId: string;
@@ -75,6 +75,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
75
75
  defaultVideoImageFormat: null,
76
76
  defaultPixelFormat: null,
77
77
  defaultProResProfile: null,
78
+ defaultSampleRate: null,
78
79
  },
79
80
  };
80
81
  }
@@ -55,6 +55,7 @@ declare global {
55
55
  remotion_envVariables: string;
56
56
  remotion_isMainTab: boolean;
57
57
  remotion_mediaCacheSizeInBytes: number | null;
58
+ remotion_sampleRate: number;
58
59
  remotion_initialMemoryAvailable: number | null;
59
60
  remotion_collectAssets: () => TRenderAsset[];
60
61
  remotion_isPlayer: boolean;
@@ -80,6 +81,7 @@ export type BundleCompositionState = {
80
81
  compositionDefaultVideoImageFormat: VideoImageFormat | null;
81
82
  compositionDefaultPixelFormat: PixelFormat | null;
82
83
  compositionDefaultProResProfile: ProResProfile | null;
84
+ compositionDefaultSampleRate: number | null;
83
85
  };
84
86
  export type BundleIndexState = {
85
87
  type: 'index';
@@ -28,6 +28,7 @@ const validateCalculated = ({ calculated, compositionId, compositionFps, composi
28
28
  const defaultVideoImageFormat = calculated === null || calculated === void 0 ? void 0 : calculated.defaultVideoImageFormat;
29
29
  const defaultPixelFormat = calculated === null || calculated === void 0 ? void 0 : calculated.defaultPixelFormat;
30
30
  const defaultProResProfile = calculated === null || calculated === void 0 ? void 0 : calculated.defaultProResProfile;
31
+ const defaultSampleRate = calculated === null || calculated === void 0 ? void 0 : calculated.defaultSampleRate;
31
32
  return {
32
33
  width,
33
34
  height,
@@ -38,10 +39,11 @@ const validateCalculated = ({ calculated, compositionId, compositionFps, composi
38
39
  defaultVideoImageFormat,
39
40
  defaultPixelFormat,
40
41
  defaultProResProfile,
42
+ defaultSampleRate,
41
43
  };
42
44
  };
43
45
  const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, inputProps: originalProps, compositionId, compositionDurationInFrames, compositionFps, compositionHeight, compositionWidth, }) => {
44
- var _a, _b, _c, _d, _e, _f;
46
+ var _a, _b, _c, _d, _e, _f, _g;
45
47
  const calculatedProm = calculateMetadata
46
48
  ? calculateMetadata({
47
49
  defaultProps,
@@ -56,7 +58,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, inputProp
56
58
  'then' in calculatedProm) {
57
59
  return calculatedProm.then((c) => {
58
60
  var _a;
59
- const { height, width, durationInFrames, fps, defaultCodec, defaultOutName, defaultVideoImageFormat, defaultPixelFormat, defaultProResProfile, } = validateCalculated({
61
+ const { height, width, durationInFrames, fps, defaultCodec, defaultOutName, defaultVideoImageFormat, defaultPixelFormat, defaultProResProfile, defaultSampleRate, } = validateCalculated({
60
62
  calculated: c,
61
63
  compositionDurationInFrames,
62
64
  compositionFps,
@@ -77,6 +79,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, inputProp
77
79
  defaultVideoImageFormat: defaultVideoImageFormat !== null && defaultVideoImageFormat !== void 0 ? defaultVideoImageFormat : null,
78
80
  defaultPixelFormat: defaultPixelFormat !== null && defaultPixelFormat !== void 0 ? defaultPixelFormat : null,
79
81
  defaultProResProfile: defaultProResProfile !== null && defaultProResProfile !== void 0 ? defaultProResProfile : null,
82
+ defaultSampleRate: defaultSampleRate !== null && defaultSampleRate !== void 0 ? defaultSampleRate : null,
80
83
  };
81
84
  });
82
85
  }
@@ -99,6 +102,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, inputProp
99
102
  defaultVideoImageFormat: null,
100
103
  defaultPixelFormat: null,
101
104
  defaultProResProfile: null,
105
+ defaultSampleRate: null,
102
106
  };
103
107
  }
104
108
  return {
@@ -111,6 +115,7 @@ const resolveVideoConfig = ({ calculateMetadata, signal, defaultProps, inputProp
111
115
  defaultVideoImageFormat: (_d = calculatedProm.defaultVideoImageFormat) !== null && _d !== void 0 ? _d : null,
112
116
  defaultPixelFormat: (_e = calculatedProm.defaultPixelFormat) !== null && _e !== void 0 ? _e : null,
113
117
  defaultProResProfile: (_f = calculatedProm.defaultProResProfile) !== null && _f !== void 0 ? _f : null,
118
+ defaultSampleRate: (_g = calculatedProm.defaultSampleRate) !== null && _g !== void 0 ? _g : null,
114
119
  };
115
120
  };
116
121
  exports.resolveVideoConfig = resolveVideoConfig;
@@ -15,7 +15,7 @@ const useUnsafeVideoConfig = () => {
15
15
  if (!video) {
16
16
  return null;
17
17
  }
18
- const { id, durationInFrames, fps, height, width, defaultProps, props, defaultCodec, defaultOutName, defaultVideoImageFormat, defaultPixelFormat, defaultProResProfile, } = video;
18
+ const { id, durationInFrames, fps, height, width, defaultProps, props, defaultCodec, defaultOutName, defaultVideoImageFormat, defaultPixelFormat, defaultProResProfile, defaultSampleRate, } = video;
19
19
  return {
20
20
  id,
21
21
  width: ctxWidth !== null && ctxWidth !== void 0 ? ctxWidth : width,
@@ -29,6 +29,7 @@ const useUnsafeVideoConfig = () => {
29
29
  defaultVideoImageFormat,
30
30
  defaultPixelFormat,
31
31
  defaultProResProfile,
32
+ defaultSampleRate,
32
33
  };
33
34
  }, [ctxDuration, ctxHeight, ctxWidth, video]);
34
35
  };
@@ -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.446";
6
+ export declare const VERSION = "4.0.448";
@@ -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.446';
10
+ exports.VERSION = '4.0.448';
@@ -14,4 +14,5 @@ export type VideoConfig = {
14
14
  defaultVideoImageFormat: VideoImageFormat | null;
15
15
  defaultPixelFormat: PixelFormat | null;
16
16
  defaultProResProfile: ProResProfile | null;
17
+ defaultSampleRate: number | null;
17
18
  };
@@ -709,7 +709,8 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
709
709
  defaultOutName: null,
710
710
  defaultVideoImageFormat: null,
711
711
  defaultPixelFormat: null,
712
- defaultProResProfile: null
712
+ defaultProResProfile: null,
713
+ defaultSampleRate: null
713
714
  }
714
715
  };
715
716
  }
@@ -1237,7 +1238,7 @@ var addSequenceStackTraces = (component) => {
1237
1238
  };
1238
1239
 
1239
1240
  // src/version.ts
1240
- var VERSION = "4.0.446";
1241
+ var VERSION = "4.0.448";
1241
1242
 
1242
1243
  // src/multiple-versions-warning.ts
1243
1244
  var checkMultipleRemotionVersions = () => {
@@ -1526,7 +1527,8 @@ var useUnsafeVideoConfig = () => {
1526
1527
  defaultOutName,
1527
1528
  defaultVideoImageFormat,
1528
1529
  defaultPixelFormat,
1529
- defaultProResProfile
1530
+ defaultProResProfile,
1531
+ defaultSampleRate
1530
1532
  } = video;
1531
1533
  return {
1532
1534
  id,
@@ -1540,7 +1542,8 @@ var useUnsafeVideoConfig = () => {
1540
1542
  defaultOutName,
1541
1543
  defaultVideoImageFormat,
1542
1544
  defaultPixelFormat,
1543
- defaultProResProfile
1545
+ defaultProResProfile,
1546
+ defaultSampleRate
1544
1547
  };
1545
1548
  }, [ctxDuration, ctxHeight, ctxWidth, video]);
1546
1549
  };
@@ -6381,6 +6384,7 @@ var validateCalculated = ({
6381
6384
  const defaultVideoImageFormat = calculated?.defaultVideoImageFormat;
6382
6385
  const defaultPixelFormat = calculated?.defaultPixelFormat;
6383
6386
  const defaultProResProfile = calculated?.defaultProResProfile;
6387
+ const defaultSampleRate = calculated?.defaultSampleRate;
6384
6388
  return {
6385
6389
  width,
6386
6390
  height,
@@ -6390,7 +6394,8 @@ var validateCalculated = ({
6390
6394
  defaultOutName,
6391
6395
  defaultVideoImageFormat,
6392
6396
  defaultPixelFormat,
6393
- defaultProResProfile
6397
+ defaultProResProfile,
6398
+ defaultSampleRate
6394
6399
  };
6395
6400
  };
6396
6401
  var resolveVideoConfig = ({
@@ -6422,7 +6427,8 @@ var resolveVideoConfig = ({
6422
6427
  defaultOutName,
6423
6428
  defaultVideoImageFormat,
6424
6429
  defaultPixelFormat,
6425
- defaultProResProfile
6430
+ defaultProResProfile,
6431
+ defaultSampleRate
6426
6432
  } = validateCalculated({
6427
6433
  calculated: c2,
6428
6434
  compositionDurationInFrames,
@@ -6443,7 +6449,8 @@ var resolveVideoConfig = ({
6443
6449
  defaultOutName: defaultOutName ?? null,
6444
6450
  defaultVideoImageFormat: defaultVideoImageFormat ?? null,
6445
6451
  defaultPixelFormat: defaultPixelFormat ?? null,
6446
- defaultProResProfile: defaultProResProfile ?? null
6452
+ defaultProResProfile: defaultProResProfile ?? null,
6453
+ defaultSampleRate: defaultSampleRate ?? null
6447
6454
  };
6448
6455
  });
6449
6456
  }
@@ -6465,7 +6472,8 @@ var resolveVideoConfig = ({
6465
6472
  defaultOutName: null,
6466
6473
  defaultVideoImageFormat: null,
6467
6474
  defaultPixelFormat: null,
6468
- defaultProResProfile: null
6475
+ defaultProResProfile: null,
6476
+ defaultSampleRate: null
6469
6477
  };
6470
6478
  }
6471
6479
  return {
@@ -6477,7 +6485,8 @@ var resolveVideoConfig = ({
6477
6485
  defaultOutName: calculatedProm.defaultOutName ?? null,
6478
6486
  defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
6479
6487
  defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
6480
- defaultProResProfile: calculatedProm.defaultProResProfile ?? null
6488
+ defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
6489
+ defaultSampleRate: calculatedProm.defaultSampleRate ?? null
6481
6490
  };
6482
6491
  };
6483
6492
  var resolveVideoConfigOrCatch = (params) => {
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.446";
2
+ var VERSION = "4.0.448";
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.446",
6
+ "version": "4.0.448",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  "react-dom": "19.2.3",
36
36
  "webpack": "5.105.0",
37
37
  "zod": "4.3.6",
38
- "@remotion/eslint-config-internal": "4.0.446",
38
+ "@remotion/eslint-config-internal": "4.0.448",
39
39
  "eslint": "9.19.0",
40
40
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
41
41
  },