@remotion/player 4.0.374 → 4.0.376

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.
@@ -154,7 +154,7 @@ const PlayerFn = ({ durationInFrames, compositionHeight, compositionWidth, fps,
154
154
  mode: 'prevent-media-session',
155
155
  });
156
156
  }, [passedBrowserMediaControlsBehavior]);
157
- return ((0, jsx_runtime_1.jsx)(remotion_1.Internals.IsPlayerContextProvider, { children: (0, jsx_runtime_1.jsx)(SharedPlayerContext_js_1.SharedPlayerContexts, { timelineContext: timelineContextValue, component: component, compositionHeight: compositionHeight, compositionWidth: compositionWidth, durationInFrames: durationInFrames, fps: fps, numberOfSharedAudioTags: numberOfSharedAudioTags, initiallyMuted: initiallyMuted, logLevel: logLevel, audioLatencyHint: audioLatencyHint, volumePersistenceKey: volumePersistenceKey, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetTimelineContext.Provider, { value: setTimelineContextValue, children: (0, jsx_runtime_1.jsx)(EmitterProvider_js_1.PlayerEmitterProvider, { currentPlaybackRate: currentPlaybackRate, children: (0, jsx_runtime_1.jsx)(PlayerUI_js_1.default, { ref: rootRef, posterFillMode: posterFillMode, renderLoading: renderLoading, autoPlay: Boolean(autoPlay), loop: Boolean(loop), controls: Boolean(controls), errorFallback: errorFallback, style: style, inputProps: actualInputProps, allowFullscreen: Boolean(allowFullscreen), moveToBeginningWhenEnded: Boolean(moveToBeginningWhenEnded), clickToPlay: typeof clickToPlay === 'boolean'
157
+ return ((0, jsx_runtime_1.jsx)(remotion_1.Internals.IsPlayerContextProvider, { children: (0, jsx_runtime_1.jsx)(SharedPlayerContext_js_1.SharedPlayerContexts, { timelineContext: timelineContextValue, component: component, compositionHeight: compositionHeight, compositionWidth: compositionWidth, durationInFrames: durationInFrames, fps: fps, numberOfSharedAudioTags: numberOfSharedAudioTags, initiallyMuted: initiallyMuted, logLevel: logLevel, audioLatencyHint: audioLatencyHint, volumePersistenceKey: volumePersistenceKey, inputProps: actualInputProps, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetTimelineContext.Provider, { value: setTimelineContextValue, children: (0, jsx_runtime_1.jsx)(EmitterProvider_js_1.PlayerEmitterProvider, { currentPlaybackRate: currentPlaybackRate, children: (0, jsx_runtime_1.jsx)(PlayerUI_js_1.default, { ref: rootRef, posterFillMode: posterFillMode, renderLoading: renderLoading, autoPlay: Boolean(autoPlay), loop: Boolean(loop), controls: Boolean(controls), errorFallback: errorFallback, style: style, inputProps: actualInputProps, allowFullscreen: Boolean(allowFullscreen), moveToBeginningWhenEnded: Boolean(moveToBeginningWhenEnded), clickToPlay: typeof clickToPlay === 'boolean'
158
158
  ? clickToPlay
159
159
  : Boolean(controls), showVolumeControls: Boolean(showVolumeControls), doubleClickToFullscreen: Boolean(doubleClickToFullscreen), spaceKeyToPlayOrPause: Boolean(spaceKeyToPlayOrPause), playbackRate: currentPlaybackRate, className: className !== null && className !== void 0 ? className : undefined, showPosterWhenUnplayed: Boolean(showPosterWhenUnplayed), showPosterWhenEnded: Boolean(showPosterWhenEnded), showPosterWhenPaused: Boolean(showPosterWhenPaused), showPosterWhenBuffering: Boolean(showPosterWhenBuffering), showPosterWhenBufferingAndPaused: Boolean(showPosterWhenBufferingAndPaused), renderPoster: renderPoster, inFrame: inFrame !== null && inFrame !== void 0 ? inFrame : null, outFrame: outFrame !== null && outFrame !== void 0 ? outFrame : null, initiallyShowControls: initiallyShowControls !== null && initiallyShowControls !== void 0 ? initiallyShowControls : true, renderFullscreen: renderFullscreenButton !== null && renderFullscreenButton !== void 0 ? renderFullscreenButton : null, renderPlayPauseButton: renderPlayPauseButton !== null && renderPlayPauseButton !== void 0 ? renderPlayPauseButton : null, renderMuteButton: renderMuteButton !== null && renderMuteButton !== void 0 ? renderMuteButton : null, renderVolumeSlider: renderVolumeSlider !== null && renderVolumeSlider !== void 0 ? renderVolumeSlider : null, alwaysShowControls: alwaysShowControls, showPlaybackRateControl: showPlaybackRateControl, bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds !== null && bufferStateDelayInMilliseconds !== void 0 ? bufferStateDelayInMilliseconds : 300, hideControlsWhenPointerDoesntMove: hideControlsWhenPointerDoesntMove, overflowVisible: overflowVisible, browserMediaControlsBehavior: browserMediaControlsBehavior, overrideInternalClassName: overrideInternalClassName !== null && overrideInternalClassName !== void 0 ? overrideInternalClassName : undefined, noSuspense: Boolean(noSuspense) }) }) }) }) }));
160
160
  };
@@ -15,4 +15,5 @@ export declare const SharedPlayerContexts: React.FC<{
15
15
  readonly logLevel: LogLevel;
16
16
  readonly audioLatencyHint: AudioContextLatencyCategory;
17
17
  readonly volumePersistenceKey?: string;
18
+ readonly inputProps: Record<string, unknown>;
18
19
  }>;
@@ -6,7 +6,7 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const volume_persistance_js_1 = require("./volume-persistance.js");
8
8
  exports.PLAYER_COMP_ID = 'player-comp';
9
- const SharedPlayerContexts = ({ children, timelineContext, fps, compositionHeight, compositionWidth, durationInFrames, component, numberOfSharedAudioTags, initiallyMuted, logLevel, audioLatencyHint, volumePersistenceKey, }) => {
9
+ const SharedPlayerContexts = ({ children, timelineContext, fps, compositionHeight, compositionWidth, durationInFrames, component, numberOfSharedAudioTags, initiallyMuted, logLevel, audioLatencyHint, volumePersistenceKey, inputProps, }) => {
10
10
  const compositionManagerContext = (0, react_1.useMemo)(() => {
11
11
  const context = {
12
12
  compositions: [
@@ -25,11 +25,29 @@ const SharedPlayerContexts = ({ children, timelineContext, fps, compositionHeigh
25
25
  },
26
26
  ],
27
27
  folders: [],
28
- currentCompositionMetadata: null,
28
+ currentCompositionMetadata: {
29
+ defaultCodec: null,
30
+ defaultOutName: null,
31
+ defaultPixelFormat: null,
32
+ defaultProResProfile: null,
33
+ defaultVideoImageFormat: null,
34
+ durationInFrames,
35
+ fps,
36
+ height: compositionHeight,
37
+ width: compositionWidth,
38
+ props: inputProps,
39
+ },
29
40
  canvasContent: { type: 'composition', compositionId: 'player-comp' },
30
41
  };
31
42
  return context;
32
- }, [component, durationInFrames, compositionHeight, compositionWidth, fps]);
43
+ }, [
44
+ component,
45
+ durationInFrames,
46
+ compositionHeight,
47
+ compositionWidth,
48
+ fps,
49
+ inputProps,
50
+ ]);
33
51
  const [mediaMuted, setMediaMuted] = (0, react_1.useState)(() => initiallyMuted);
34
52
  const [mediaVolume, setMediaVolume] = (0, react_1.useState)(() => (0, volume_persistance_js_1.getPreferredVolume)(volumePersistenceKey !== null && volumePersistenceKey !== void 0 ? volumePersistenceKey : null));
35
53
  const mediaVolumeContextValue = (0, react_1.useMemo)(() => {
@@ -63,6 +81,6 @@ const SharedPlayerContexts = ({ children, timelineContext, fps, compositionHeigh
63
81
  isReadOnlyStudio: false,
64
82
  };
65
83
  }, []);
66
- return ((0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionEnvironmentContext.Provider, { value: env, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.LogLevelContext.Provider, { value: logLevelContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.TimelineContext.Provider, { value: timelineContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.CompositionManager.Provider, { value: compositionManagerContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.ResolveCompositionConfig, { children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.PrefetchProvider, { children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.DurationsContextProvider, { children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.MediaVolumeContext.Provider, { value: mediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetMediaVolumeContext.Provider, { value: setMediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SharedAudioContextProvider, { numberOfAudioTags: numberOfSharedAudioTags, audioLatencyHint: audioLatencyHint, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.BufferingProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }));
84
+ return ((0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionEnvironmentContext.Provider, { value: env, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.LogLevelContext.Provider, { value: logLevelContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.TimelineContext.Provider, { value: timelineContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.CompositionManager.Provider, { value: compositionManagerContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.PrefetchProvider, { children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.DurationsContextProvider, { children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.MediaVolumeContext.Provider, { value: mediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetMediaVolumeContext.Provider, { value: setMediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SharedAudioContextProvider, { numberOfAudioTags: numberOfSharedAudioTags, audioLatencyHint: audioLatencyHint, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.BufferingProvider, { children: children }) }) }) }) }) }) }) }) }) }) }));
67
85
  };
68
86
  exports.SharedPlayerContexts = SharedPlayerContexts;
@@ -48,7 +48,7 @@ const ThumbnailFn = ({ frameToDisplay, style, inputProps, compositionHeight, com
48
48
  const passedInputProps = (0, react_1.useMemo)(() => {
49
49
  return inputProps !== null && inputProps !== void 0 ? inputProps : {};
50
50
  }, [inputProps]);
51
- return ((0, jsx_runtime_1.jsx)(remotion_1.Internals.IsPlayerContextProvider, { children: (0, jsx_runtime_1.jsx)(SharedPlayerContext_js_1.SharedPlayerContexts, { timelineContext: timelineState, component: Component, compositionHeight: compositionHeight, compositionWidth: compositionWidth, durationInFrames: durationInFrames, fps: fps, numberOfSharedAudioTags: 0, initiallyMuted: true, logLevel: logLevel, audioLatencyHint: "playback", children: (0, jsx_runtime_1.jsx)(emitter_context_js_1.ThumbnailEmitterContext.Provider, { value: emitter, children: (0, jsx_runtime_1.jsx)(ThumbnailUI_js_1.default, { ref: rootRef, className: className, errorFallback: errorFallback, inputProps: passedInputProps, renderLoading: renderLoading, style: style, overflowVisible: overflowVisible, overrideInternalClassName: overrideInternalClassName, noSuspense: Boolean(noSuspense) }) }) }) }));
51
+ return ((0, jsx_runtime_1.jsx)(remotion_1.Internals.IsPlayerContextProvider, { children: (0, jsx_runtime_1.jsx)(SharedPlayerContext_js_1.SharedPlayerContexts, { timelineContext: timelineState, component: Component, compositionHeight: compositionHeight, compositionWidth: compositionWidth, durationInFrames: durationInFrames, fps: fps, numberOfSharedAudioTags: 0, initiallyMuted: true, logLevel: logLevel, audioLatencyHint: "playback", inputProps: passedInputProps, children: (0, jsx_runtime_1.jsx)(emitter_context_js_1.ThumbnailEmitterContext.Provider, { value: emitter, children: (0, jsx_runtime_1.jsx)(ThumbnailUI_js_1.default, { ref: rootRef, className: className, errorFallback: errorFallback, inputProps: passedInputProps, renderLoading: renderLoading, style: style, overflowVisible: overflowVisible, overrideInternalClassName: overrideInternalClassName, noSuspense: Boolean(noSuspense) }) }) }) }));
52
52
  };
53
53
  const forward = react_1.forwardRef;
54
54
  /*
@@ -2889,7 +2889,8 @@ var SharedPlayerContexts = ({
2889
2889
  initiallyMuted,
2890
2890
  logLevel,
2891
2891
  audioLatencyHint,
2892
- volumePersistenceKey
2892
+ volumePersistenceKey,
2893
+ inputProps
2893
2894
  }) => {
2894
2895
  const compositionManagerContext = useMemo13(() => {
2895
2896
  const context = {
@@ -2909,11 +2910,29 @@ var SharedPlayerContexts = ({
2909
2910
  }
2910
2911
  ],
2911
2912
  folders: [],
2912
- currentCompositionMetadata: null,
2913
+ currentCompositionMetadata: {
2914
+ defaultCodec: null,
2915
+ defaultOutName: null,
2916
+ defaultPixelFormat: null,
2917
+ defaultProResProfile: null,
2918
+ defaultVideoImageFormat: null,
2919
+ durationInFrames,
2920
+ fps,
2921
+ height: compositionHeight,
2922
+ width: compositionWidth,
2923
+ props: inputProps
2924
+ },
2913
2925
  canvasContent: { type: "composition", compositionId: "player-comp" }
2914
2926
  };
2915
2927
  return context;
2916
- }, [component, durationInFrames, compositionHeight, compositionWidth, fps]);
2928
+ }, [
2929
+ component,
2930
+ durationInFrames,
2931
+ compositionHeight,
2932
+ compositionWidth,
2933
+ fps,
2934
+ inputProps
2935
+ ]);
2917
2936
  const [mediaMuted, setMediaMuted] = useState12(() => initiallyMuted);
2918
2937
  const [mediaVolume, setMediaVolume] = useState12(() => getPreferredVolume(volumePersistenceKey ?? null));
2919
2938
  const mediaVolumeContextValue = useMemo13(() => {
@@ -2956,19 +2975,17 @@ var SharedPlayerContexts = ({
2956
2975
  value: timelineContext,
2957
2976
  children: /* @__PURE__ */ jsx13(Internals13.CompositionManager.Provider, {
2958
2977
  value: compositionManagerContext,
2959
- children: /* @__PURE__ */ jsx13(Internals13.ResolveCompositionConfig, {
2960
- children: /* @__PURE__ */ jsx13(Internals13.PrefetchProvider, {
2961
- children: /* @__PURE__ */ jsx13(Internals13.DurationsContextProvider, {
2962
- children: /* @__PURE__ */ jsx13(Internals13.MediaVolumeContext.Provider, {
2963
- value: mediaVolumeContextValue,
2964
- children: /* @__PURE__ */ jsx13(Internals13.SetMediaVolumeContext.Provider, {
2965
- value: setMediaVolumeContextValue,
2966
- children: /* @__PURE__ */ jsx13(Internals13.SharedAudioContextProvider, {
2967
- numberOfAudioTags: numberOfSharedAudioTags,
2968
- audioLatencyHint,
2969
- children: /* @__PURE__ */ jsx13(Internals13.BufferingProvider, {
2970
- children
2971
- })
2978
+ children: /* @__PURE__ */ jsx13(Internals13.PrefetchProvider, {
2979
+ children: /* @__PURE__ */ jsx13(Internals13.DurationsContextProvider, {
2980
+ children: /* @__PURE__ */ jsx13(Internals13.MediaVolumeContext.Provider, {
2981
+ value: mediaVolumeContextValue,
2982
+ children: /* @__PURE__ */ jsx13(Internals13.SetMediaVolumeContext.Provider, {
2983
+ value: setMediaVolumeContextValue,
2984
+ children: /* @__PURE__ */ jsx13(Internals13.SharedAudioContextProvider, {
2985
+ numberOfAudioTags: numberOfSharedAudioTags,
2986
+ audioLatencyHint,
2987
+ children: /* @__PURE__ */ jsx13(Internals13.BufferingProvider, {
2988
+ children
2972
2989
  })
2973
2990
  })
2974
2991
  })
@@ -3283,6 +3300,7 @@ var PlayerFn = ({
3283
3300
  logLevel,
3284
3301
  audioLatencyHint,
3285
3302
  volumePersistenceKey,
3303
+ inputProps: actualInputProps,
3286
3304
  children: /* @__PURE__ */ jsx14(Internals15.SetTimelineContext.Provider, {
3287
3305
  value: setTimelineContextValue,
3288
3306
  children: /* @__PURE__ */ jsx14(PlayerEmitterProvider, {
@@ -3560,6 +3578,7 @@ var ThumbnailFn = ({
3560
3578
  initiallyMuted: true,
3561
3579
  logLevel,
3562
3580
  audioLatencyHint: "playback",
3581
+ inputProps: passedInputProps,
3563
3582
  children: /* @__PURE__ */ jsx16(ThumbnailEmitterContext.Provider, {
3564
3583
  value: emitter,
3565
3584
  children: /* @__PURE__ */ jsx16(ThumbnailUI_default, {
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.374",
6
+ "version": "4.0.376",
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",
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "license": "SEE LICENSE IN LICENSE.md",
37
37
  "dependencies": {
38
- "remotion": "4.0.374"
38
+ "remotion": "4.0.376"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.8.0",
@@ -49,7 +49,7 @@
49
49
  "react-dom": "19.0.0",
50
50
  "webpack": "5.96.1",
51
51
  "zod": "3.22.3",
52
- "@remotion/eslint-config-internal": "4.0.374",
52
+ "@remotion/eslint-config-internal": "4.0.376",
53
53
  "eslint": "9.19.0"
54
54
  },
55
55
  "keywords": [