@remotion/player 4.0.536 → 4.0.538

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.
Files changed (37) hide show
  1. package/dist/cjs/BufferingIndicator.js +3 -5
  2. package/dist/cjs/DefaultPlayPauseButton.js +3 -3
  3. package/dist/cjs/EmitterProvider.js +1 -1
  4. package/dist/cjs/MediaVolumeSlider.js +2 -2
  5. package/dist/cjs/PlaybackrateControl.js +5 -7
  6. package/dist/cjs/Player.d.ts +6 -1
  7. package/dist/cjs/Player.js +6 -4
  8. package/dist/cjs/PlayerControls.js +3 -11
  9. package/dist/cjs/PlayerSeekBar.js +1 -5
  10. package/dist/cjs/PlayerTimeLabel.js +1 -1
  11. package/dist/cjs/PlayerUI.d.ts +3 -3
  12. package/dist/cjs/PlayerUI.js +4 -7
  13. package/dist/cjs/SharedPlayerContext.d.ts +1 -0
  14. package/dist/cjs/SharedPlayerContext.js +2 -2
  15. package/dist/cjs/Thumbnail.d.ts +1 -1
  16. package/dist/cjs/Thumbnail.js +1 -1
  17. package/dist/cjs/ThumbnailUI.d.ts +1 -1
  18. package/dist/cjs/ThumbnailUI.js +3 -3
  19. package/dist/cjs/calculate-scale.d.ts +11 -11
  20. package/dist/cjs/error-boundary.js +5 -2
  21. package/dist/cjs/event-emitter.js +88 -84
  22. package/dist/cjs/icons.js +9 -13
  23. package/dist/cjs/index.d.ts +14 -32
  24. package/dist/cjs/index.js +2 -2
  25. package/dist/cjs/license-blacklist.js +1 -1
  26. package/dist/cjs/player-css-classname.d.ts +1 -1
  27. package/dist/cjs/render-volume-slider.js +3 -5
  28. package/dist/cjs/set-global-time-anchor.d.ts +2 -1
  29. package/dist/cjs/use-hover-state.d.ts +1 -1
  30. package/dist/cjs/use-playback.d.ts +2 -1
  31. package/dist/cjs/use-playback.js +64 -39
  32. package/dist/cjs/use-player-methods.js +9 -8
  33. package/dist/cjs/use-remotion-license-acknowledge.d.ts +2 -1
  34. package/dist/cjs/utils/calculate-player-size.d.ts +4 -3
  35. package/dist/cjs/volume-persistence.d.ts +2 -1
  36. package/dist/esm/index.mjs +84 -56
  37. package/package.json +5 -5
@@ -5,13 +5,15 @@ const react_1 = require("react");
5
5
  const remotion_1 = require("remotion");
6
6
  const emitter_context_js_1 = require("./emitter-context.js");
7
7
  const usePlayerMethods = () => {
8
- var _a;
8
+ var _a, _b, _c;
9
9
  const seekFrame = remotion_1.Internals.Timeline.useTimelineSeekFrame();
10
10
  const { setPlaying, frameRef, audioAndVideoTags, isPlaying: readIsPlaying, isBuffering, } = (0, react_1.useContext)(remotion_1.Internals.SetTimelineContext);
11
11
  const audioContext = (0, react_1.useContext)(remotion_1.Internals.SharedAudioContext);
12
12
  const audioTagsContext = (0, react_1.useContext)(remotion_1.Internals.SharedAudioTagsContext);
13
13
  const environment = (0, remotion_1.useRemotionEnvironment)();
14
14
  const video = remotion_1.Internals.useVideo();
15
+ const videoId = (_a = video === null || video === void 0 ? void 0 : video.id) !== null && _a !== void 0 ? _a : null;
16
+ const videoDurationInFrames = (_b = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _b !== void 0 ? _b : null;
15
17
  const config = remotion_1.Internals.useUnsafeVideoConfig();
16
18
  const emitter = (0, react_1.useContext)(emitter_context_js_1.PlayerEventEmitterContext);
17
19
  const playStart = (0, react_1.useRef)(0);
@@ -22,16 +24,16 @@ const usePlayerMethods = () => {
22
24
  }
23
25
  const getCurrentFrame = (0, react_1.useCallback)(() => {
24
26
  var _a, _b, _c;
25
- if (!video) {
27
+ if (videoId === null || videoDurationInFrames === null) {
26
28
  return ((_a = fallbackFrame.current) !== null && _a !== void 0 ? _a : (typeof window === 'undefined'
27
29
  ? 0
28
30
  : ((_b = window.remotion_initialFrame) !== null && _b !== void 0 ? _b : 0)));
29
31
  }
30
- const unclamped = (_c = frameRef.current[video.id]) !== null && _c !== void 0 ? _c : (environment.isPlayer
32
+ const unclamped = (_c = frameRef.current[videoId]) !== null && _c !== void 0 ? _c : (environment.isPlayer
31
33
  ? 0
32
- : remotion_1.Internals.Timeline.getFrameForComposition(video.id));
33
- return remotion_1.Internals.Timeline.clampFrameToCompositionRange(unclamped, video.durationInFrames);
34
- }, [environment.isPlayer, frameRef, video]);
34
+ : remotion_1.Internals.Timeline.getFrameForComposition(videoId));
35
+ return remotion_1.Internals.Timeline.clampFrameToCompositionRange(unclamped, videoDurationInFrames);
36
+ }, [environment.isPlayer, frameRef, videoId, videoDurationInFrames]);
35
37
  const seek = (0, react_1.useCallback)((newFrame) => {
36
38
  const frameToSeekTo = config
37
39
  ? remotion_1.Internals.TimelinePosition.clampFrameToCompositionRange(newFrame, config.durationInFrames)
@@ -120,8 +122,7 @@ const usePlayerMethods = () => {
120
122
  }
121
123
  }
122
124
  }, [config, emitter, frameRef, readIsPlaying, setPlaying, seekFrame]);
123
- const videoId = video === null || video === void 0 ? void 0 : video.id;
124
- const lastFrame = ((_a = config === null || config === void 0 ? void 0 : config.durationInFrames) !== null && _a !== void 0 ? _a : 1) - 1;
125
+ const lastFrame = ((_c = config === null || config === void 0 ? void 0 : config.durationInFrames) !== null && _c !== void 0 ? _c : 1) - 1;
125
126
  const frameBack = (0, react_1.useCallback)((frames) => {
126
127
  var _a, _b;
127
128
  if (!videoId) {
@@ -1 +1,2 @@
1
- export declare const acknowledgeRemotionLicenseMessage: (acknowledge: boolean, logLevel: "error" | "info" | "trace" | "verbose" | "warn") => void;
1
+ import { type LogLevel } from 'remotion';
2
+ export declare const acknowledgeRemotionLicenseMessage: (acknowledge: boolean, logLevel: LogLevel) => void;
@@ -1,8 +1,9 @@
1
+ import type { StandardLonghandProperties } from 'csstype';
1
2
  import type { Size } from './use-element-size.js';
2
3
  export declare const calculatePlayerSize: ({ currentSize, width, height, compositionWidth, compositionHeight, }: {
3
4
  currentSize: Size | null;
4
- width: import("csstype").Property.Width<0 | (string & {})> | undefined;
5
- height: import("csstype").Property.Height<0 | (string & {})> | undefined;
5
+ width: StandardLonghandProperties['width'] | undefined;
6
+ height: StandardLonghandProperties['height'] | undefined;
6
7
  compositionWidth: number;
7
8
  compositionHeight: number;
8
- }) => import("react").CSSProperties;
9
+ }) => React.CSSProperties;
@@ -1,2 +1,3 @@
1
- export declare const persistVolume: (volume: number, logLevel: "error" | "info" | "trace" | "verbose" | "warn", volumePersistenceKey: string | null) => void;
1
+ import { type LogLevel } from 'remotion';
2
+ export declare const persistVolume: (volume: number, logLevel: LogLevel, volumePersistenceKey: string | null) => void;
2
3
  export declare const getPreferredVolume: (volumePersistenceKey: string | null) => number;
@@ -577,6 +577,8 @@ var usePlayerMethods = () => {
577
577
  const audioTagsContext = useContext2(Internals3.SharedAudioTagsContext);
578
578
  const environment = useRemotionEnvironment();
579
579
  const video = Internals3.useVideo();
580
+ const videoId = video?.id ?? null;
581
+ const videoDurationInFrames = video?.durationInFrames ?? null;
580
582
  const config = Internals3.useUnsafeVideoConfig();
581
583
  const emitter = useContext2(PlayerEventEmitterContext);
582
584
  const playStart = useRef(0);
@@ -586,12 +588,12 @@ var usePlayerMethods = () => {
586
588
  throw new TypeError("Expected Player event emitter context");
587
589
  }
588
590
  const getCurrentFrame = useCallback(() => {
589
- if (!video) {
591
+ if (videoId === null || videoDurationInFrames === null) {
590
592
  return fallbackFrame.current ?? (typeof window === "undefined" ? 0 : window.remotion_initialFrame ?? 0);
591
593
  }
592
- const unclamped = frameRef.current[video.id] ?? (environment.isPlayer ? 0 : Internals3.Timeline.getFrameForComposition(video.id));
593
- return Internals3.Timeline.clampFrameToCompositionRange(unclamped, video.durationInFrames);
594
- }, [environment.isPlayer, frameRef, video]);
594
+ const unclamped = frameRef.current[videoId] ?? (environment.isPlayer ? 0 : Internals3.Timeline.getFrameForComposition(videoId));
595
+ return Internals3.Timeline.clampFrameToCompositionRange(unclamped, videoDurationInFrames);
596
+ }, [environment.isPlayer, frameRef, videoId, videoDurationInFrames]);
595
597
  const seek = useCallback((newFrame) => {
596
598
  const frameToSeekTo = config ? Internals3.TimelinePosition.clampFrameToCompositionRange(newFrame, config.durationInFrames) : Math.max(0, newFrame);
597
599
  fallbackFrame.current = frameToSeekTo;
@@ -667,7 +669,6 @@ var usePlayerMethods = () => {
667
669
  }
668
670
  }
669
671
  }, [config, emitter, frameRef, readIsPlaying, setPlaying, seekFrame]);
670
- const videoId = video?.id;
671
672
  const lastFrame = (config?.durationInFrames ?? 1) - 1;
672
673
  const frameBack = useCallback((frames) => {
673
674
  if (!videoId) {
@@ -954,6 +955,9 @@ var usePlayback = ({
954
955
  muted
955
956
  }) => {
956
957
  const config = Internals6.useUnsafeVideoConfig();
958
+ const fps = config?.fps ?? null;
959
+ const durationInFrames = config?.durationInFrames ?? null;
960
+ const compositionId = config?.id ?? null;
957
961
  const frame = Internals6.Timeline.useTimelinePosition();
958
962
  const playing = Internals6.usePlaying();
959
963
  const { pause, emitter, isPlaying } = usePlayerMethods();
@@ -964,6 +968,9 @@ var usePlayback = ({
964
968
  const logLevel = Internals6.useLogLevel();
965
969
  const isBackgroundedRef = useIsBackgrounded();
966
970
  const lastTimeUpdateTimestamp = useRef4(0);
971
+ const playbackClockRef = useRef4(null);
972
+ const previousMutedRef = useRef4(muted);
973
+ const anchoredAudioContextRef = useRef4(null);
967
974
  useBrowserMediaSession({
968
975
  browserMediaControlsBehavior,
969
976
  playbackRate,
@@ -976,7 +983,7 @@ var usePlayback = ({
976
983
  if (!sharedAudioContext.audioContext) {
977
984
  return;
978
985
  }
979
- if (!config) {
986
+ if (fps === null) {
980
987
  return;
981
988
  }
982
989
  if (muted) {
@@ -985,7 +992,7 @@ var usePlayback = ({
985
992
  const changed = setGlobalTimeAnchor({
986
993
  audioContext: sharedAudioContext.audioContext,
987
994
  audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
988
- absoluteTimeInSeconds: frame / config.fps,
995
+ absoluteTimeInSeconds: frame / fps,
989
996
  globalPlaybackRate: playbackRate,
990
997
  logLevel,
991
998
  force: false
@@ -993,13 +1000,13 @@ var usePlayback = ({
993
1000
  if (changed) {
994
1001
  sharedAudioContext.audioSyncAnchorEmitter.dispatch("changed");
995
1002
  }
996
- }, [config, frame, logLevel, playbackRate, sharedAudioContext, muted]);
1003
+ }, [fps, frame, logLevel, playbackRate, sharedAudioContext, muted]);
997
1004
  useLayoutEffect2(() => {
998
1005
  const audioContext = sharedAudioContext?.audioContext;
999
1006
  if (!audioContext) {
1000
1007
  return;
1001
1008
  }
1002
- if (!config) {
1009
+ if (fps === null) {
1003
1010
  return;
1004
1011
  }
1005
1012
  if (muted) {
@@ -1011,7 +1018,7 @@ var usePlayback = ({
1011
1018
  const changed = setGlobalTimeAnchor({
1012
1019
  audioContext,
1013
1020
  audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
1014
- absoluteTimeInSeconds: getCurrentFrame() / config.fps,
1021
+ absoluteTimeInSeconds: getCurrentFrame() / fps,
1015
1022
  globalPlaybackRate: playbackRate,
1016
1023
  logLevel,
1017
1024
  force: true
@@ -1025,40 +1032,49 @@ var usePlayback = ({
1025
1032
  return () => {
1026
1033
  audioContext?.removeEventListener("statechange", callback);
1027
1034
  };
1028
- }, [
1029
- config,
1030
- getCurrentFrame,
1031
- logLevel,
1032
- muted,
1033
- playbackRate,
1034
- sharedAudioContext
1035
- ]);
1035
+ }, [fps, getCurrentFrame, logLevel, muted, playbackRate, sharedAudioContext]);
1036
1036
  useEffect5(() => {
1037
- if (!config) {
1037
+ const wasMuted = previousMutedRef.current;
1038
+ previousMutedRef.current = muted;
1039
+ if (fps === null || durationInFrames === null || compositionId === null) {
1040
+ playbackClockRef.current = null;
1038
1041
  return;
1039
1042
  }
1040
1043
  if (!playing) {
1044
+ playbackClockRef.current = null;
1041
1045
  sharedAudioContext?.suspend?.();
1042
1046
  return;
1043
1047
  }
1048
+ const previousClock = playbackClockRef.current;
1049
+ const shouldRestartClock = previousClock === null || previousClock.compositionId !== compositionId || previousClock.fps !== fps || previousClock.playbackRate !== playbackRate;
1050
+ const clock = shouldRestartClock ? {
1051
+ compositionId,
1052
+ startedTime: performance.now(),
1053
+ framesAdvanced: 0,
1054
+ fps,
1055
+ playbackRate
1056
+ } : previousClock;
1057
+ playbackClockRef.current = clock;
1044
1058
  if (sharedAudioContext?._experimentalKeepAudioContextAlive && sharedAudioContext.audioContext && !muted) {
1059
+ const didUnmute = wasMuted && !muted;
1060
+ const didReplaceAudioContext = anchoredAudioContextRef.current !== sharedAudioContext.audioContext;
1061
+ const shouldRescheduleAudio = shouldRestartClock || didUnmute || didReplaceAudioContext;
1045
1062
  const changed = setGlobalTimeAnchor({
1046
1063
  audioContext: sharedAudioContext.audioContext,
1047
1064
  audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
1048
- absoluteTimeInSeconds: getCurrentFrame() / config.fps,
1065
+ absoluteTimeInSeconds: getCurrentFrame() / fps,
1049
1066
  globalPlaybackRate: playbackRate,
1050
1067
  logLevel,
1051
- force: true
1068
+ force: shouldRescheduleAudio
1052
1069
  });
1053
- if (changed) {
1070
+ anchoredAudioContextRef.current = sharedAudioContext.audioContext;
1071
+ if (changed || shouldRescheduleAudio) {
1054
1072
  sharedAudioContext.audioSyncAnchorEmitter.dispatch("changed");
1055
1073
  }
1056
1074
  }
1057
1075
  let hasBeenStopped = false;
1058
1076
  let audioContextFailed = false;
1059
1077
  let reqAnimFrameCall = null;
1060
- let startedTime = performance.now();
1061
- let framesAdvanced = 0;
1062
1078
  let playbackFrame = getCurrentFrame();
1063
1079
  let lastSeekRevision = seek?.revision.current ?? null;
1064
1080
  const cancelQueuedFrame = () => {
@@ -1085,8 +1101,8 @@ var usePlayback = ({
1085
1101
  if (!muted && !audioContextFailed && !isBuffering()) {
1086
1102
  sharedAudioContext?.resume?.();
1087
1103
  }
1088
- const time = performance.now() - startedTime;
1089
- const actualLastFrame = outFrame ?? config.durationInFrames - 1;
1104
+ const time = performance.now() - clock.startedTime;
1105
+ const actualLastFrame = outFrame ?? durationInFrames - 1;
1090
1106
  const actualFirstFrame = inFrame ?? 0;
1091
1107
  const seekRevision = seek?.revision.current ?? null;
1092
1108
  if (seekRevision !== lastSeekRevision) {
@@ -1098,17 +1114,17 @@ var usePlayback = ({
1098
1114
  time,
1099
1115
  currentFrame,
1100
1116
  playbackSpeed: playbackRate,
1101
- fps: config.fps,
1117
+ fps,
1102
1118
  actualFirstFrame,
1103
1119
  actualLastFrame,
1104
- framesAdvanced,
1120
+ framesAdvanced: clock.framesAdvanced,
1105
1121
  shouldLoop: loop
1106
1122
  });
1107
- framesAdvanced += framesToAdvance;
1123
+ clock.framesAdvanced += framesToAdvance;
1108
1124
  const frameToDisplay = hasEnded && !moveToBeginningWhenEnded ? playbackRate > 0 ? actualLastFrame : actualFirstFrame : nextFrame;
1109
1125
  if (frameToDisplay !== currentFrame && !isBuffering()) {
1110
1126
  playbackFrame = frameToDisplay;
1111
- setFrameFromPlayback((c) => ({ ...c, [config.id]: frameToDisplay }));
1127
+ setFrameFromPlayback((c) => ({ ...c, [compositionId]: frameToDisplay }));
1112
1128
  }
1113
1129
  if (hasEnded) {
1114
1130
  stop();
@@ -1133,8 +1149,8 @@ var usePlayback = ({
1133
1149
  sharedAudioContext?.suspend();
1134
1150
  setPlayerMuted(true);
1135
1151
  }
1136
- startedTime = performance.now();
1137
- framesAdvanced = 0;
1152
+ clock.startedTime = performance.now();
1153
+ clock.framesAdvanced = 0;
1138
1154
  queueNextFrame();
1139
1155
  });
1140
1156
  return;
@@ -1151,8 +1167,8 @@ var usePlayback = ({
1151
1167
  if (!muted && !audioContextFailed && sharedAudioContext?._experimentalKeepAudioContextAlive) {
1152
1168
  sharedAudioContext.resume();
1153
1169
  }
1154
- startedTime = performance.now();
1155
- framesAdvanced = 0;
1170
+ clock.startedTime = performance.now();
1171
+ clock.framesAdvanced = 0;
1156
1172
  queueNextFrame();
1157
1173
  });
1158
1174
  return;
@@ -1160,7 +1176,7 @@ var usePlayback = ({
1160
1176
  if (isBackgroundedRef.current) {
1161
1177
  reqAnimFrameCall = {
1162
1178
  type: "timeout",
1163
- id: setTimeout(callback, 1000 / config.fps)
1179
+ id: setTimeout(callback, 1000 / fps)
1164
1180
  };
1165
1181
  return;
1166
1182
  }
@@ -1180,7 +1196,9 @@ var usePlayback = ({
1180
1196
  stop();
1181
1197
  };
1182
1198
  }, [
1183
- config,
1199
+ compositionId,
1200
+ durationInFrames,
1201
+ fps,
1184
1202
  loop,
1185
1203
  pause,
1186
1204
  playing,
@@ -3122,6 +3140,7 @@ var SharedPlayerContexts = ({
3122
3140
  children,
3123
3141
  timelineContext,
3124
3142
  playbackRateContext,
3143
+ preservePitch,
3125
3144
  fps,
3126
3145
  compositionHeight,
3127
3146
  compositionWidth,
@@ -3230,26 +3249,29 @@ var SharedPlayerContexts = ({
3230
3249
  value: timelineContext,
3231
3250
  children: /* @__PURE__ */ jsx13(Internals13.PlaybackRateContext.Provider, {
3232
3251
  value: playbackRateContext,
3233
- children: /* @__PURE__ */ jsx13(Internals13.TimelineContext.Provider, {
3234
- value: timelineContext,
3235
- children: /* @__PURE__ */ jsx13(Internals13.CompositionManager.Provider, {
3236
- value: compositionManagerContext,
3237
- children: /* @__PURE__ */ jsx13(Internals13.VideoProvider, {
3238
- children: /* @__PURE__ */ jsx13(Internals13.PrefetchProvider, {
3239
- children: /* @__PURE__ */ jsx13(Internals13.DurationsContextProvider, {
3240
- children: /* @__PURE__ */ jsx13(Internals13.MediaVolumeContext.Provider, {
3241
- value: mediaVolumeContextValue,
3242
- children: /* @__PURE__ */ jsx13(Internals13.SetMediaVolumeContext.Provider, {
3243
- value: setMediaVolumeContextValue,
3244
- children: /* @__PURE__ */ jsx13(Internals13.BufferingProvider, {
3245
- children: /* @__PURE__ */ jsx13(Internals13.SharedAudioContextProvider, {
3246
- audioLatencyHint,
3247
- audioEnabled: shouldCreateAudioContext,
3248
- previewSampleRate: sampleRate,
3249
- _experimentalKeepAudioContextAlive,
3250
- children: /* @__PURE__ */ jsx13(Internals13.SharedAudioTagsContextProvider, {
3251
- numberOfAudioTags: numberOfSharedAudioTags,
3252
- children
3252
+ children: /* @__PURE__ */ jsx13(Internals13.PlaybackPitchContext.Provider, {
3253
+ value: preservePitch,
3254
+ children: /* @__PURE__ */ jsx13(Internals13.TimelineContext.Provider, {
3255
+ value: timelineContext,
3256
+ children: /* @__PURE__ */ jsx13(Internals13.CompositionManager.Provider, {
3257
+ value: compositionManagerContext,
3258
+ children: /* @__PURE__ */ jsx13(Internals13.VideoProvider, {
3259
+ children: /* @__PURE__ */ jsx13(Internals13.PrefetchProvider, {
3260
+ children: /* @__PURE__ */ jsx13(Internals13.DurationsContextProvider, {
3261
+ children: /* @__PURE__ */ jsx13(Internals13.MediaVolumeContext.Provider, {
3262
+ value: mediaVolumeContextValue,
3263
+ children: /* @__PURE__ */ jsx13(Internals13.SetMediaVolumeContext.Provider, {
3264
+ value: setMediaVolumeContextValue,
3265
+ children: /* @__PURE__ */ jsx13(Internals13.BufferingProvider, {
3266
+ children: /* @__PURE__ */ jsx13(Internals13.SharedAudioContextProvider, {
3267
+ audioLatencyHint,
3268
+ audioEnabled: shouldCreateAudioContext,
3269
+ previewSampleRate: sampleRate,
3270
+ _experimentalKeepAudioContextAlive,
3271
+ children: /* @__PURE__ */ jsx13(Internals13.SharedAudioTagsContextProvider, {
3272
+ numberOfAudioTags: numberOfSharedAudioTags,
3273
+ children
3274
+ })
3253
3275
  })
3254
3276
  })
3255
3277
  })
@@ -3418,6 +3440,7 @@ var PlayerFn = ({
3418
3440
  numberOfSharedAudioTags = NoReactInternals2.ENABLE_V5_BREAKING_CHANGES ? 0 : 5,
3419
3441
  errorFallback = () => "⚠️",
3420
3442
  playbackRate = 1,
3443
+ preservePitch = false,
3421
3444
  renderLoading,
3422
3445
  className,
3423
3446
  showPosterWhenUnplayed,
@@ -3512,6 +3535,9 @@ var PlayerFn = ({
3512
3535
  if (typeof controls !== "boolean" && typeof controls !== "undefined") {
3513
3536
  throw new TypeError(`'controls' must be a boolean or undefined but got '${typeof controls}' instead`);
3514
3537
  }
3538
+ if (typeof preservePitch !== "boolean") {
3539
+ throw new TypeError(`'preservePitch' must be a boolean but got '${typeof preservePitch}' instead`);
3540
+ }
3515
3541
  if (typeof autoPlay !== "boolean" && typeof autoPlay !== "undefined") {
3516
3542
  throw new TypeError(`'autoPlay' must be a boolean or undefined but got '${typeof autoPlay}' instead`);
3517
3543
  }
@@ -3621,6 +3647,7 @@ var PlayerFn = ({
3621
3647
  children: /* @__PURE__ */ jsx14(SharedPlayerContexts, {
3622
3648
  timelineContext: timelineContextValue,
3623
3649
  playbackRateContext: playbackRateContextValue,
3650
+ preservePitch,
3624
3651
  component,
3625
3652
  compositionHeight,
3626
3653
  compositionWidth,
@@ -3948,6 +3975,7 @@ var ThumbnailFn = ({
3948
3975
  children: /* @__PURE__ */ jsx16(SharedPlayerContexts, {
3949
3976
  timelineContext: timelineState,
3950
3977
  playbackRateContext,
3978
+ preservePitch: false,
3951
3979
  component: Component,
3952
3980
  compositionHeight,
3953
3981
  compositionWidth,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/player"
4
4
  },
5
5
  "name": "@remotion/player",
6
- "version": "4.0.536",
6
+ "version": "4.0.538",
7
7
  "description": "React component for embedding a Remotion preview into your app",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "formatting": "oxfmt src --check",
13
13
  "format": "oxfmt src",
14
14
  "lint": "eslint src",
15
- "make": "tsgo -d && bun ensure-correct-version.ts && bun --env-file=../.env.bundle bundle.ts",
15
+ "make": "tsc -d && bun ensure-correct-version.ts && bun --env-file=../.env.bundle bundle.ts",
16
16
  "test": "bun test src",
17
17
  "prerelease": "cp ../../README.md . && cp ../../LICENSE.md ."
18
18
  },
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "license": "SEE LICENSE IN LICENSE.md",
37
37
  "dependencies": {
38
- "remotion": "4.0.536"
38
+ "remotion": "4.0.538"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.8.0",
@@ -49,9 +49,9 @@
49
49
  "react-dom": "19.2.3",
50
50
  "webpack": "5.105.0",
51
51
  "zod": "4.5.4",
52
- "@remotion/eslint-config-internal": "4.0.536",
52
+ "@remotion/eslint-config-internal": "4.0.538",
53
53
  "eslint": "9.19.0",
54
- "@typescript/native-preview": "7.0.0-dev.20260217.1"
54
+ "typescript": "7.1.0-beta"
55
55
  },
56
56
  "keywords": [
57
57
  "remotion",