@remotion/player 4.0.341 → 4.0.345
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 +1 -4
- package/dist/cjs/SharedPlayerContext.js +10 -1
- package/dist/cjs/error-boundary.d.ts +1 -1
- package/dist/esm/index.mjs +33 -23
- package/package.json +3 -3
package/dist/cjs/Player.js
CHANGED
|
@@ -25,10 +25,7 @@ const componentOrNullIfLazy = (props) => {
|
|
|
25
25
|
exports.componentOrNullIfLazy = componentOrNullIfLazy;
|
|
26
26
|
const PlayerFn = ({ durationInFrames, compositionHeight, compositionWidth, fps, inputProps, style, controls = false, loop = false, autoPlay = false, showVolumeControls = true, allowFullscreen = true, clickToPlay, doubleClickToFullscreen = false, spaceKeyToPlayOrPause = true, moveToBeginningWhenEnded = true, numberOfSharedAudioTags = 5, errorFallback = () => '⚠️', playbackRate = 1, renderLoading, className, showPosterWhenUnplayed, showPosterWhenEnded, showPosterWhenPaused, showPosterWhenBuffering, showPosterWhenBufferingAndPaused, initialFrame, renderPoster, inFrame, outFrame, initiallyShowControls, renderFullscreenButton, renderPlayPauseButton, renderVolumeSlider, alwaysShowControls = false, initiallyMuted = false, showPlaybackRateControl = false, posterFillMode = 'player-size', bufferStateDelayInMilliseconds, hideControlsWhenPointerDoesntMove = true, overflowVisible = false, renderMuteButton, browserMediaControlsBehavior: passedBrowserMediaControlsBehavior, overrideInternalClassName, logLevel = 'info', noSuspense, acknowledgeRemotionLicense, audioLatencyHint = 'interactive', volumePersistenceKey, ...componentProps }, ref) => {
|
|
27
27
|
if (typeof window !== 'undefined') {
|
|
28
|
-
|
|
29
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
30
|
-
window.remotion_isPlayer = true;
|
|
31
|
-
}, []);
|
|
28
|
+
window.remotion_isPlayer = true;
|
|
32
29
|
}
|
|
33
30
|
// @ts-expect-error
|
|
34
31
|
if (componentProps.defaultProps !== undefined) {
|
|
@@ -54,6 +54,15 @@ const SharedPlayerContexts = ({ children, timelineContext, fps, compositionHeigh
|
|
|
54
54
|
mountTime: Date.now(),
|
|
55
55
|
};
|
|
56
56
|
}, [logLevel]);
|
|
57
|
-
|
|
57
|
+
const env = (0, react_1.useMemo)(() => {
|
|
58
|
+
return {
|
|
59
|
+
isPlayer: true,
|
|
60
|
+
isRendering: false,
|
|
61
|
+
isStudio: false,
|
|
62
|
+
isClientSideRendering: false,
|
|
63
|
+
isReadOnlyStudio: false,
|
|
64
|
+
};
|
|
65
|
+
}, []);
|
|
66
|
+
return ((0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionEnvironmentContext, { 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.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, audioLatencyHint: audioLatencyHint, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.BufferingProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }));
|
|
58
67
|
};
|
|
59
68
|
exports.SharedPlayerContexts = SharedPlayerContexts;
|
|
@@ -15,5 +15,5 @@ export declare class ErrorBoundary extends React.Component<{
|
|
|
15
15
|
hasError: Error;
|
|
16
16
|
};
|
|
17
17
|
componentDidCatch(error: Error): void;
|
|
18
|
-
render(): string | number | bigint | boolean |
|
|
18
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
19
19
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2938,26 +2938,38 @@ var SharedPlayerContexts = ({
|
|
|
2938
2938
|
mountTime: Date.now()
|
|
2939
2939
|
};
|
|
2940
2940
|
}, [logLevel]);
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2941
|
+
const env = useMemo13(() => {
|
|
2942
|
+
return {
|
|
2943
|
+
isPlayer: true,
|
|
2944
|
+
isRendering: false,
|
|
2945
|
+
isStudio: false,
|
|
2946
|
+
isClientSideRendering: false,
|
|
2947
|
+
isReadOnlyStudio: false
|
|
2948
|
+
};
|
|
2949
|
+
}, []);
|
|
2950
|
+
return /* @__PURE__ */ jsx13(Internals13.RemotionEnvironmentContext, {
|
|
2951
|
+
value: env,
|
|
2952
|
+
children: /* @__PURE__ */ jsx13(Internals13.LogLevelContext.Provider, {
|
|
2953
|
+
value: logLevelContext,
|
|
2954
|
+
children: /* @__PURE__ */ jsx13(Internals13.CanUseRemotionHooksProvider, {
|
|
2955
|
+
children: /* @__PURE__ */ jsx13(Internals13.Timeline.TimelineContext.Provider, {
|
|
2956
|
+
value: timelineContext,
|
|
2957
|
+
children: /* @__PURE__ */ jsx13(Internals13.CompositionManager.Provider, {
|
|
2958
|
+
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
|
+
component,
|
|
2969
|
+
audioLatencyHint,
|
|
2970
|
+
children: /* @__PURE__ */ jsx13(Internals13.BufferingProvider, {
|
|
2971
|
+
children
|
|
2972
|
+
})
|
|
2961
2973
|
})
|
|
2962
2974
|
})
|
|
2963
2975
|
})
|
|
@@ -3142,9 +3154,7 @@ var PlayerFn = ({
|
|
|
3142
3154
|
...componentProps
|
|
3143
3155
|
}, ref) => {
|
|
3144
3156
|
if (typeof window !== "undefined") {
|
|
3145
|
-
|
|
3146
|
-
window.remotion_isPlayer = true;
|
|
3147
|
-
}, []);
|
|
3157
|
+
window.remotion_isPlayer = true;
|
|
3148
3158
|
}
|
|
3149
3159
|
if (componentProps.defaultProps !== undefined) {
|
|
3150
3160
|
throw new Error("The <Player /> component does not accept `defaultProps`, but some were passed. Use `inputProps` instead.");
|
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.345",
|
|
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.345"
|
|
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.19.0",
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.345"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|