@remotion/player 4.0.257 → 4.0.259
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 +10 -2
- package/dist/cjs/SharedPlayerContext.js +7 -1
- package/dist/cjs/Thumbnail.js +4 -1
- package/dist/esm/index.mjs +21 -4
- package/package.json +3 -3
package/dist/cjs/Player.js
CHANGED
|
@@ -43,7 +43,10 @@ const PlayerFn = ({ durationInFrames, compositionHeight, compositionWidth, fps,
|
|
|
43
43
|
throw new TypeError(`'component' must not be the 'Composition' component. Pass your own React component directly, and set the duration, fps and dimensions as separate props. See https://www.remotion.dev/docs/player/examples for an example.`);
|
|
44
44
|
}
|
|
45
45
|
(0, react_1.useState)(() => (0, use_remotion_license_acknowledge_js_1.acknowledgeRemotionLicenseMessage)(Boolean(acknowledgeRemotionLicense), logLevel));
|
|
46
|
-
const component = remotion_1.Internals.useLazyComponent(
|
|
46
|
+
const component = remotion_1.Internals.useLazyComponent({
|
|
47
|
+
compProps: componentProps,
|
|
48
|
+
componentName: 'Player',
|
|
49
|
+
});
|
|
47
50
|
(0, validate_initial_frame_js_1.validateInitialFrame)({ initialFrame, durationInFrames });
|
|
48
51
|
const [frame, setFrame] = (0, react_1.useState)(() => ({
|
|
49
52
|
[SharedPlayerContext_js_1.PLAYER_COMP_ID]: initialFrame !== null && initialFrame !== void 0 ? initialFrame : 0,
|
|
@@ -114,7 +117,12 @@ const PlayerFn = ({ durationInFrames, compositionHeight, compositionWidth, fps,
|
|
|
114
117
|
}, [playbackRate]);
|
|
115
118
|
(0, react_1.useImperativeHandle)(ref, () => rootRef.current, []);
|
|
116
119
|
(0, react_1.useState)(() => {
|
|
117
|
-
remotion_1.Internals.
|
|
120
|
+
remotion_1.Internals.playbackLogging({
|
|
121
|
+
logLevel,
|
|
122
|
+
message: `[player] Mounting <Player>. User agent = ${typeof navigator === 'undefined' ? 'server' : navigator.userAgent}`,
|
|
123
|
+
tag: 'player',
|
|
124
|
+
mountTime: Date.now(),
|
|
125
|
+
});
|
|
118
126
|
});
|
|
119
127
|
const timelineContextValue = (0, react_1.useMemo)(() => {
|
|
120
128
|
return {
|
|
@@ -55,6 +55,12 @@ const SharedPlayerContexts = ({ children, timelineContext, fps, compositionHeigh
|
|
|
55
55
|
setMediaVolume: setMediaVolumeAndPersist,
|
|
56
56
|
};
|
|
57
57
|
}, [setMediaVolumeAndPersist]);
|
|
58
|
-
|
|
58
|
+
const logLevelContext = (0, react_1.useMemo)(() => {
|
|
59
|
+
return {
|
|
60
|
+
logLevel,
|
|
61
|
+
mountTime: Date.now(),
|
|
62
|
+
};
|
|
63
|
+
}, [logLevel]);
|
|
64
|
+
return ((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.Timeline.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, component: component, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.BufferingProvider, { children: children }) }) }) }) }) }) }) }) }) }) }));
|
|
59
65
|
};
|
|
60
66
|
exports.SharedPlayerContexts = SharedPlayerContexts;
|
package/dist/cjs/Thumbnail.js
CHANGED
|
@@ -39,7 +39,10 @@ const ThumbnailFn = ({ frameToDisplay, style, inputProps, compositionHeight, com
|
|
|
39
39
|
return value;
|
|
40
40
|
}, [frameToDisplay, thumbnailId]);
|
|
41
41
|
(0, react_1.useImperativeHandle)(ref, () => rootRef.current, []);
|
|
42
|
-
const Component = remotion_1.Internals.useLazyComponent(
|
|
42
|
+
const Component = remotion_1.Internals.useLazyComponent({
|
|
43
|
+
compProps: componentProps,
|
|
44
|
+
componentName: 'Thumbnail',
|
|
45
|
+
});
|
|
43
46
|
const [emitter] = (0, react_1.useState)(() => new event_emitter_js_1.ThumbnailEmitter());
|
|
44
47
|
const passedInputProps = (0, react_1.useMemo)(() => {
|
|
45
48
|
return inputProps !== null && inputProps !== void 0 ? inputProps : {};
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2928,8 +2928,14 @@ var SharedPlayerContexts = ({
|
|
|
2928
2928
|
setMediaVolume: setMediaVolumeAndPersist
|
|
2929
2929
|
};
|
|
2930
2930
|
}, [setMediaVolumeAndPersist]);
|
|
2931
|
+
const logLevelContext = useMemo13(() => {
|
|
2932
|
+
return {
|
|
2933
|
+
logLevel,
|
|
2934
|
+
mountTime: Date.now()
|
|
2935
|
+
};
|
|
2936
|
+
}, [logLevel]);
|
|
2931
2937
|
return /* @__PURE__ */ jsx13(Internals13.LogLevelContext.Provider, {
|
|
2932
|
-
value:
|
|
2938
|
+
value: logLevelContext,
|
|
2933
2939
|
children: /* @__PURE__ */ jsx13(Internals13.CanUseRemotionHooksProvider, {
|
|
2934
2940
|
children: /* @__PURE__ */ jsx13(Internals13.Timeline.TimelineContext.Provider, {
|
|
2935
2941
|
value: timelineContext,
|
|
@@ -3143,7 +3149,10 @@ var PlayerFn = ({
|
|
|
3143
3149
|
throw new TypeError(`'component' must not be the 'Composition' component. Pass your own React component directly, and set the duration, fps and dimensions as separate props. See https://www.remotion.dev/docs/player/examples for an example.`);
|
|
3144
3150
|
}
|
|
3145
3151
|
useState13(() => acknowledgeRemotionLicenseMessage(Boolean(acknowledgeRemotionLicense), logLevel));
|
|
3146
|
-
const component = Internals15.useLazyComponent(
|
|
3152
|
+
const component = Internals15.useLazyComponent({
|
|
3153
|
+
compProps: componentProps,
|
|
3154
|
+
componentName: "Player"
|
|
3155
|
+
});
|
|
3147
3156
|
validateInitialFrame({ initialFrame, durationInFrames });
|
|
3148
3157
|
const [frame, setFrame] = useState13(() => ({
|
|
3149
3158
|
[PLAYER_COMP_ID]: initialFrame ?? 0
|
|
@@ -3206,7 +3215,12 @@ var PlayerFn = ({
|
|
|
3206
3215
|
}, [playbackRate]);
|
|
3207
3216
|
useImperativeHandle2(ref, () => rootRef.current, []);
|
|
3208
3217
|
useState13(() => {
|
|
3209
|
-
Internals15.
|
|
3218
|
+
Internals15.playbackLogging({
|
|
3219
|
+
logLevel,
|
|
3220
|
+
message: `[player] Mounting <Player>. User agent = ${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
3221
|
+
tag: "player",
|
|
3222
|
+
mountTime: Date.now()
|
|
3223
|
+
});
|
|
3210
3224
|
});
|
|
3211
3225
|
const timelineContextValue = useMemo14(() => {
|
|
3212
3226
|
return {
|
|
@@ -3502,7 +3516,10 @@ var ThumbnailFn = ({
|
|
|
3502
3516
|
return value;
|
|
3503
3517
|
}, [frameToDisplay, thumbnailId]);
|
|
3504
3518
|
useImperativeHandle4(ref, () => rootRef.current, []);
|
|
3505
|
-
const Component = Internals17.useLazyComponent(
|
|
3519
|
+
const Component = Internals17.useLazyComponent({
|
|
3520
|
+
compProps: componentProps,
|
|
3521
|
+
componentName: "Thumbnail"
|
|
3522
|
+
});
|
|
3506
3523
|
const [emitter] = useState14(() => new ThumbnailEmitter);
|
|
3507
3524
|
const passedInputProps = useMemo17(() => {
|
|
3508
3525
|
return inputProps ?? {};
|
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.259",
|
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"remotion": "4.0.
|
|
31
|
+
"remotion": "4.0.259"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": ">=16.8.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"webpack": "5.96.1",
|
|
44
44
|
"zod": "3.22.3",
|
|
45
45
|
"eslint": "9.14.0",
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.259"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|