@remotion/player 4.0.371 → 4.0.373
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.
|
@@ -60,7 +60,7 @@ const PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate
|
|
|
60
60
|
return ((0, jsx_runtime_1.jsxs)("div", { onPointerEnter: onMouseEnter, onPointerLeave: onMouseLeave, tabIndex: 0, style: actualStyle, onClick: onClick, children: [(0, jsx_runtime_1.jsx)("div", { style: checkmarkContainer, children: rate === selectedRate ? (0, jsx_runtime_1.jsx)(exports.Checkmark, {}) : null }), formatPlaybackRate(rate), "x"] }, rate));
|
|
61
61
|
};
|
|
62
62
|
const PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
|
|
63
|
-
const { setPlaybackRate, playbackRate } = (0, react_1.useContext)(remotion_1.Internals.
|
|
63
|
+
const { setPlaybackRate, playbackRate } = (0, react_1.useContext)(remotion_1.Internals.TimelineContext);
|
|
64
64
|
const [keyboardSelectedRate, setKeyboardSelectedRate] = (0, react_1.useState)(playbackRate);
|
|
65
65
|
(0, react_1.useEffect)(() => {
|
|
66
66
|
const listener = (e) => {
|
|
@@ -158,7 +158,7 @@ const button = {
|
|
|
158
158
|
};
|
|
159
159
|
const PlaybackrateControl = ({ playbackRates, canvasSize }) => {
|
|
160
160
|
const { ref, isComponentVisible, setIsComponentVisible } = (0, use_component_visible_js_1.default)(false);
|
|
161
|
-
const { playbackRate } = (0, react_1.useContext)(remotion_1.Internals.
|
|
161
|
+
const { playbackRate } = (0, react_1.useContext)(remotion_1.Internals.TimelineContext);
|
|
162
162
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
163
163
|
e.stopPropagation();
|
|
164
164
|
e.preventDefault();
|
package/dist/cjs/Player.js
CHANGED
|
@@ -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.
|
|
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'
|
|
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
|
};
|
|
@@ -63,6 +63,6 @@ const SharedPlayerContexts = ({ children, timelineContext, fps, compositionHeigh
|
|
|
63
63
|
isReadOnlyStudio: false,
|
|
64
64
|
};
|
|
65
65
|
}, []);
|
|
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.
|
|
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 }) }) }) }) }) }) }) }) }) }) }) }));
|
|
67
67
|
};
|
|
68
68
|
exports.SharedPlayerContexts = SharedPlayerContexts;
|
package/dist/cjs/use-player.js
CHANGED
|
@@ -13,7 +13,7 @@ const usePlayer = () => {
|
|
|
13
13
|
const setFrame = remotion_1.Internals.Timeline.useTimelineSetFrame();
|
|
14
14
|
const setTimelinePosition = remotion_1.Internals.Timeline.useTimelineSetFrame();
|
|
15
15
|
const audioContext = (0, react_1.useContext)(remotion_1.Internals.SharedAudioContext);
|
|
16
|
-
const { audioAndVideoTags } = (0, react_1.useContext)(remotion_1.Internals.
|
|
16
|
+
const { audioAndVideoTags } = (0, react_1.useContext)(remotion_1.Internals.TimelineContext);
|
|
17
17
|
const frameRef = (0, react_1.useRef)(frame);
|
|
18
18
|
frameRef.current = frame;
|
|
19
19
|
const video = remotion_1.Internals.useVideo();
|
package/dist/esm/index.mjs
CHANGED
|
@@ -569,7 +569,7 @@ var usePlayer = () => {
|
|
|
569
569
|
const setFrame = Internals5.Timeline.useTimelineSetFrame();
|
|
570
570
|
const setTimelinePosition = Internals5.Timeline.useTimelineSetFrame();
|
|
571
571
|
const audioContext = useContext3(Internals5.SharedAudioContext);
|
|
572
|
-
const { audioAndVideoTags } = useContext3(Internals5.
|
|
572
|
+
const { audioAndVideoTags } = useContext3(Internals5.TimelineContext);
|
|
573
573
|
const frameRef = useRef2(frame);
|
|
574
574
|
frameRef.current = frame;
|
|
575
575
|
const video = Internals5.useVideo();
|
|
@@ -1496,7 +1496,7 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
|
|
|
1496
1496
|
}, rate);
|
|
1497
1497
|
};
|
|
1498
1498
|
var PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
|
|
1499
|
-
const { setPlaybackRate, playbackRate } = useContext5(Internals8.
|
|
1499
|
+
const { setPlaybackRate, playbackRate } = useContext5(Internals8.TimelineContext);
|
|
1500
1500
|
const [keyboardSelectedRate, setKeyboardSelectedRate] = useState8(playbackRate);
|
|
1501
1501
|
useEffect9(() => {
|
|
1502
1502
|
const listener = (e) => {
|
|
@@ -1598,7 +1598,7 @@ var button = {
|
|
|
1598
1598
|
};
|
|
1599
1599
|
var PlaybackrateControl = ({ playbackRates, canvasSize }) => {
|
|
1600
1600
|
const { ref, isComponentVisible, setIsComponentVisible } = useComponentVisible(false);
|
|
1601
|
-
const { playbackRate } = useContext5(Internals8.
|
|
1601
|
+
const { playbackRate } = useContext5(Internals8.TimelineContext);
|
|
1602
1602
|
const onClick = useCallback6((e) => {
|
|
1603
1603
|
e.stopPropagation();
|
|
1604
1604
|
e.preventDefault();
|
|
@@ -2952,7 +2952,7 @@ var SharedPlayerContexts = ({
|
|
|
2952
2952
|
children: /* @__PURE__ */ jsx13(Internals13.LogLevelContext.Provider, {
|
|
2953
2953
|
value: logLevelContext,
|
|
2954
2954
|
children: /* @__PURE__ */ jsx13(Internals13.CanUseRemotionHooksProvider, {
|
|
2955
|
-
children: /* @__PURE__ */ jsx13(Internals13.
|
|
2955
|
+
children: /* @__PURE__ */ jsx13(Internals13.TimelineContext.Provider, {
|
|
2956
2956
|
value: timelineContext,
|
|
2957
2957
|
children: /* @__PURE__ */ jsx13(Internals13.CompositionManager.Provider, {
|
|
2958
2958
|
value: compositionManagerContext,
|
|
@@ -2965,7 +2965,6 @@ var SharedPlayerContexts = ({
|
|
|
2965
2965
|
value: setMediaVolumeContextValue,
|
|
2966
2966
|
children: /* @__PURE__ */ jsx13(Internals13.SharedAudioContextProvider, {
|
|
2967
2967
|
numberOfAudioTags: numberOfSharedAudioTags,
|
|
2968
|
-
component,
|
|
2969
2968
|
audioLatencyHint,
|
|
2970
2969
|
children: /* @__PURE__ */ jsx13(Internals13.BufferingProvider, {
|
|
2971
2970
|
children
|
|
@@ -3284,7 +3283,7 @@ var PlayerFn = ({
|
|
|
3284
3283
|
logLevel,
|
|
3285
3284
|
audioLatencyHint,
|
|
3286
3285
|
volumePersistenceKey,
|
|
3287
|
-
children: /* @__PURE__ */ jsx14(Internals15.
|
|
3286
|
+
children: /* @__PURE__ */ jsx14(Internals15.SetTimelineContext.Provider, {
|
|
3288
3287
|
value: setTimelineContextValue,
|
|
3289
3288
|
children: /* @__PURE__ */ jsx14(PlayerEmitterProvider, {
|
|
3290
3289
|
currentPlaybackRate,
|
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.
|
|
6
|
+
"version": "4.0.373",
|
|
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.
|
|
38
|
+
"remotion": "4.0.373"
|
|
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.
|
|
52
|
+
"@remotion/eslint-config-internal": "4.0.373",
|
|
53
53
|
"eslint": "9.19.0"
|
|
54
54
|
},
|
|
55
55
|
"keywords": [
|