@remotion/player 4.0.322 → 4.0.323
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/PlayerUI.js
CHANGED
|
@@ -338,13 +338,12 @@ const PlayerUI = ({ controls, style, loop, autoPlay, allowFullscreen, inputProps
|
|
|
338
338
|
}, [config, layout, overflowVisible, scale]);
|
|
339
339
|
const containerStyle = (0, react_1.useMemo)(() => {
|
|
340
340
|
return (0, calculate_scale_js_1.calculateContainerStyle)({
|
|
341
|
-
canvasSize,
|
|
342
341
|
config,
|
|
343
342
|
layout,
|
|
344
343
|
scale,
|
|
345
344
|
overflowVisible,
|
|
346
345
|
});
|
|
347
|
-
}, [
|
|
346
|
+
}, [config, layout, overflowVisible, scale]);
|
|
348
347
|
const playerPause = player.pause;
|
|
349
348
|
const playerDispatchError = player.emitter.dispatchError;
|
|
350
349
|
const onError = (0, react_1.useCallback)((error) => {
|
package/dist/cjs/ThumbnailUI.js
CHANGED
|
@@ -93,13 +93,12 @@ const ThumbnailUI = ({ style, inputProps, errorFallback, renderLoading, classNam
|
|
|
93
93
|
}, [config, layout, overflowVisible, scale]);
|
|
94
94
|
const containerStyle = (0, react_1.useMemo)(() => {
|
|
95
95
|
return (0, calculate_scale_js_1.calculateContainerStyle)({
|
|
96
|
-
canvasSize,
|
|
97
96
|
config,
|
|
98
97
|
layout,
|
|
99
98
|
scale,
|
|
100
99
|
overflowVisible,
|
|
101
100
|
});
|
|
102
|
-
}, [
|
|
101
|
+
}, [config, layout, overflowVisible, scale]);
|
|
103
102
|
const onError = (0, react_1.useCallback)((error) => {
|
|
104
103
|
// Pay attention to `this context`
|
|
105
104
|
thumbnail.emitter.dispatchError(error);
|
|
@@ -20,9 +20,8 @@ export declare const calculateOuterStyle: ({ config, style, canvasSize, overflow
|
|
|
20
20
|
overflowVisible: boolean;
|
|
21
21
|
layout: Layout | null;
|
|
22
22
|
}) => React.CSSProperties;
|
|
23
|
-
export declare const calculateContainerStyle: ({ config,
|
|
23
|
+
export declare const calculateContainerStyle: ({ config, layout, scale, overflowVisible, }: {
|
|
24
24
|
config: VideoConfig | null;
|
|
25
|
-
canvasSize: Size | null;
|
|
26
25
|
layout: Layout | null;
|
|
27
26
|
scale: number;
|
|
28
27
|
overflowVisible: boolean;
|
|
@@ -38,9 +37,18 @@ export declare const calculateOuter: ({ layout, scale, config, overflowVisible,
|
|
|
38
37
|
readonly display?: undefined;
|
|
39
38
|
readonly flexDirection?: undefined;
|
|
40
39
|
readonly position?: undefined;
|
|
40
|
+
readonly overflow?: undefined;
|
|
41
|
+
readonly left?: undefined;
|
|
42
|
+
readonly top?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
readonly width: number;
|
|
45
|
+
readonly height: number;
|
|
46
|
+
readonly display: "flex";
|
|
47
|
+
readonly flexDirection: "column";
|
|
48
|
+
readonly position: "absolute";
|
|
49
|
+
readonly overflow: "hidden" | "visible";
|
|
41
50
|
readonly left?: undefined;
|
|
42
51
|
readonly top?: undefined;
|
|
43
|
-
readonly overflow?: undefined;
|
|
44
52
|
} | {
|
|
45
53
|
readonly width: number;
|
|
46
54
|
readonly height: number;
|
|
@@ -45,10 +45,20 @@ const calculateOuterStyle = ({ config, style, canvasSize, overflowVisible, layou
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
exports.calculateOuterStyle = calculateOuterStyle;
|
|
48
|
-
const calculateContainerStyle = ({ config,
|
|
49
|
-
if (!config
|
|
48
|
+
const calculateContainerStyle = ({ config, layout, scale, overflowVisible, }) => {
|
|
49
|
+
if (!config) {
|
|
50
50
|
return {};
|
|
51
51
|
}
|
|
52
|
+
if (!layout) {
|
|
53
|
+
return {
|
|
54
|
+
position: 'absolute',
|
|
55
|
+
width: config.width,
|
|
56
|
+
height: config.height,
|
|
57
|
+
display: 'flex',
|
|
58
|
+
transform: `scale(${scale})`,
|
|
59
|
+
overflow: overflowVisible ? 'visible' : 'hidden',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
52
62
|
return {
|
|
53
63
|
position: 'absolute',
|
|
54
64
|
width: config.width,
|
|
@@ -62,9 +72,19 @@ const calculateContainerStyle = ({ config, canvasSize, layout, scale, overflowVi
|
|
|
62
72
|
};
|
|
63
73
|
exports.calculateContainerStyle = calculateContainerStyle;
|
|
64
74
|
const calculateOuter = ({ layout, scale, config, overflowVisible, }) => {
|
|
65
|
-
if (!
|
|
75
|
+
if (!config) {
|
|
66
76
|
return {};
|
|
67
77
|
}
|
|
78
|
+
if (!layout) {
|
|
79
|
+
return {
|
|
80
|
+
width: config.width * scale,
|
|
81
|
+
height: config.height * scale,
|
|
82
|
+
display: 'flex',
|
|
83
|
+
flexDirection: 'column',
|
|
84
|
+
position: 'absolute',
|
|
85
|
+
overflow: overflowVisible ? 'visible' : 'hidden',
|
|
86
|
+
};
|
|
87
|
+
}
|
|
68
88
|
const { centerX, centerY } = layout;
|
|
69
89
|
return {
|
|
70
90
|
width: config.width * scale,
|
|
@@ -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
|
@@ -269,14 +269,23 @@ var calculateOuterStyle = ({
|
|
|
269
269
|
};
|
|
270
270
|
var calculateContainerStyle = ({
|
|
271
271
|
config,
|
|
272
|
-
canvasSize,
|
|
273
272
|
layout,
|
|
274
273
|
scale,
|
|
275
274
|
overflowVisible
|
|
276
275
|
}) => {
|
|
277
|
-
if (!config
|
|
276
|
+
if (!config) {
|
|
278
277
|
return {};
|
|
279
278
|
}
|
|
279
|
+
if (!layout) {
|
|
280
|
+
return {
|
|
281
|
+
position: "absolute",
|
|
282
|
+
width: config.width,
|
|
283
|
+
height: config.height,
|
|
284
|
+
display: "flex",
|
|
285
|
+
transform: `scale(${scale})`,
|
|
286
|
+
overflow: overflowVisible ? "visible" : "hidden"
|
|
287
|
+
};
|
|
288
|
+
}
|
|
280
289
|
return {
|
|
281
290
|
position: "absolute",
|
|
282
291
|
width: config.width,
|
|
@@ -294,9 +303,19 @@ var calculateOuter = ({
|
|
|
294
303
|
config,
|
|
295
304
|
overflowVisible
|
|
296
305
|
}) => {
|
|
297
|
-
if (!
|
|
306
|
+
if (!config) {
|
|
298
307
|
return {};
|
|
299
308
|
}
|
|
309
|
+
if (!layout) {
|
|
310
|
+
return {
|
|
311
|
+
width: config.width * scale,
|
|
312
|
+
height: config.height * scale,
|
|
313
|
+
display: "flex",
|
|
314
|
+
flexDirection: "column",
|
|
315
|
+
position: "absolute",
|
|
316
|
+
overflow: overflowVisible ? "visible" : "hidden"
|
|
317
|
+
};
|
|
318
|
+
}
|
|
300
319
|
const { centerX, centerY } = layout;
|
|
301
320
|
return {
|
|
302
321
|
width: config.width * scale,
|
|
@@ -2649,13 +2668,12 @@ var PlayerUI = ({
|
|
|
2649
2668
|
}, [config, layout, overflowVisible, scale]);
|
|
2650
2669
|
const containerStyle3 = useMemo12(() => {
|
|
2651
2670
|
return calculateContainerStyle({
|
|
2652
|
-
canvasSize,
|
|
2653
2671
|
config,
|
|
2654
2672
|
layout,
|
|
2655
2673
|
scale,
|
|
2656
2674
|
overflowVisible
|
|
2657
2675
|
});
|
|
2658
|
-
}, [
|
|
2676
|
+
}, [config, layout, overflowVisible, scale]);
|
|
2659
2677
|
const playerPause = player.pause;
|
|
2660
2678
|
const playerDispatchError = player.emitter.dispatchError;
|
|
2661
2679
|
const onError = useCallback11((error) => {
|
|
@@ -3400,13 +3418,12 @@ var ThumbnailUI = ({
|
|
|
3400
3418
|
}, [config, layout, overflowVisible, scale]);
|
|
3401
3419
|
const containerStyle3 = useMemo16(() => {
|
|
3402
3420
|
return calculateContainerStyle({
|
|
3403
|
-
canvasSize,
|
|
3404
3421
|
config,
|
|
3405
3422
|
layout,
|
|
3406
3423
|
scale,
|
|
3407
3424
|
overflowVisible
|
|
3408
3425
|
});
|
|
3409
|
-
}, [
|
|
3426
|
+
}, [config, layout, overflowVisible, scale]);
|
|
3410
3427
|
const onError = useCallback13((error) => {
|
|
3411
3428
|
thumbnail.emitter.dispatchError(error);
|
|
3412
3429
|
}, [thumbnail.emitter]);
|
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.323",
|
|
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.323"
|
|
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.323"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|