@remotion/player 4.0.208 → 4.0.209
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/esm/index.mjs +108 -109
- package/package.json +2 -2
package/dist/esm/index.mjs
CHANGED
|
@@ -7,12 +7,12 @@ jsxs
|
|
|
7
7
|
var ICON_SIZE = 25;
|
|
8
8
|
var fullscreenIconSize = 16;
|
|
9
9
|
var PlayIcon = () => {
|
|
10
|
-
return jsx("svg", {
|
|
10
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
11
11
|
width: ICON_SIZE,
|
|
12
12
|
height: ICON_SIZE,
|
|
13
13
|
viewBox: "0 0 25 25",
|
|
14
14
|
fill: "none",
|
|
15
|
-
children: jsx("path", {
|
|
15
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
16
16
|
d: "M8 6.375C7.40904 8.17576 7.06921 10.2486 7.01438 12.3871C6.95955 14.5255 7.19163 16.6547 7.6875 18.5625C9.95364 18.2995 12.116 17.6164 14.009 16.5655C15.902 15.5147 17.4755 14.124 18.6088 12.5C17.5158 10.8949 15.9949 9.51103 14.1585 8.45082C12.3222 7.3906 10.2174 6.68116 8 6.375Z",
|
|
17
17
|
fill: "white",
|
|
18
18
|
stroke: "white",
|
|
@@ -22,12 +22,12 @@ var PlayIcon = () => {
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
var PauseIcon = () => {
|
|
25
|
-
return jsxs("svg", {
|
|
25
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
26
26
|
viewBox: "0 0 100 100",
|
|
27
27
|
width: ICON_SIZE,
|
|
28
28
|
height: ICON_SIZE,
|
|
29
29
|
children: [
|
|
30
|
-
jsx("rect", {
|
|
30
|
+
/* @__PURE__ */ jsx("rect", {
|
|
31
31
|
x: "25",
|
|
32
32
|
y: "20",
|
|
33
33
|
width: "20",
|
|
@@ -36,7 +36,7 @@ var PauseIcon = () => {
|
|
|
36
36
|
ry: "5",
|
|
37
37
|
rx: "5"
|
|
38
38
|
}),
|
|
39
|
-
jsx("rect", {
|
|
39
|
+
/* @__PURE__ */ jsx("rect", {
|
|
40
40
|
x: "55",
|
|
41
41
|
y: "20",
|
|
42
42
|
width: "20",
|
|
@@ -56,12 +56,12 @@ var FullscreenIcon = ({
|
|
|
56
56
|
const out = isFullscreen ? 0 : strokeWidth / 2;
|
|
57
57
|
const middleInset = isFullscreen ? strokeWidth * 1.6 : strokeWidth / 2;
|
|
58
58
|
const inset = isFullscreen ? strokeWidth * 1.6 : strokeWidth * 2;
|
|
59
|
-
return jsxs("svg", {
|
|
59
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
60
60
|
viewBox: `0 0 ${viewSize} ${viewSize}`,
|
|
61
61
|
height: fullscreenIconSize,
|
|
62
62
|
width: fullscreenIconSize,
|
|
63
63
|
children: [
|
|
64
|
-
jsx("path", {
|
|
64
|
+
/* @__PURE__ */ jsx("path", {
|
|
65
65
|
d: `
|
|
66
66
|
M ${out} ${inset}
|
|
67
67
|
L ${middleInset} ${middleInset}
|
|
@@ -71,7 +71,7 @@ var FullscreenIcon = ({
|
|
|
71
71
|
strokeWidth,
|
|
72
72
|
fill: "none"
|
|
73
73
|
}),
|
|
74
|
-
jsx("path", {
|
|
74
|
+
/* @__PURE__ */ jsx("path", {
|
|
75
75
|
d: `
|
|
76
76
|
M ${viewSize - out} ${inset}
|
|
77
77
|
L ${viewSize - middleInset} ${middleInset}
|
|
@@ -81,7 +81,7 @@ var FullscreenIcon = ({
|
|
|
81
81
|
strokeWidth,
|
|
82
82
|
fill: "none"
|
|
83
83
|
}),
|
|
84
|
-
jsx("path", {
|
|
84
|
+
/* @__PURE__ */ jsx("path", {
|
|
85
85
|
d: `
|
|
86
86
|
M ${out} ${viewSize - inset}
|
|
87
87
|
L ${middleInset} ${viewSize - middleInset}
|
|
@@ -91,7 +91,7 @@ var FullscreenIcon = ({
|
|
|
91
91
|
strokeWidth,
|
|
92
92
|
fill: "none"
|
|
93
93
|
}),
|
|
94
|
-
jsx("path", {
|
|
94
|
+
/* @__PURE__ */ jsx("path", {
|
|
95
95
|
d: `
|
|
96
96
|
M ${viewSize - out} ${viewSize - inset}
|
|
97
97
|
L ${viewSize - middleInset} ${viewSize - middleInset}
|
|
@@ -105,22 +105,22 @@ var FullscreenIcon = ({
|
|
|
105
105
|
});
|
|
106
106
|
};
|
|
107
107
|
var VolumeOffIcon = () => {
|
|
108
|
-
return jsx("svg", {
|
|
108
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
109
109
|
width: ICON_SIZE,
|
|
110
110
|
height: ICON_SIZE,
|
|
111
111
|
viewBox: "0 0 24 24",
|
|
112
|
-
children: jsx("path", {
|
|
112
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
113
113
|
d: "M3.63 3.63a.996.996 0 000 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 101.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12zm-8.71-6.29l-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7zM16.5 12A4.5 4.5 0 0014 7.97v1.79l2.48 2.48c.01-.08.02-.16.02-.24z",
|
|
114
114
|
fill: "#fff"
|
|
115
115
|
})
|
|
116
116
|
});
|
|
117
117
|
};
|
|
118
118
|
var VolumeOnIcon = () => {
|
|
119
|
-
return jsx("svg", {
|
|
119
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
120
120
|
width: ICON_SIZE,
|
|
121
121
|
height: ICON_SIZE,
|
|
122
122
|
viewBox: "0 0 24 24",
|
|
123
|
-
children: jsx("path", {
|
|
123
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
124
124
|
d: "M3 10v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0 0014 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.45v.2c0 .38.25.71.6.85C17.18 6.53 19 9.06 19 12s-1.82 5.47-4.4 6.5c-.36.14-.6.47-.6.85v.2c0 .63.63 1.07 1.21.85C18.6 19.11 21 15.84 21 12s-2.4-7.11-5.79-8.4c-.58-.23-1.21.22-1.21.85z",
|
|
125
125
|
fill: "#fff"
|
|
126
126
|
})
|
|
@@ -151,9 +151,9 @@ var studioStyle = {
|
|
|
151
151
|
};
|
|
152
152
|
var BufferingIndicator = ({ type }) => {
|
|
153
153
|
const style = type === "player" ? playerStyle : studioStyle;
|
|
154
|
-
return jsxs2(Fragment, {
|
|
154
|
+
return /* @__PURE__ */ jsxs2(Fragment, {
|
|
155
155
|
children: [
|
|
156
|
-
jsx2("style", {
|
|
156
|
+
/* @__PURE__ */ jsx2("style", {
|
|
157
157
|
type: "text/css",
|
|
158
158
|
children: `
|
|
159
159
|
@keyframes ${remotionBufferingAnimation} {
|
|
@@ -170,13 +170,13 @@ var BufferingIndicator = ({ type }) => {
|
|
|
170
170
|
}
|
|
171
171
|
`
|
|
172
172
|
}),
|
|
173
|
-
jsx2("div", {
|
|
173
|
+
/* @__PURE__ */ jsx2("div", {
|
|
174
174
|
style,
|
|
175
|
-
children: jsx2("svg", {
|
|
175
|
+
children: /* @__PURE__ */ jsx2("svg", {
|
|
176
176
|
viewBox: type === "player" ? "0 0 22 22" : "0 0 18 18",
|
|
177
177
|
style,
|
|
178
178
|
className,
|
|
179
|
-
children: jsx2("path", {
|
|
179
|
+
children: /* @__PURE__ */ jsx2("path", {
|
|
180
180
|
d: type === "player" ? "M 11 4 A 7 7 0 0 1 15.1145 16.66312" : "M 9 2 A 7 7 0 0 1 13.1145 14.66312",
|
|
181
181
|
stroke: "white",
|
|
182
182
|
strokeLinecap: "round",
|
|
@@ -477,7 +477,7 @@ var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
|
|
|
477
477
|
}
|
|
478
478
|
}, [emitter, currentPlaybackRate]);
|
|
479
479
|
useBufferStateEmitter(emitter);
|
|
480
|
-
return jsx3(PlayerEventEmitterContext.Provider, {
|
|
480
|
+
return /* @__PURE__ */ jsx3(PlayerEventEmitterContext.Provider, {
|
|
481
481
|
value: emitter,
|
|
482
482
|
children
|
|
483
483
|
});
|
|
@@ -1037,14 +1037,14 @@ jsx as jsx4
|
|
|
1037
1037
|
} from "react/jsx-runtime";
|
|
1038
1038
|
var DefaultPlayPauseButton = ({ playing, buffering }) => {
|
|
1039
1039
|
if (playing && buffering) {
|
|
1040
|
-
return jsx4(BufferingIndicator, {
|
|
1040
|
+
return /* @__PURE__ */ jsx4(BufferingIndicator, {
|
|
1041
1041
|
type: "player"
|
|
1042
1042
|
});
|
|
1043
1043
|
}
|
|
1044
1044
|
if (playing) {
|
|
1045
|
-
return jsx4(PauseIcon, {});
|
|
1045
|
+
return /* @__PURE__ */ jsx4(PauseIcon, {});
|
|
1046
1046
|
}
|
|
1047
|
-
return jsx4(PlayIcon, {});
|
|
1047
|
+
return /* @__PURE__ */ jsx4(PlayIcon, {});
|
|
1048
1048
|
};
|
|
1049
1049
|
|
|
1050
1050
|
// src/MediaVolumeSlider.tsx
|
|
@@ -1132,15 +1132,15 @@ var DefaultVolumeSlider = ({
|
|
|
1132
1132
|
width: ${KNOB_SIZE}px;
|
|
1133
1133
|
}
|
|
1134
1134
|
`;
|
|
1135
|
-
return jsxs3("div", {
|
|
1135
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
1136
1136
|
style: sliderContainer,
|
|
1137
1137
|
children: [
|
|
1138
|
-
jsx5("style", {
|
|
1138
|
+
/* @__PURE__ */ jsx5("style", {
|
|
1139
1139
|
dangerouslySetInnerHTML: {
|
|
1140
1140
|
__html: sliderStyle
|
|
1141
1141
|
}
|
|
1142
1142
|
}),
|
|
1143
|
-
jsx5("input", {
|
|
1143
|
+
/* @__PURE__ */ jsx5("input", {
|
|
1144
1144
|
ref: inputRef,
|
|
1145
1145
|
"aria-label": "Change volume",
|
|
1146
1146
|
className: randomClass,
|
|
@@ -1157,7 +1157,7 @@ var DefaultVolumeSlider = ({
|
|
|
1157
1157
|
});
|
|
1158
1158
|
};
|
|
1159
1159
|
var renderDefaultVolumeSlider = (props) => {
|
|
1160
|
-
return jsx5(DefaultVolumeSlider, {
|
|
1160
|
+
return /* @__PURE__ */ jsx5(DefaultVolumeSlider, {
|
|
1161
1161
|
...props
|
|
1162
1162
|
});
|
|
1163
1163
|
};
|
|
@@ -1216,7 +1216,7 @@ var MediaVolumeSlider2 = ({ displayVerticalVolumeSlider, renderMuteButton, rende
|
|
|
1216
1216
|
}, []);
|
|
1217
1217
|
const renderDefaultMuteButton = useCallback4(({ muted, volume }) => {
|
|
1218
1218
|
const isMutedOrZero = muted || volume === 0;
|
|
1219
|
-
return jsx6("button", {
|
|
1219
|
+
return /* @__PURE__ */ jsx6("button", {
|
|
1220
1220
|
"aria-label": isMutedOrZero ? "Unmute sound" : "Mute sound",
|
|
1221
1221
|
title: isMutedOrZero ? "Unmute sound" : "Mute sound",
|
|
1222
1222
|
onClick,
|
|
@@ -1224,7 +1224,7 @@ var MediaVolumeSlider2 = ({ displayVerticalVolumeSlider, renderMuteButton, rende
|
|
|
1224
1224
|
onFocus: () => setFocused(true),
|
|
1225
1225
|
style: volumeContainer,
|
|
1226
1226
|
type: "button",
|
|
1227
|
-
children: isMutedOrZero ? jsx6(VolumeOffIcon, {}) : jsx6(VolumeOnIcon, {})
|
|
1227
|
+
children: isMutedOrZero ? /* @__PURE__ */ jsx6(VolumeOffIcon, {}) : /* @__PURE__ */ jsx6(VolumeOnIcon, {})
|
|
1228
1228
|
});
|
|
1229
1229
|
}, [onBlur, onClick, volumeContainer]);
|
|
1230
1230
|
const muteButton = useMemo4(() => {
|
|
@@ -1247,7 +1247,7 @@ var MediaVolumeSlider2 = ({ displayVerticalVolumeSlider, renderMuteButton, rende
|
|
|
1247
1247
|
renderVolumeSlider,
|
|
1248
1248
|
setMediaVolume
|
|
1249
1249
|
]);
|
|
1250
|
-
return jsxs4("div", {
|
|
1250
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
1251
1251
|
ref: parentDivRef,
|
|
1252
1252
|
style: parentDivStyle,
|
|
1253
1253
|
children: [
|
|
@@ -1311,10 +1311,10 @@ var checkmarkStyle = {
|
|
|
1311
1311
|
height: 14,
|
|
1312
1312
|
color: "black"
|
|
1313
1313
|
};
|
|
1314
|
-
var Checkmark = () => jsx7("svg", {
|
|
1314
|
+
var Checkmark = () => /* @__PURE__ */ jsx7("svg", {
|
|
1315
1315
|
viewBox: "0 0 512 512",
|
|
1316
1316
|
style: checkmarkStyle,
|
|
1317
|
-
children: jsx7("path", {
|
|
1317
|
+
children: /* @__PURE__ */ jsx7("path", {
|
|
1318
1318
|
fill: "currentColor",
|
|
1319
1319
|
d: "M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"
|
|
1320
1320
|
})
|
|
@@ -1339,16 +1339,16 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
|
|
|
1339
1339
|
backgroundColor: hovered || isFocused ? "#eee" : "transparent"
|
|
1340
1340
|
};
|
|
1341
1341
|
}, [hovered, isFocused]);
|
|
1342
|
-
return jsxs5("div", {
|
|
1342
|
+
return /* @__PURE__ */ jsxs5("div", {
|
|
1343
1343
|
onMouseEnter,
|
|
1344
1344
|
onMouseLeave,
|
|
1345
1345
|
tabIndex: 0,
|
|
1346
1346
|
style: actualStyle,
|
|
1347
1347
|
onClick,
|
|
1348
1348
|
children: [
|
|
1349
|
-
jsx7("div", {
|
|
1349
|
+
/* @__PURE__ */ jsx7("div", {
|
|
1350
1350
|
style: checkmarkContainer,
|
|
1351
|
-
children: rate === selectedRate ? jsx7(Checkmark, {}) : null
|
|
1351
|
+
children: rate === selectedRate ? /* @__PURE__ */ jsx7(Checkmark, {}) : null
|
|
1352
1352
|
}),
|
|
1353
1353
|
rate.toFixed(1),
|
|
1354
1354
|
"x"
|
|
@@ -1414,10 +1414,10 @@ var PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
|
|
|
1414
1414
|
textAlign: "left"
|
|
1415
1415
|
};
|
|
1416
1416
|
}, [canvasSize.height]);
|
|
1417
|
-
return jsx7("div", {
|
|
1417
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
1418
1418
|
style: playbackPopup,
|
|
1419
1419
|
children: playbackRates.map((rate) => {
|
|
1420
|
-
return jsx7(PlaybackrateOption, {
|
|
1420
|
+
return /* @__PURE__ */ jsx7(PlaybackrateOption, {
|
|
1421
1421
|
selectedRate: playbackRate,
|
|
1422
1422
|
onSelect,
|
|
1423
1423
|
rate,
|
|
@@ -1464,22 +1464,22 @@ var PlaybackrateControl = ({ playbackRates, canvasSize }) => {
|
|
|
1464
1464
|
e.preventDefault();
|
|
1465
1465
|
setIsComponentVisible((prevIsComponentVisible) => !prevIsComponentVisible);
|
|
1466
1466
|
}, [setIsComponentVisible]);
|
|
1467
|
-
return jsx7("div", {
|
|
1467
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
1468
1468
|
ref,
|
|
1469
|
-
children: jsxs5("button", {
|
|
1469
|
+
children: /* @__PURE__ */ jsxs5("button", {
|
|
1470
1470
|
type: "button",
|
|
1471
1471
|
"aria-label": "Change playback rate",
|
|
1472
1472
|
style: button,
|
|
1473
1473
|
onClick,
|
|
1474
1474
|
children: [
|
|
1475
|
-
jsxs5("div", {
|
|
1475
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1476
1476
|
style: label,
|
|
1477
1477
|
children: [
|
|
1478
1478
|
playbackRate,
|
|
1479
1479
|
"x"
|
|
1480
1480
|
]
|
|
1481
1481
|
}),
|
|
1482
|
-
isComponentVisible && jsx7(PlaybackPopup, {
|
|
1482
|
+
isComponentVisible && /* @__PURE__ */ jsx7(PlaybackPopup, {
|
|
1483
1483
|
canvasSize,
|
|
1484
1484
|
playbackRates,
|
|
1485
1485
|
setIsComponentVisible
|
|
@@ -1626,23 +1626,23 @@ var PlayerSeekBar = ({ durationInFrames, onSeekEnd, onSeekStart, inFrame, outFra
|
|
|
1626
1626
|
position: "absolute"
|
|
1627
1627
|
};
|
|
1628
1628
|
}, [durationInFrames, inFrame, outFrame]);
|
|
1629
|
-
return jsxs6("div", {
|
|
1629
|
+
return /* @__PURE__ */ jsxs6("div", {
|
|
1630
1630
|
ref: containerRef,
|
|
1631
1631
|
onPointerDown,
|
|
1632
1632
|
style: containerStyle,
|
|
1633
1633
|
children: [
|
|
1634
|
-
jsxs6("div", {
|
|
1634
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1635
1635
|
style: barBackground,
|
|
1636
1636
|
children: [
|
|
1637
|
-
jsx8("div", {
|
|
1637
|
+
/* @__PURE__ */ jsx8("div", {
|
|
1638
1638
|
style: active
|
|
1639
1639
|
}),
|
|
1640
|
-
jsx8("div", {
|
|
1640
|
+
/* @__PURE__ */ jsx8("div", {
|
|
1641
1641
|
style: fillStyle
|
|
1642
1642
|
})
|
|
1643
1643
|
]
|
|
1644
1644
|
}),
|
|
1645
|
-
jsx8("div", {
|
|
1645
|
+
/* @__PURE__ */ jsx8("div", {
|
|
1646
1646
|
style: knobStyle
|
|
1647
1647
|
})
|
|
1648
1648
|
]
|
|
@@ -1892,53 +1892,53 @@ var Controls = ({
|
|
|
1892
1892
|
onDoubleClick?.(e);
|
|
1893
1893
|
}
|
|
1894
1894
|
}, [onDoubleClick]);
|
|
1895
|
-
return jsxs7("div", {
|
|
1895
|
+
return /* @__PURE__ */ jsxs7("div", {
|
|
1896
1896
|
ref,
|
|
1897
1897
|
style: containerCss,
|
|
1898
1898
|
onPointerDown: onPointerDownIfContainer,
|
|
1899
1899
|
onDoubleClick: onDoubleClickIfContainer,
|
|
1900
1900
|
children: [
|
|
1901
|
-
jsxs7("div", {
|
|
1901
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
1902
1902
|
ref: flexRef,
|
|
1903
1903
|
style: controlsRow,
|
|
1904
1904
|
children: [
|
|
1905
|
-
jsxs7("div", {
|
|
1905
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
1906
1906
|
style: leftPartStyle,
|
|
1907
1907
|
children: [
|
|
1908
|
-
jsx9("button", {
|
|
1908
|
+
/* @__PURE__ */ jsx9("button", {
|
|
1909
1909
|
ref: playButtonRef,
|
|
1910
1910
|
type: "button",
|
|
1911
1911
|
style: playerButtonStyle,
|
|
1912
1912
|
onClick: player.playing ? player.pause : player.play,
|
|
1913
1913
|
"aria-label": player.playing ? "Pause video" : "Play video",
|
|
1914
1914
|
title: player.playing ? "Pause video" : "Play video",
|
|
1915
|
-
children: renderPlayPauseButton === null ? jsx9(DefaultPlayPauseButton, {
|
|
1915
|
+
children: renderPlayPauseButton === null ? /* @__PURE__ */ jsx9(DefaultPlayPauseButton, {
|
|
1916
1916
|
buffering,
|
|
1917
1917
|
playing: player.playing
|
|
1918
1918
|
}) : renderPlayPauseButton({
|
|
1919
1919
|
playing: player.playing,
|
|
1920
1920
|
isBuffering: buffering
|
|
1921
|
-
}) ?? jsx9(DefaultPlayPauseButton, {
|
|
1921
|
+
}) ?? /* @__PURE__ */ jsx9(DefaultPlayPauseButton, {
|
|
1922
1922
|
buffering,
|
|
1923
1923
|
playing: player.playing
|
|
1924
1924
|
})
|
|
1925
1925
|
}),
|
|
1926
|
-
showVolumeControls ? jsxs7(Fragment2, {
|
|
1926
|
+
showVolumeControls ? /* @__PURE__ */ jsxs7(Fragment2, {
|
|
1927
1927
|
children: [
|
|
1928
|
-
jsx9("div", {
|
|
1928
|
+
/* @__PURE__ */ jsx9("div", {
|
|
1929
1929
|
style: xSpacer
|
|
1930
1930
|
}),
|
|
1931
|
-
jsx9(MediaVolumeSlider2, {
|
|
1931
|
+
/* @__PURE__ */ jsx9(MediaVolumeSlider2, {
|
|
1932
1932
|
renderMuteButton,
|
|
1933
1933
|
renderVolumeSlider,
|
|
1934
1934
|
displayVerticalVolumeSlider
|
|
1935
1935
|
})
|
|
1936
1936
|
]
|
|
1937
1937
|
}) : null,
|
|
1938
|
-
jsx9("div", {
|
|
1938
|
+
/* @__PURE__ */ jsx9("div", {
|
|
1939
1939
|
style: xSpacer
|
|
1940
1940
|
}),
|
|
1941
|
-
jsxs7("div", {
|
|
1941
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
1942
1942
|
style: timeLabel,
|
|
1943
1943
|
children: [
|
|
1944
1944
|
formatTime(frame / fps),
|
|
@@ -1946,40 +1946,40 @@ var Controls = ({
|
|
|
1946
1946
|
formatTime(durationInFrames / fps)
|
|
1947
1947
|
]
|
|
1948
1948
|
}),
|
|
1949
|
-
jsx9("div", {
|
|
1949
|
+
/* @__PURE__ */ jsx9("div", {
|
|
1950
1950
|
style: xSpacer
|
|
1951
1951
|
})
|
|
1952
1952
|
]
|
|
1953
1953
|
}),
|
|
1954
|
-
jsx9("div", {
|
|
1954
|
+
/* @__PURE__ */ jsx9("div", {
|
|
1955
1955
|
style: flex1
|
|
1956
1956
|
}),
|
|
1957
|
-
playbackRates && canvasSize && jsx9(PlaybackrateControl, {
|
|
1957
|
+
playbackRates && canvasSize && /* @__PURE__ */ jsx9(PlaybackrateControl, {
|
|
1958
1958
|
canvasSize,
|
|
1959
1959
|
playbackRates
|
|
1960
1960
|
}),
|
|
1961
|
-
playbackRates && supportsFullscreen && allowFullscreen ? jsx9("div", {
|
|
1961
|
+
playbackRates && supportsFullscreen && allowFullscreen ? /* @__PURE__ */ jsx9("div", {
|
|
1962
1962
|
style: xSpacer
|
|
1963
1963
|
}) : null,
|
|
1964
|
-
jsx9("div", {
|
|
1964
|
+
/* @__PURE__ */ jsx9("div", {
|
|
1965
1965
|
style: fullscreen,
|
|
1966
|
-
children: supportsFullscreen && allowFullscreen ? jsx9("button", {
|
|
1966
|
+
children: supportsFullscreen && allowFullscreen ? /* @__PURE__ */ jsx9("button", {
|
|
1967
1967
|
type: "button",
|
|
1968
1968
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter Fullscreen",
|
|
1969
1969
|
title: isFullscreen ? "Exit fullscreen" : "Enter Fullscreen",
|
|
1970
1970
|
style: playerButtonStyle,
|
|
1971
1971
|
onClick: isFullscreen ? onExitFullscreenButtonClick : onFullscreenButtonClick,
|
|
1972
|
-
children: renderFullscreenButton === null ? jsx9(FullscreenIcon, {
|
|
1972
|
+
children: renderFullscreenButton === null ? /* @__PURE__ */ jsx9(FullscreenIcon, {
|
|
1973
1973
|
isFullscreen
|
|
1974
1974
|
}) : renderFullscreenButton({ isFullscreen })
|
|
1975
1975
|
}) : null
|
|
1976
1976
|
})
|
|
1977
1977
|
]
|
|
1978
1978
|
}),
|
|
1979
|
-
jsx9("div", {
|
|
1979
|
+
/* @__PURE__ */ jsx9("div", {
|
|
1980
1980
|
style: ySpacer
|
|
1981
1981
|
}),
|
|
1982
|
-
jsx9(PlayerSeekBar, {
|
|
1982
|
+
/* @__PURE__ */ jsx9(PlayerSeekBar, {
|
|
1983
1983
|
onSeekEnd,
|
|
1984
1984
|
onSeekStart,
|
|
1985
1985
|
durationInFrames,
|
|
@@ -2014,7 +2014,7 @@ class ErrorBoundary extends React7.Component {
|
|
|
2014
2014
|
}
|
|
2015
2015
|
render() {
|
|
2016
2016
|
if (this.state.hasError) {
|
|
2017
|
-
return jsx10("div", {
|
|
2017
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
2018
2018
|
style: errorStyle,
|
|
2019
2019
|
children: this.props.errorFallback({
|
|
2020
2020
|
error: this.state.hasError
|
|
@@ -2506,30 +2506,30 @@ var PlayerUI = ({
|
|
|
2506
2506
|
showPosterWhenBuffering && showBufferIndicator && player.isPlaying()
|
|
2507
2507
|
].some(Boolean);
|
|
2508
2508
|
const { left, top, width, height, ...outerWithoutScale } = outer;
|
|
2509
|
-
const content = jsxs8(Fragment3, {
|
|
2509
|
+
const content = /* @__PURE__ */ jsxs8(Fragment3, {
|
|
2510
2510
|
children: [
|
|
2511
|
-
jsx11("div", {
|
|
2511
|
+
/* @__PURE__ */ jsx11("div", {
|
|
2512
2512
|
style: outer,
|
|
2513
2513
|
onPointerDown: clickToPlay ? handlePointerDown : undefined,
|
|
2514
2514
|
onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined,
|
|
2515
|
-
children: jsxs8("div", {
|
|
2515
|
+
children: /* @__PURE__ */ jsxs8("div", {
|
|
2516
2516
|
style: containerStyle3,
|
|
2517
2517
|
className: PLAYER_CSS_CLASSNAME,
|
|
2518
2518
|
children: [
|
|
2519
|
-
VideoComponent ? jsx11(ErrorBoundary, {
|
|
2519
|
+
VideoComponent ? /* @__PURE__ */ jsx11(ErrorBoundary, {
|
|
2520
2520
|
onError,
|
|
2521
2521
|
errorFallback,
|
|
2522
|
-
children: jsx11(Internals10.ClipComposition, {
|
|
2523
|
-
children: jsx11(Internals10.CurrentScaleContext.Provider, {
|
|
2522
|
+
children: /* @__PURE__ */ jsx11(Internals10.ClipComposition, {
|
|
2523
|
+
children: /* @__PURE__ */ jsx11(Internals10.CurrentScaleContext.Provider, {
|
|
2524
2524
|
value: currentScale,
|
|
2525
|
-
children: jsx11(VideoComponent, {
|
|
2525
|
+
children: /* @__PURE__ */ jsx11(VideoComponent, {
|
|
2526
2526
|
...video?.props ?? {},
|
|
2527
2527
|
...inputProps ?? {}
|
|
2528
2528
|
})
|
|
2529
2529
|
})
|
|
2530
2530
|
})
|
|
2531
2531
|
}) : null,
|
|
2532
|
-
shouldShowPoster && posterFillMode === "composition-size" ? jsx11("div", {
|
|
2532
|
+
shouldShowPoster && posterFillMode === "composition-size" ? /* @__PURE__ */ jsx11("div", {
|
|
2533
2533
|
style: {
|
|
2534
2534
|
...outerWithoutScale,
|
|
2535
2535
|
width: config.width,
|
|
@@ -2542,13 +2542,13 @@ var PlayerUI = ({
|
|
|
2542
2542
|
]
|
|
2543
2543
|
})
|
|
2544
2544
|
}),
|
|
2545
|
-
shouldShowPoster && posterFillMode === "player-size" ? jsx11("div", {
|
|
2545
|
+
shouldShowPoster && posterFillMode === "player-size" ? /* @__PURE__ */ jsx11("div", {
|
|
2546
2546
|
style: outer,
|
|
2547
2547
|
onPointerDown: clickToPlay ? handlePointerDown : undefined,
|
|
2548
2548
|
onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined,
|
|
2549
2549
|
children: poster
|
|
2550
2550
|
}) : null,
|
|
2551
|
-
controls ? jsx11(Controls, {
|
|
2551
|
+
controls ? /* @__PURE__ */ jsx11(Controls, {
|
|
2552
2552
|
fps: config.fps,
|
|
2553
2553
|
durationInFrames: config.durationInFrames,
|
|
2554
2554
|
player,
|
|
@@ -2579,18 +2579,18 @@ var PlayerUI = ({
|
|
|
2579
2579
|
]
|
|
2580
2580
|
});
|
|
2581
2581
|
if (IS_NODE && !doesReactVersionSupportSuspense) {
|
|
2582
|
-
return jsx11("div", {
|
|
2582
|
+
return /* @__PURE__ */ jsx11("div", {
|
|
2583
2583
|
ref: container,
|
|
2584
2584
|
style: outerStyle,
|
|
2585
2585
|
className: className2,
|
|
2586
2586
|
children: content
|
|
2587
2587
|
});
|
|
2588
2588
|
}
|
|
2589
|
-
return jsx11("div", {
|
|
2589
|
+
return /* @__PURE__ */ jsx11("div", {
|
|
2590
2590
|
ref: container,
|
|
2591
2591
|
style: outerStyle,
|
|
2592
2592
|
className: className2,
|
|
2593
|
-
children: jsx11(Suspense, {
|
|
2593
|
+
children: /* @__PURE__ */ jsx11(Suspense, {
|
|
2594
2594
|
fallback: loadingMarkup,
|
|
2595
2595
|
children: content
|
|
2596
2596
|
})
|
|
@@ -2704,23 +2704,23 @@ var SharedPlayerContexts = ({
|
|
|
2704
2704
|
setMediaVolume: setMediaVolumeAndPersist
|
|
2705
2705
|
};
|
|
2706
2706
|
}, [setMediaVolumeAndPersist]);
|
|
2707
|
-
return jsx12(Internals11.CanUseRemotionHooksProvider, {
|
|
2708
|
-
children: jsx12(Internals11.Timeline.TimelineContext.Provider, {
|
|
2707
|
+
return /* @__PURE__ */ jsx12(Internals11.CanUseRemotionHooksProvider, {
|
|
2708
|
+
children: /* @__PURE__ */ jsx12(Internals11.Timeline.TimelineContext.Provider, {
|
|
2709
2709
|
value: timelineContext,
|
|
2710
|
-
children: jsx12(Internals11.CompositionManager.Provider, {
|
|
2710
|
+
children: /* @__PURE__ */ jsx12(Internals11.CompositionManager.Provider, {
|
|
2711
2711
|
value: compositionManagerContext,
|
|
2712
|
-
children: jsx12(Internals11.ResolveCompositionConfig, {
|
|
2713
|
-
children: jsx12(Internals11.PrefetchProvider, {
|
|
2714
|
-
children: jsx12(Internals11.DurationsContextProvider, {
|
|
2715
|
-
children: jsx12(Internals11.MediaVolumeContext.Provider, {
|
|
2712
|
+
children: /* @__PURE__ */ jsx12(Internals11.ResolveCompositionConfig, {
|
|
2713
|
+
children: /* @__PURE__ */ jsx12(Internals11.PrefetchProvider, {
|
|
2714
|
+
children: /* @__PURE__ */ jsx12(Internals11.DurationsContextProvider, {
|
|
2715
|
+
children: /* @__PURE__ */ jsx12(Internals11.MediaVolumeContext.Provider, {
|
|
2716
2716
|
value: mediaVolumeContextValue,
|
|
2717
|
-
children: jsx12(Internals11.NativeLayersProvider, {
|
|
2718
|
-
children: jsx12(Internals11.SetMediaVolumeContext.Provider, {
|
|
2717
|
+
children: /* @__PURE__ */ jsx12(Internals11.NativeLayersProvider, {
|
|
2718
|
+
children: /* @__PURE__ */ jsx12(Internals11.SetMediaVolumeContext.Provider, {
|
|
2719
2719
|
value: setMediaVolumeContextValue,
|
|
2720
|
-
children: jsx12(Internals11.SharedAudioContextProvider, {
|
|
2720
|
+
children: /* @__PURE__ */ jsx12(Internals11.SharedAudioContextProvider, {
|
|
2721
2721
|
numberOfAudioTags: numberOfSharedAudioTags,
|
|
2722
2722
|
component,
|
|
2723
|
-
children: jsx12(Internals11.BufferingProvider, {
|
|
2723
|
+
children: /* @__PURE__ */ jsx12(Internals11.BufferingProvider, {
|
|
2724
2724
|
children
|
|
2725
2725
|
})
|
|
2726
2726
|
})
|
|
@@ -2987,8 +2987,8 @@ var PlayerFn = ({
|
|
|
2987
2987
|
}, []);
|
|
2988
2988
|
}
|
|
2989
2989
|
const actualInputProps = useMemo13(() => inputProps ?? {}, [inputProps]);
|
|
2990
|
-
return jsx13(Internals12.IsPlayerContextProvider, {
|
|
2991
|
-
children: jsx13(SharedPlayerContexts, {
|
|
2990
|
+
return /* @__PURE__ */ jsx13(Internals12.IsPlayerContextProvider, {
|
|
2991
|
+
children: /* @__PURE__ */ jsx13(SharedPlayerContexts, {
|
|
2992
2992
|
timelineContext: timelineContextValue,
|
|
2993
2993
|
component,
|
|
2994
2994
|
compositionHeight,
|
|
@@ -2997,11 +2997,11 @@ var PlayerFn = ({
|
|
|
2997
2997
|
fps,
|
|
2998
2998
|
numberOfSharedAudioTags,
|
|
2999
2999
|
initiallyMuted,
|
|
3000
|
-
children: jsx13(Internals12.Timeline.SetTimelineContext.Provider, {
|
|
3000
|
+
children: /* @__PURE__ */ jsx13(Internals12.Timeline.SetTimelineContext.Provider, {
|
|
3001
3001
|
value: setTimelineContextValue,
|
|
3002
|
-
children: jsx13(PlayerEmitterProvider, {
|
|
3002
|
+
children: /* @__PURE__ */ jsx13(PlayerEmitterProvider, {
|
|
3003
3003
|
currentPlaybackRate,
|
|
3004
|
-
children: jsx13(PlayerUI_default, {
|
|
3004
|
+
children: /* @__PURE__ */ jsx13(PlayerUI_default, {
|
|
3005
3005
|
ref: rootRef,
|
|
3006
3006
|
posterFillMode,
|
|
3007
3007
|
renderLoading,
|
|
@@ -3044,7 +3044,6 @@ var PlayerFn = ({
|
|
|
3044
3044
|
};
|
|
3045
3045
|
var forward = forwardRef2;
|
|
3046
3046
|
var Player = forward(PlayerFn);
|
|
3047
|
-
|
|
3048
3047
|
// src/Thumbnail.tsx
|
|
3049
3048
|
import {
|
|
3050
3049
|
forwardRef as forwardRef4,
|
|
@@ -3155,17 +3154,17 @@ var ThumbnailUI = ({ style, inputProps, errorFallback, renderLoading, className:
|
|
|
3155
3154
|
if (!config) {
|
|
3156
3155
|
return null;
|
|
3157
3156
|
}
|
|
3158
|
-
const content = jsx14("div", {
|
|
3157
|
+
const content = /* @__PURE__ */ jsx14("div", {
|
|
3159
3158
|
style: outer,
|
|
3160
|
-
children: jsx14("div", {
|
|
3159
|
+
children: /* @__PURE__ */ jsx14("div", {
|
|
3161
3160
|
style: containerStyle3,
|
|
3162
3161
|
className: PLAYER_CSS_CLASSNAME,
|
|
3163
|
-
children: VideoComponent ? jsx14(ErrorBoundary, {
|
|
3162
|
+
children: VideoComponent ? /* @__PURE__ */ jsx14(ErrorBoundary, {
|
|
3164
3163
|
onError,
|
|
3165
3164
|
errorFallback,
|
|
3166
|
-
children: jsx14(Internals13.CurrentScaleContext.Provider, {
|
|
3165
|
+
children: /* @__PURE__ */ jsx14(Internals13.CurrentScaleContext.Provider, {
|
|
3167
3166
|
value: currentScaleContext,
|
|
3168
|
-
children: jsx14(VideoComponent, {
|
|
3167
|
+
children: /* @__PURE__ */ jsx14(VideoComponent, {
|
|
3169
3168
|
...video?.props ?? {},
|
|
3170
3169
|
...inputProps ?? {}
|
|
3171
3170
|
})
|
|
@@ -3174,18 +3173,18 @@ var ThumbnailUI = ({ style, inputProps, errorFallback, renderLoading, className:
|
|
|
3174
3173
|
})
|
|
3175
3174
|
});
|
|
3176
3175
|
if (IS_NODE && !doesReactVersionSupportSuspense2) {
|
|
3177
|
-
return jsx14("div", {
|
|
3176
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
3178
3177
|
ref: container,
|
|
3179
3178
|
style: outerStyle,
|
|
3180
3179
|
className: className2,
|
|
3181
3180
|
children: content
|
|
3182
3181
|
});
|
|
3183
3182
|
}
|
|
3184
|
-
return jsx14("div", {
|
|
3183
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
3185
3184
|
ref: container,
|
|
3186
3185
|
style: outerStyle,
|
|
3187
3186
|
className: className2,
|
|
3188
|
-
children: jsx14(Suspense2, {
|
|
3187
|
+
children: /* @__PURE__ */ jsx14(Suspense2, {
|
|
3189
3188
|
fallback: loadingMarkup,
|
|
3190
3189
|
children: content
|
|
3191
3190
|
})
|
|
@@ -3242,8 +3241,8 @@ var ThumbnailFn = ({
|
|
|
3242
3241
|
const passedInputProps = useMemo16(() => {
|
|
3243
3242
|
return inputProps ?? {};
|
|
3244
3243
|
}, [inputProps]);
|
|
3245
|
-
return jsx15(Internals14.IsPlayerContextProvider, {
|
|
3246
|
-
children: jsx15(SharedPlayerContexts, {
|
|
3244
|
+
return /* @__PURE__ */ jsx15(Internals14.IsPlayerContextProvider, {
|
|
3245
|
+
children: /* @__PURE__ */ jsx15(SharedPlayerContexts, {
|
|
3247
3246
|
timelineContext: timelineState,
|
|
3248
3247
|
component: Component,
|
|
3249
3248
|
compositionHeight,
|
|
@@ -3252,9 +3251,9 @@ var ThumbnailFn = ({
|
|
|
3252
3251
|
fps,
|
|
3253
3252
|
numberOfSharedAudioTags: 0,
|
|
3254
3253
|
initiallyMuted: true,
|
|
3255
|
-
children: jsx15(ThumbnailEmitterContext.Provider, {
|
|
3254
|
+
children: /* @__PURE__ */ jsx15(ThumbnailEmitterContext.Provider, {
|
|
3256
3255
|
value: emitter,
|
|
3257
|
-
children: jsx15(ThumbnailUI_default, {
|
|
3256
|
+
children: /* @__PURE__ */ jsx15(ThumbnailUI_default, {
|
|
3258
3257
|
ref: rootRef,
|
|
3259
3258
|
className: className2,
|
|
3260
3259
|
errorFallback,
|
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.209",
|
|
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.209"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": ">=16.8.0",
|