@remotion/player 4.0.527 → 4.0.528
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.
- package/dist/cjs/Player.js +3 -0
- package/dist/cjs/PlayerUI.js +4 -3
- package/dist/cjs/Thumbnail.js +1 -0
- package/dist/cjs/canvas-overlay-context.d.ts +2 -0
- package/dist/cjs/canvas-overlay-context.js +7 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/use-player-methods.js +15 -15
- package/dist/esm/index.mjs +28 -14
- package/package.json +3 -3
package/dist/cjs/Player.js
CHANGED
|
@@ -94,6 +94,7 @@ const PlayerFn = ({ durationInFrames, compositionHeight, compositionWidth, fps,
|
|
|
94
94
|
const [frame, setFrame] = (0, react_1.useState)(() => ({
|
|
95
95
|
[SharedPlayerContext_js_1.PLAYER_COMP_ID]: initialFrame !== null && initialFrame !== void 0 ? initialFrame : 0,
|
|
96
96
|
}));
|
|
97
|
+
const seek = remotion_1.Internals.useTimelineSeek(setFrame);
|
|
97
98
|
const frameRef = (0, react_1.useRef)(frame);
|
|
98
99
|
frameRef.current = frame;
|
|
99
100
|
const rootRef = (0, react_1.useRef)(null);
|
|
@@ -205,6 +206,7 @@ const PlayerFn = ({ durationInFrames, compositionHeight, compositionWidth, fps,
|
|
|
205
206
|
const setTimelineContextValue = (0, react_1.useMemo)(() => {
|
|
206
207
|
return {
|
|
207
208
|
setFrame,
|
|
209
|
+
seek,
|
|
208
210
|
setPlaying: (updater) => {
|
|
209
211
|
const current = playingStore.store.getSnapshot().playing;
|
|
210
212
|
const next = typeof updater === 'function' ? updater(current) : updater;
|
|
@@ -226,6 +228,7 @@ const PlayerFn = ({ durationInFrames, compositionHeight, compositionWidth, fps,
|
|
|
226
228
|
};
|
|
227
229
|
}, [
|
|
228
230
|
bufferingStore,
|
|
231
|
+
seek,
|
|
229
232
|
setFrame,
|
|
230
233
|
frameRef,
|
|
231
234
|
playingStore,
|
package/dist/cjs/PlayerUI.js
CHANGED
|
@@ -37,6 +37,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
37
37
|
const react_1 = __importStar(require("react"));
|
|
38
38
|
const remotion_1 = require("remotion");
|
|
39
39
|
const calculate_scale_js_1 = require("./calculate-scale.js");
|
|
40
|
+
const canvas_overlay_context_js_1 = require("./canvas-overlay-context.js");
|
|
40
41
|
const error_boundary_js_1 = require("./error-boundary.js");
|
|
41
42
|
const license_blacklist_js_1 = require("./license-blacklist.js");
|
|
42
43
|
const player_css_classname_js_1 = require("./player-css-classname.js");
|
|
@@ -84,6 +85,7 @@ const PlayerUI = ({ controls, style, loop, autoPlay, allowFullscreen, inputProps
|
|
|
84
85
|
player.play(e);
|
|
85
86
|
}, [player]);
|
|
86
87
|
const { playerMuted, mediaVolume } = (0, react_1.useContext)(remotion_1.Internals.MediaVolumeContext);
|
|
88
|
+
const canvasOverlay = (0, react_1.useContext)(canvas_overlay_context_js_1.CanvasOverlayContext);
|
|
87
89
|
(0, react_1.useEffect)(() => {
|
|
88
90
|
player.emitter.dispatchVolumeChange(mediaVolume);
|
|
89
91
|
}, [player.emitter, mediaVolume]);
|
|
@@ -447,12 +449,11 @@ const PlayerUI = ({ controls, style, loop, autoPlay, allowFullscreen, inputProps
|
|
|
447
449
|
const { left, top, width, height, ...outerWithoutScale } = outer;
|
|
448
450
|
const content = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
449
451
|
jsx_runtime_1.jsxs("div", { style: outer, onPointerDown: clickToPlay ? handlePointerDown : undefined, onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined, children: [
|
|
450
|
-
jsx_runtime_1.jsxs("div", { style: containerStyle, className: (0, player_css_classname_js_1.playerCssClassname)(overrideInternalClassName), children: [VideoComponent ? (jsx_runtime_1.jsx(error_boundary_js_1.ErrorBoundary, { onError: onError, errorFallback: errorFallback, children: jsx_runtime_1.jsx(remotion_1.Internals.CurrentScaleContext.Provider, { value: currentScale, children: jsx_runtime_1.jsx(VideoComponent, { ...((_c = video === null || video === void 0 ? void 0 : video.props) !== null && _c !== void 0 ? _c : {}), ...(inputProps !== null && inputProps !== void 0 ? inputProps : {}) }) }) })) : null, shouldShowPoster && posterFillMode === 'composition-size' ? (jsx_runtime_1.jsx("div", { style: {
|
|
452
|
+
jsx_runtime_1.jsxs("div", { style: containerStyle, className: (0, player_css_classname_js_1.playerCssClassname)(overrideInternalClassName), children: [VideoComponent ? (jsx_runtime_1.jsx(error_boundary_js_1.ErrorBoundary, { onError: onError, errorFallback: errorFallback, children: jsx_runtime_1.jsx(remotion_1.Internals.CurrentScaleContext.Provider, { value: currentScale, children: jsx_runtime_1.jsx(canvas_overlay_context_js_1.CanvasOverlayContext.Provider, { value: null, children: jsx_runtime_1.jsx(VideoComponent, { ...((_c = video === null || video === void 0 ? void 0 : video.props) !== null && _c !== void 0 ? _c : {}), ...(inputProps !== null && inputProps !== void 0 ? inputProps : {}) }) }) }) })) : null, shouldShowPoster && posterFillMode === 'composition-size' ? (jsx_runtime_1.jsx("div", { style: {
|
|
451
453
|
...outerWithoutScale,
|
|
452
454
|
width: config.width,
|
|
453
455
|
height: config.height,
|
|
454
|
-
}, onPointerDown: clickToPlay ? handlePointerDown : undefined, onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined, children: poster })) : null] }), jsx_runtime_1.jsx(license_blacklist_js_1.RenderWarningIfBlacklist, {})
|
|
455
|
-
] }), shouldShowPoster && posterFillMode === 'player-size' ? (jsx_runtime_1.jsx("div", { style: outer, onPointerDown: clickToPlay ? handlePointerDown : undefined, onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined, children: poster })) : null, controls ? (jsx_runtime_1.jsx(PlayerControls_js_1.Controls, { fps: config.fps, playing: playing, toggle: toggle, durationInFrames: config.durationInFrames, containerRef: container, onFullscreenButtonClick: onFullscreenButtonClick, isFullscreen: isFullscreen, allowFullscreen: allowFullscreen, showVolumeControls: showVolumeControls, onExitFullscreenButtonClick: onExitFullscreenButtonClick, spaceKeyToPlayOrPause: spaceKeyToPlayOrPause, onSeekEnd: onSeekEnd, onSeekStart: onSeekStart, inFrame: inFrame, outFrame: outFrame, initiallyShowControls: initiallyShowControls, canvasSize: canvasSize, renderFullscreenButton: renderFullscreenButton, renderPlayPauseButton: renderPlayPauseButton, alwaysShowControls: alwaysShowControls, showPlaybackRateControl: showPlaybackRateControl, buffering: showBufferIndicator, hideControlsWhenPointerDoesntMove: hideControlsWhenPointerDoesntMove, onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined, onPointerDown: clickToPlay
|
|
456
|
+
}, onPointerDown: clickToPlay ? handlePointerDown : undefined, onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined, children: poster })) : null] }), jsx_runtime_1.jsx(license_blacklist_js_1.RenderWarningIfBlacklist, {}), canvasOverlay] }), shouldShowPoster && posterFillMode === 'player-size' ? (jsx_runtime_1.jsx("div", { style: outer, onPointerDown: clickToPlay ? handlePointerDown : undefined, onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined, children: poster })) : null, controls ? (jsx_runtime_1.jsx(PlayerControls_js_1.Controls, { fps: config.fps, playing: playing, toggle: toggle, durationInFrames: config.durationInFrames, containerRef: container, onFullscreenButtonClick: onFullscreenButtonClick, isFullscreen: isFullscreen, allowFullscreen: allowFullscreen, showVolumeControls: showVolumeControls, onExitFullscreenButtonClick: onExitFullscreenButtonClick, spaceKeyToPlayOrPause: spaceKeyToPlayOrPause, onSeekEnd: onSeekEnd, onSeekStart: onSeekStart, inFrame: inFrame, outFrame: outFrame, initiallyShowControls: initiallyShowControls, canvasSize: canvasSize, renderFullscreenButton: renderFullscreenButton, renderPlayPauseButton: renderPlayPauseButton, alwaysShowControls: alwaysShowControls, showPlaybackRateControl: showPlaybackRateControl, buffering: showBufferIndicator, hideControlsWhenPointerDoesntMove: hideControlsWhenPointerDoesntMove, onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined, onPointerDown: clickToPlay
|
|
456
457
|
? handlePointerDown
|
|
457
458
|
: undefined, renderMuteButton: renderMuteButton, renderVolumeSlider: renderVolumeSlider, renderCustomControls: renderCustomControls })) : null] }));
|
|
458
459
|
if (noSuspense || (is_node_js_1.IS_NODE && !doesReactVersionSupportSuspense)) {
|
package/dist/cjs/Thumbnail.js
CHANGED
|
@@ -45,6 +45,7 @@ const ThumbnailFn = ({ frameToDisplay, style, inputProps, compositionHeight, com
|
|
|
45
45
|
const setTimelineContext = (0, react_1.useMemo)(() => {
|
|
46
46
|
return {
|
|
47
47
|
setFrame: () => undefined,
|
|
48
|
+
seek: null,
|
|
48
49
|
setPlaying: () => undefined,
|
|
49
50
|
setBuffering: (buffering) => {
|
|
50
51
|
if (bufferingStore.store.getSnapshot().buffering !== buffering) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CanvasOverlayContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
// Canvas supplies its authoring UI here so it shares the Player's timeline,
|
|
6
|
+
// clipping and fullscreen container without wrapping the user's composition.
|
|
7
|
+
exports.CanvasOverlayContext = (0, react_1.createContext)(null);
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -53,4 +53,5 @@ export declare const PlayerInternals: {
|
|
|
53
53
|
readonly color?: string | undefined;
|
|
54
54
|
}>;
|
|
55
55
|
TimelineSequenceObserverContext: import("react").Context<import("./timeline-sequence-observer-context.js").TimelineSequenceObserver | null>;
|
|
56
|
+
CanvasOverlayContext: import("react").Context<import("react").ReactNode>;
|
|
56
57
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.PlayerInternals = exports.Thumbnail = exports.Player = void 0;
|
|
|
4
4
|
require("./_check-rsc.js");
|
|
5
5
|
const BufferingIndicator_js_1 = require("./BufferingIndicator.js");
|
|
6
6
|
const calculate_scale_js_1 = require("./calculate-scale.js");
|
|
7
|
+
const canvas_overlay_context_js_1 = require("./canvas-overlay-context.js");
|
|
7
8
|
const emitter_context_js_1 = require("./emitter-context.js");
|
|
8
9
|
const EmitterProvider_js_1 = require("./EmitterProvider.js");
|
|
9
10
|
const event_emitter_js_1 = require("./event-emitter.js");
|
|
@@ -28,4 +29,5 @@ exports.PlayerInternals = {
|
|
|
28
29
|
PlayerEmitterProvider: EmitterProvider_js_1.PlayerEmitterProvider,
|
|
29
30
|
BufferingIndicator: BufferingIndicator_js_1.BufferingIndicator,
|
|
30
31
|
TimelineSequenceObserverContext: timeline_sequence_observer_context_js_1.TimelineSequenceObserverContext,
|
|
32
|
+
CanvasOverlayContext: canvas_overlay_context_js_1.CanvasOverlayContext,
|
|
31
33
|
};
|
|
@@ -6,8 +6,8 @@ const remotion_1 = require("remotion");
|
|
|
6
6
|
const emitter_context_js_1 = require("./emitter-context.js");
|
|
7
7
|
const usePlayerMethods = () => {
|
|
8
8
|
var _a;
|
|
9
|
-
const setFrame = remotion_1.Internals.Timeline.
|
|
10
|
-
const setTimelinePosition =
|
|
9
|
+
const setFrame = remotion_1.Internals.Timeline.useTimelineSeekFrame();
|
|
10
|
+
const setTimelinePosition = setFrame;
|
|
11
11
|
const { setPlaying, frameRef, audioAndVideoTags, isPlaying: readIsPlaying, isBuffering, } = (0, react_1.useContext)(remotion_1.Internals.SetTimelineContext);
|
|
12
12
|
const audioContext = (0, react_1.useContext)(remotion_1.Internals.SharedAudioContext);
|
|
13
13
|
const audioTagsContext = (0, react_1.useContext)(remotion_1.Internals.SharedAudioTagsContext);
|
|
@@ -39,15 +39,15 @@ const usePlayerMethods = () => {
|
|
|
39
39
|
: Math.max(0, newFrame);
|
|
40
40
|
fallbackFrame.current = frameToSeekTo;
|
|
41
41
|
if (video === null || video === void 0 ? void 0 : video.id) {
|
|
42
|
+
setTimelinePosition((currentFrames) => currentFrames[video.id] === frameToSeekTo
|
|
43
|
+
? currentFrames
|
|
44
|
+
: { ...currentFrames, [video.id]: frameToSeekTo });
|
|
42
45
|
if (frameRef.current[video.id] !== frameToSeekTo) {
|
|
43
46
|
frameRef.current = {
|
|
44
47
|
...frameRef.current,
|
|
45
48
|
[video.id]: frameToSeekTo,
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
|
-
setTimelinePosition((currentFrames) => currentFrames[video.id] === frameToSeekTo
|
|
49
|
-
? currentFrames
|
|
50
|
-
: { ...currentFrames, [video.id]: frameToSeekTo });
|
|
51
51
|
}
|
|
52
52
|
emitter.dispatchSeek(frameToSeekTo);
|
|
53
53
|
}, [config, emitter, frameRef, setTimelinePosition, video === null || video === void 0 ? void 0 : video.id]);
|
|
@@ -109,14 +109,14 @@ const usePlayerMethods = () => {
|
|
|
109
109
|
setPlaying(false);
|
|
110
110
|
fallbackFrame.current = playStart.current;
|
|
111
111
|
if (config) {
|
|
112
|
-
frameRef.current = {
|
|
113
|
-
...frameRef.current,
|
|
114
|
-
[config.id]: playStart.current,
|
|
115
|
-
};
|
|
116
112
|
setTimelinePosition((currentFrames) => ({
|
|
117
113
|
...currentFrames,
|
|
118
114
|
[config.id]: playStart.current,
|
|
119
115
|
}));
|
|
116
|
+
frameRef.current = {
|
|
117
|
+
...frameRef.current,
|
|
118
|
+
[config.id]: playStart.current,
|
|
119
|
+
};
|
|
120
120
|
emitter.dispatchPause();
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -143,13 +143,13 @@ const usePlayerMethods = () => {
|
|
|
143
143
|
if (previousFrame === newFrame) {
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
+
setFrame((currentFrames) => currentFrames[videoId] === newFrame
|
|
147
|
+
? currentFrames
|
|
148
|
+
: { ...currentFrames, [videoId]: newFrame });
|
|
146
149
|
frameRef.current = {
|
|
147
150
|
...frameRef.current,
|
|
148
151
|
[videoId]: newFrame,
|
|
149
152
|
};
|
|
150
|
-
setFrame((currentFrames) => currentFrames[videoId] === newFrame
|
|
151
|
-
? currentFrames
|
|
152
|
-
: { ...currentFrames, [videoId]: newFrame });
|
|
153
153
|
}, [frameRef, readIsPlaying, setFrame, videoId]);
|
|
154
154
|
const frameForward = (0, react_1.useCallback)((frames) => {
|
|
155
155
|
var _a, _b;
|
|
@@ -164,13 +164,13 @@ const usePlayerMethods = () => {
|
|
|
164
164
|
if (previousFrame === newFrame) {
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
+
setFrame((currentFrames) => currentFrames[videoId] === newFrame
|
|
168
|
+
? currentFrames
|
|
169
|
+
: { ...currentFrames, [videoId]: newFrame });
|
|
167
170
|
frameRef.current = {
|
|
168
171
|
...frameRef.current,
|
|
169
172
|
[videoId]: newFrame,
|
|
170
173
|
};
|
|
171
|
-
setFrame((currentFrames) => currentFrames[videoId] === newFrame
|
|
172
|
-
? currentFrames
|
|
173
|
-
: { ...currentFrames, [videoId]: newFrame });
|
|
174
174
|
}, [frameRef, lastFrame, readIsPlaying, setFrame, videoId]);
|
|
175
175
|
const toggle = (0, react_1.useCallback)((e) => {
|
|
176
176
|
if (readIsPlaying()) {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -347,6 +347,10 @@ var calculateOuter = ({
|
|
|
347
347
|
};
|
|
348
348
|
};
|
|
349
349
|
|
|
350
|
+
// src/canvas-overlay-context.ts
|
|
351
|
+
import { createContext as createContext2 } from "react";
|
|
352
|
+
var CanvasOverlayContext = createContext2(null);
|
|
353
|
+
|
|
350
354
|
// src/emitter-context.ts
|
|
351
355
|
import React from "react";
|
|
352
356
|
var PlayerEventEmitterContext = React.createContext(undefined);
|
|
@@ -560,8 +564,8 @@ import { Internals as Internals4 } from "remotion";
|
|
|
560
564
|
import { useCallback, useContext as useContext2, useMemo, useRef } from "react";
|
|
561
565
|
import { Internals as Internals3, useRemotionEnvironment } from "remotion";
|
|
562
566
|
var usePlayerMethods = () => {
|
|
563
|
-
const setFrame = Internals3.Timeline.
|
|
564
|
-
const setTimelinePosition =
|
|
567
|
+
const setFrame = Internals3.Timeline.useTimelineSeekFrame();
|
|
568
|
+
const setTimelinePosition = setFrame;
|
|
565
569
|
const {
|
|
566
570
|
setPlaying,
|
|
567
571
|
frameRef,
|
|
@@ -592,13 +596,13 @@ var usePlayerMethods = () => {
|
|
|
592
596
|
const frameToSeekTo = config ? Internals3.TimelinePosition.clampFrameToCompositionRange(newFrame, config.durationInFrames) : Math.max(0, newFrame);
|
|
593
597
|
fallbackFrame.current = frameToSeekTo;
|
|
594
598
|
if (video?.id) {
|
|
599
|
+
setTimelinePosition((currentFrames) => currentFrames[video.id] === frameToSeekTo ? currentFrames : { ...currentFrames, [video.id]: frameToSeekTo });
|
|
595
600
|
if (frameRef.current[video.id] !== frameToSeekTo) {
|
|
596
601
|
frameRef.current = {
|
|
597
602
|
...frameRef.current,
|
|
598
603
|
[video.id]: frameToSeekTo
|
|
599
604
|
};
|
|
600
605
|
}
|
|
601
|
-
setTimelinePosition((currentFrames) => currentFrames[video.id] === frameToSeekTo ? currentFrames : { ...currentFrames, [video.id]: frameToSeekTo });
|
|
602
606
|
}
|
|
603
607
|
emitter.dispatchSeek(frameToSeekTo);
|
|
604
608
|
}, [config, emitter, frameRef, setTimelinePosition, video?.id]);
|
|
@@ -651,14 +655,14 @@ var usePlayerMethods = () => {
|
|
|
651
655
|
setPlaying(false);
|
|
652
656
|
fallbackFrame.current = playStart.current;
|
|
653
657
|
if (config) {
|
|
654
|
-
frameRef.current = {
|
|
655
|
-
...frameRef.current,
|
|
656
|
-
[config.id]: playStart.current
|
|
657
|
-
};
|
|
658
658
|
setTimelinePosition((currentFrames) => ({
|
|
659
659
|
...currentFrames,
|
|
660
660
|
[config.id]: playStart.current
|
|
661
661
|
}));
|
|
662
|
+
frameRef.current = {
|
|
663
|
+
...frameRef.current,
|
|
664
|
+
[config.id]: playStart.current
|
|
665
|
+
};
|
|
662
666
|
emitter.dispatchPause();
|
|
663
667
|
}
|
|
664
668
|
}
|
|
@@ -684,11 +688,11 @@ var usePlayerMethods = () => {
|
|
|
684
688
|
if (previousFrame === newFrame) {
|
|
685
689
|
return;
|
|
686
690
|
}
|
|
691
|
+
setFrame((currentFrames) => currentFrames[videoId] === newFrame ? currentFrames : { ...currentFrames, [videoId]: newFrame });
|
|
687
692
|
frameRef.current = {
|
|
688
693
|
...frameRef.current,
|
|
689
694
|
[videoId]: newFrame
|
|
690
695
|
};
|
|
691
|
-
setFrame((currentFrames) => currentFrames[videoId] === newFrame ? currentFrames : { ...currentFrames, [videoId]: newFrame });
|
|
692
696
|
}, [frameRef, readIsPlaying, setFrame, videoId]);
|
|
693
697
|
const frameForward = useCallback((frames) => {
|
|
694
698
|
if (!videoId) {
|
|
@@ -702,11 +706,11 @@ var usePlayerMethods = () => {
|
|
|
702
706
|
if (previousFrame === newFrame) {
|
|
703
707
|
return;
|
|
704
708
|
}
|
|
709
|
+
setFrame((currentFrames) => currentFrames[videoId] === newFrame ? currentFrames : { ...currentFrames, [videoId]: newFrame });
|
|
705
710
|
frameRef.current = {
|
|
706
711
|
...frameRef.current,
|
|
707
712
|
[videoId]: newFrame
|
|
708
713
|
};
|
|
709
|
-
setFrame((currentFrames) => currentFrames[videoId] === newFrame ? currentFrames : { ...currentFrames, [videoId]: newFrame });
|
|
710
714
|
}, [frameRef, lastFrame, readIsPlaying, setFrame, videoId]);
|
|
711
715
|
const toggle = useCallback((e) => {
|
|
712
716
|
if (readIsPlaying()) {
|
|
@@ -2646,6 +2650,7 @@ var PlayerUI = ({
|
|
|
2646
2650
|
player.play(e);
|
|
2647
2651
|
}, [player]);
|
|
2648
2652
|
const { playerMuted, mediaVolume } = useContext4(Internals11.MediaVolumeContext);
|
|
2653
|
+
const canvasOverlay = useContext4(CanvasOverlayContext);
|
|
2649
2654
|
useEffect12(() => {
|
|
2650
2655
|
player.emitter.dispatchVolumeChange(mediaVolume);
|
|
2651
2656
|
}, [player.emitter, mediaVolume]);
|
|
@@ -2992,9 +2997,12 @@ var PlayerUI = ({
|
|
|
2992
2997
|
errorFallback,
|
|
2993
2998
|
children: /* @__PURE__ */ jsx12(Internals11.CurrentScaleContext.Provider, {
|
|
2994
2999
|
value: currentScale,
|
|
2995
|
-
children: /* @__PURE__ */ jsx12(
|
|
2996
|
-
|
|
2997
|
-
|
|
3000
|
+
children: /* @__PURE__ */ jsx12(CanvasOverlayContext.Provider, {
|
|
3001
|
+
value: null,
|
|
3002
|
+
children: /* @__PURE__ */ jsx12(VideoComponent, {
|
|
3003
|
+
...video?.props ?? {},
|
|
3004
|
+
...inputProps ?? {}
|
|
3005
|
+
})
|
|
2998
3006
|
})
|
|
2999
3007
|
})
|
|
3000
3008
|
}) : null,
|
|
@@ -3010,7 +3018,8 @@ var PlayerUI = ({
|
|
|
3010
3018
|
}) : null
|
|
3011
3019
|
]
|
|
3012
3020
|
}),
|
|
3013
|
-
/* @__PURE__ */ jsx12(RenderWarningIfBlacklist, {})
|
|
3021
|
+
/* @__PURE__ */ jsx12(RenderWarningIfBlacklist, {}),
|
|
3022
|
+
canvasOverlay
|
|
3014
3023
|
]
|
|
3015
3024
|
}),
|
|
3016
3025
|
shouldShowPoster && posterFillMode === "player-size" ? /* @__PURE__ */ jsx12("div", {
|
|
@@ -3455,6 +3464,7 @@ var PlayerFn = ({
|
|
|
3455
3464
|
const [frame, setFrame] = useState12(() => ({
|
|
3456
3465
|
[PLAYER_COMP_ID]: initialFrame ?? 0
|
|
3457
3466
|
}));
|
|
3467
|
+
const seek = Internals15.useTimelineSeek(setFrame);
|
|
3458
3468
|
const frameRef = useRef12(frame);
|
|
3459
3469
|
frameRef.current = frame;
|
|
3460
3470
|
const rootRef = useRef12(null);
|
|
@@ -3549,6 +3559,7 @@ var PlayerFn = ({
|
|
|
3549
3559
|
const setTimelineContextValue = useMemo14(() => {
|
|
3550
3560
|
return {
|
|
3551
3561
|
setFrame,
|
|
3562
|
+
seek,
|
|
3552
3563
|
setPlaying: (updater) => {
|
|
3553
3564
|
const current = playingStore.store.getSnapshot().playing;
|
|
3554
3565
|
const next = typeof updater === "function" ? updater(current) : updater;
|
|
@@ -3570,6 +3581,7 @@ var PlayerFn = ({
|
|
|
3570
3581
|
};
|
|
3571
3582
|
}, [
|
|
3572
3583
|
bufferingStore,
|
|
3584
|
+
seek,
|
|
3573
3585
|
setFrame,
|
|
3574
3586
|
frameRef,
|
|
3575
3587
|
playingStore,
|
|
@@ -3885,6 +3897,7 @@ var ThumbnailFn = ({
|
|
|
3885
3897
|
setFrame: () => {
|
|
3886
3898
|
return;
|
|
3887
3899
|
},
|
|
3900
|
+
seek: null,
|
|
3888
3901
|
setPlaying: () => {
|
|
3889
3902
|
return;
|
|
3890
3903
|
},
|
|
@@ -3965,7 +3978,8 @@ var PlayerInternals = {
|
|
|
3965
3978
|
updateAllElementsSizes,
|
|
3966
3979
|
PlayerEmitterProvider,
|
|
3967
3980
|
BufferingIndicator,
|
|
3968
|
-
TimelineSequenceObserverContext
|
|
3981
|
+
TimelineSequenceObserverContext,
|
|
3982
|
+
CanvasOverlayContext
|
|
3969
3983
|
};
|
|
3970
3984
|
export {
|
|
3971
3985
|
Thumbnail,
|
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.528",
|
|
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.528"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=16.8.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
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.
|
|
52
|
+
"@remotion/eslint-config-internal": "4.0.528",
|
|
53
53
|
"eslint": "9.19.0",
|
|
54
54
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
55
55
|
},
|