@remotion/player 4.0.149 → 4.0.151

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/bundle.ts CHANGED
@@ -1,4 +1,17 @@
1
- import {build} from 'bun';
1
+ import {build, revision} from 'bun';
2
+
3
+ if (process.env.NODE_ENV !== 'production') {
4
+ throw new Error('This script must be run using NODE_ENV=production');
5
+ }
6
+
7
+ if (!revision.startsWith('07ce')) {
8
+ // eslint-disable-next-line no-console
9
+ console.warn('warn: Remotion currently uses a fork of Bun to bundle.');
10
+ // eslint-disable-next-line no-console
11
+ console.log(
12
+ 'You dont currently run the fork, this could lead to duplicate key warnings in React.',
13
+ );
14
+ }
2
15
 
3
16
  const output = await build({
4
17
  entrypoints: ['src/index.ts'],
@@ -8,9 +21,7 @@ const output = await build({
8
21
  });
9
22
 
10
23
  const [file] = output.outputs;
11
- const text = (await file.text())
12
- .replace(/jsxDEV/g, 'jsx')
13
- .replace(/react\/jsx-dev-runtime/g, 'react/jsx-runtime');
24
+ const text = await file.text();
14
25
 
15
26
  await Bun.write('dist/esm/index.mjs', `"use client";\n${text}`);
16
27
 
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  // src/icons.tsx
3
3
  import {
4
- jsx
4
+ jsx,
5
+ jsxs
5
6
  } from "react/jsx-runtime";
6
7
  var ICON_SIZE = 25;
7
8
  var fullscreenIconSize = 16;
@@ -17,11 +18,11 @@ var PlayIcon = () => {
17
18
  stroke: "white",
18
19
  strokeWidth: "6.25",
19
20
  strokeLinejoin: "round"
20
- }, undefined, false, undefined, this)
21
- }, undefined, false, undefined, this);
21
+ })
22
+ });
22
23
  };
23
24
  var PauseIcon = () => {
24
- return jsx("svg", {
25
+ return jsxs("svg", {
25
26
  viewBox: "0 0 100 100",
26
27
  width: ICON_SIZE,
27
28
  height: ICON_SIZE,
@@ -34,7 +35,7 @@ var PauseIcon = () => {
34
35
  fill: "#fff",
35
36
  ry: "5",
36
37
  rx: "5"
37
- }, undefined, false, undefined, this),
38
+ }),
38
39
  jsx("rect", {
39
40
  x: "55",
40
41
  y: "20",
@@ -43,9 +44,9 @@ var PauseIcon = () => {
43
44
  fill: "#fff",
44
45
  ry: "5",
45
46
  rx: "5"
46
- }, undefined, false, undefined, this)
47
+ })
47
48
  ]
48
- }, undefined, true, undefined, this);
49
+ });
49
50
  };
50
51
  var FullscreenIcon = ({
51
52
  isFullscreen
@@ -55,7 +56,7 @@ var FullscreenIcon = ({
55
56
  const out = isFullscreen ? 0 : strokeWidth / 2;
56
57
  const middleInset = isFullscreen ? strokeWidth * 1.6 : strokeWidth / 2;
57
58
  const inset = isFullscreen ? strokeWidth * 1.6 : strokeWidth * 2;
58
- return jsx("svg", {
59
+ return jsxs("svg", {
59
60
  viewBox: `0 0 ${viewSize} ${viewSize}`,
60
61
  height: fullscreenIconSize,
61
62
  width: fullscreenIconSize,
@@ -69,7 +70,7 @@ var FullscreenIcon = ({
69
70
  stroke: "#fff",
70
71
  strokeWidth,
71
72
  fill: "none"
72
- }, undefined, false, undefined, this),
73
+ }),
73
74
  jsx("path", {
74
75
  d: `
75
76
  M ${viewSize - out} ${inset}
@@ -79,7 +80,7 @@ var FullscreenIcon = ({
79
80
  stroke: "#fff",
80
81
  strokeWidth,
81
82
  fill: "none"
82
- }, undefined, false, undefined, this),
83
+ }),
83
84
  jsx("path", {
84
85
  d: `
85
86
  M ${out} ${viewSize - inset}
@@ -89,7 +90,7 @@ var FullscreenIcon = ({
89
90
  stroke: "#fff",
90
91
  strokeWidth,
91
92
  fill: "none"
92
- }, undefined, false, undefined, this),
93
+ }),
93
94
  jsx("path", {
94
95
  d: `
95
96
  M ${viewSize - out} ${viewSize - inset}
@@ -99,9 +100,9 @@ var FullscreenIcon = ({
99
100
  stroke: "#fff",
100
101
  strokeWidth,
101
102
  fill: "none"
102
- }, undefined, false, undefined, this)
103
+ })
103
104
  ]
104
- }, undefined, true, undefined, this);
105
+ });
105
106
  };
106
107
  var VolumeOffIcon = () => {
107
108
  return jsx("svg", {
@@ -111,8 +112,8 @@ var VolumeOffIcon = () => {
111
112
  children: jsx("path", {
112
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",
113
114
  fill: "#fff"
114
- }, undefined, false, undefined, this)
115
- }, undefined, false, undefined, this);
115
+ })
116
+ });
116
117
  };
117
118
  var VolumeOnIcon = () => {
118
119
  return jsx("svg", {
@@ -122,13 +123,14 @@ var VolumeOnIcon = () => {
122
123
  children: jsx("path", {
123
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",
124
125
  fill: "#fff"
125
- }, undefined, false, undefined, this)
126
- }, undefined, false, undefined, this);
126
+ })
127
+ });
127
128
  };
128
129
 
129
130
  // src/BufferingIndicator.tsx
130
131
  import {
131
132
  jsx as jsx2,
133
+ jsxs as jsxs2,
132
134
  Fragment
133
135
  } from "react/jsx-runtime";
134
136
  var className = "__remotion_buffering_indicator";
@@ -149,7 +151,7 @@ var studioStyle = {
149
151
  };
150
152
  var BufferingIndicator = ({ type }) => {
151
153
  const style = type === "player" ? playerStyle : studioStyle;
152
- return jsx2(Fragment, {
154
+ return jsxs2(Fragment, {
153
155
  children: [
154
156
  jsx2("style", {
155
157
  type: "text/css",
@@ -167,7 +169,7 @@ var BufferingIndicator = ({ type }) => {
167
169
  animation: ${remotionBufferingAnimation} 1s linear infinite;
168
170
  }
169
171
  `
170
- }, undefined, false, undefined, this),
172
+ }),
171
173
  jsx2("div", {
172
174
  style,
173
175
  children: jsx2("svg", {
@@ -180,11 +182,11 @@ var BufferingIndicator = ({ type }) => {
180
182
  strokeLinecap: "round",
181
183
  fill: "none",
182
184
  strokeWidth: 3
183
- }, undefined, false, undefined, this)
184
- }, undefined, false, undefined, this)
185
- }, undefined, false, undefined, this)
185
+ })
186
+ })
187
+ })
186
188
  ]
187
- }, undefined, true, undefined, this);
189
+ });
188
190
  };
189
191
 
190
192
  // src/calculate-scale.ts
@@ -475,7 +477,7 @@ var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
475
477
  return jsx3(PlayerEventEmitterContext.Provider, {
476
478
  value: emitter,
477
479
  children
478
- }, undefined, false, undefined, this);
480
+ });
479
481
  };
480
482
 
481
483
  // src/use-hover-state.ts
@@ -1034,19 +1036,20 @@ var DefaultPlayPauseButton = ({ playing, buffering }) => {
1034
1036
  if (playing && buffering) {
1035
1037
  return jsx4(BufferingIndicator, {
1036
1038
  type: "player"
1037
- }, undefined, false, undefined, this);
1039
+ });
1038
1040
  }
1039
1041
  if (playing) {
1040
- return jsx4(PauseIcon, {}, undefined, false, undefined, this);
1042
+ return jsx4(PauseIcon, {});
1041
1043
  }
1042
- return jsx4(PlayIcon, {}, undefined, false, undefined, this);
1044
+ return jsx4(PlayIcon, {});
1043
1045
  };
1044
1046
 
1045
1047
  // src/MediaVolumeSlider.tsx
1046
1048
  import React3, {useCallback as useCallback3, useMemo as useMemo3, useRef as useRef4, useState as useState5} from "react";
1047
1049
  import {Internals as Internals6, random} from "remotion";
1048
1050
  import {
1049
- jsx as jsx5
1051
+ jsx as jsx5,
1052
+ jsxs as jsxs3
1050
1053
  } from "react/jsx-runtime";
1051
1054
  var BAR_HEIGHT = 5;
1052
1055
  var KNOB_SIZE = 12;
@@ -1161,7 +1164,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider }) => {
1161
1164
  width: ${KNOB_SIZE}px;
1162
1165
  }
1163
1166
  `;
1164
- return jsx5("div", {
1167
+ return jsxs3("div", {
1165
1168
  ref: parentDivRef,
1166
1169
  style: parentDivStyle,
1167
1170
  children: [
@@ -1169,7 +1172,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider }) => {
1169
1172
  dangerouslySetInnerHTML: {
1170
1173
  __html: sliderStyle
1171
1174
  }
1172
- }, undefined, false, undefined, this),
1175
+ }),
1173
1176
  jsx5("button", {
1174
1177
  "aria-label": isMutedOrZero ? "Unmute sound" : "Mute sound",
1175
1178
  title: isMutedOrZero ? "Unmute sound" : "Mute sound",
@@ -1178,8 +1181,8 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider }) => {
1178
1181
  onFocus: () => setFocused(true),
1179
1182
  style: volumeContainer,
1180
1183
  type: "button",
1181
- children: isMutedOrZero ? jsx5(VolumeOffIcon, {}, undefined, false, undefined, this) : jsx5(VolumeOnIcon, {}, undefined, false, undefined, this)
1182
- }, undefined, false, undefined, this),
1184
+ children: isMutedOrZero ? jsx5(VolumeOffIcon, {}) : jsx5(VolumeOnIcon, {})
1185
+ }),
1183
1186
  (focused || hover) && !mediaMuted && !Internals6.isIosSafari() ? jsx5("div", {
1184
1187
  style: sliderContainer,
1185
1188
  children: jsx5("input", {
@@ -1194,10 +1197,10 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider }) => {
1194
1197
  type: "range",
1195
1198
  value: mediaVolume,
1196
1199
  style: inputStyle
1197
- }, undefined, false, undefined, this)
1198
- }, undefined, false, undefined, this) : null
1200
+ })
1201
+ }) : null
1199
1202
  ]
1200
- }, undefined, true, undefined, this);
1203
+ });
1201
1204
  };
1202
1205
 
1203
1206
  // src/PlaybackrateControl.tsx
@@ -1231,7 +1234,8 @@ function useComponentVisible(initialIsVisible) {
1231
1234
 
1232
1235
  // src/PlaybackrateControl.tsx
1233
1236
  import {
1234
- jsx as jsx6
1237
+ jsx as jsx6,
1238
+ jsxs as jsxs4
1235
1239
  } from "react/jsx-runtime";
1236
1240
  var BOTTOM = 35;
1237
1241
  var THRESHOLD = 70;
@@ -1259,8 +1263,8 @@ var Checkmark = () => jsx6("svg", {
1259
1263
  children: jsx6("path", {
1260
1264
  fill: "currentColor",
1261
1265
  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"
1262
- }, undefined, false, undefined, this)
1263
- }, undefined, false, undefined, this);
1266
+ })
1267
+ });
1264
1268
  var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }) => {
1265
1269
  const onClick = useCallback4((e) => {
1266
1270
  e.stopPropagation();
@@ -1281,7 +1285,7 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
1281
1285
  backgroundColor: hovered || isFocused ? "#eee" : "transparent"
1282
1286
  };
1283
1287
  }, [hovered, isFocused]);
1284
- return jsx6("div", {
1288
+ return jsxs4("div", {
1285
1289
  onMouseEnter,
1286
1290
  onMouseLeave,
1287
1291
  tabIndex: 0,
@@ -1290,12 +1294,12 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
1290
1294
  children: [
1291
1295
  jsx6("div", {
1292
1296
  style: checkmarkContainer,
1293
- children: rate === selectedRate ? jsx6(Checkmark, {}, undefined, false, undefined, this) : null
1294
- }, undefined, false, undefined, this),
1297
+ children: rate === selectedRate ? jsx6(Checkmark, {}) : null
1298
+ }),
1295
1299
  rate.toFixed(1),
1296
1300
  "x"
1297
1301
  ]
1298
- }, rate, true, undefined, this);
1302
+ }, rate);
1299
1303
  };
1300
1304
  var PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
1301
1305
  const { setPlaybackRate, playbackRate } = useContext5(Internals7.Timeline.TimelineContext);
@@ -1364,9 +1368,9 @@ var PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
1364
1368
  onSelect,
1365
1369
  rate,
1366
1370
  keyboardSelectedRate
1367
- }, rate, false, undefined, this);
1371
+ }, rate);
1368
1372
  })
1369
- }, undefined, false, undefined, this);
1373
+ });
1370
1374
  };
1371
1375
  var label = {
1372
1376
  fontSize: 13,
@@ -1408,34 +1412,35 @@ var PlaybackrateControl = ({ playbackRates, canvasSize }) => {
1408
1412
  }, [setIsComponentVisible]);
1409
1413
  return jsx6("div", {
1410
1414
  ref,
1411
- children: jsx6("button", {
1415
+ children: jsxs4("button", {
1412
1416
  type: "button",
1413
1417
  "aria-label": "Change playback rate",
1414
1418
  style: button,
1415
1419
  onClick,
1416
1420
  children: [
1417
- jsx6("div", {
1421
+ jsxs4("div", {
1418
1422
  style: label,
1419
1423
  children: [
1420
1424
  playbackRate,
1421
1425
  "x"
1422
1426
  ]
1423
- }, undefined, true, undefined, this),
1427
+ }),
1424
1428
  isComponentVisible && jsx6(PlaybackPopup, {
1425
1429
  canvasSize,
1426
1430
  playbackRates,
1427
1431
  setIsComponentVisible
1428
- }, undefined, false, undefined, this)
1432
+ })
1429
1433
  ]
1430
- }, undefined, true, undefined, this)
1431
- }, undefined, false, undefined, this);
1434
+ })
1435
+ });
1432
1436
  };
1433
1437
 
1434
1438
  // src/PlayerSeekBar.tsx
1435
1439
  import {useCallback as useCallback5, useEffect as useEffect9, useMemo as useMemo5, useRef as useRef6, useState as useState8} from "react";
1436
1440
  import {Internals as Internals8, interpolate} from "remotion";
1437
1441
  import {
1438
- jsx as jsx7
1442
+ jsx as jsx7,
1443
+ jsxs as jsxs5
1439
1444
  } from "react/jsx-runtime";
1440
1445
  var getFrameFromX = (clientX, durationInFrames, width) => {
1441
1446
  const pos = clientX;
@@ -1566,27 +1571,27 @@ var PlayerSeekBar = ({ durationInFrames, onSeekEnd, onSeekStart, inFrame, outFra
1566
1571
  position: "absolute"
1567
1572
  };
1568
1573
  }, [durationInFrames, inFrame, outFrame]);
1569
- return jsx7("div", {
1574
+ return jsxs5("div", {
1570
1575
  ref: containerRef,
1571
1576
  onPointerDown,
1572
1577
  style: containerStyle,
1573
1578
  children: [
1574
- jsx7("div", {
1579
+ jsxs5("div", {
1575
1580
  style: barBackground,
1576
1581
  children: [
1577
1582
  jsx7("div", {
1578
1583
  style: active
1579
- }, undefined, false, undefined, this),
1584
+ }),
1580
1585
  jsx7("div", {
1581
1586
  style: fillStyle
1582
- }, undefined, false, undefined, this)
1587
+ })
1583
1588
  ]
1584
- }, undefined, true, undefined, this),
1589
+ }),
1585
1590
  jsx7("div", {
1586
1591
  style: knobStyle
1587
- }, undefined, false, undefined, this)
1592
+ })
1588
1593
  ]
1589
- }, undefined, true, undefined, this);
1594
+ });
1590
1595
  };
1591
1596
 
1592
1597
  // src/format-time.ts
@@ -1626,6 +1631,7 @@ var useVideoControlsResize = ({
1626
1631
  // src/PlayerControls.tsx
1627
1632
  import {
1628
1633
  jsx as jsx8,
1634
+ jsxs as jsxs6,
1629
1635
  Fragment as Fragment2
1630
1636
  } from "react/jsx-runtime";
1631
1637
  var gradientSteps = [
@@ -1827,17 +1833,17 @@ var Controls = ({
1827
1833
  onDoubleClick?.(e);
1828
1834
  }
1829
1835
  }, [onDoubleClick]);
1830
- return jsx8("div", {
1836
+ return jsxs6("div", {
1831
1837
  ref,
1832
1838
  style: containerCss,
1833
1839
  onPointerUp: onPointerUpIfContainer,
1834
1840
  onDoubleClick: onDoubleClickIfContainer,
1835
1841
  children: [
1836
- jsx8("div", {
1842
+ jsxs6("div", {
1837
1843
  ref: flexRef,
1838
1844
  style: controlsRow,
1839
1845
  children: [
1840
- jsx8("div", {
1846
+ jsxs6("div", {
1841
1847
  style: leftPartStyle,
1842
1848
  children: [
1843
1849
  jsx8("button", {
@@ -1850,50 +1856,50 @@ var Controls = ({
1850
1856
  children: renderPlayPauseButton === null ? jsx8(DefaultPlayPauseButton, {
1851
1857
  buffering,
1852
1858
  playing: player.playing
1853
- }, undefined, false, undefined, this) : renderPlayPauseButton({
1859
+ }) : renderPlayPauseButton({
1854
1860
  playing: player.playing,
1855
1861
  isBuffering: buffering
1856
1862
  }) ?? jsx8(DefaultPlayPauseButton, {
1857
1863
  buffering,
1858
1864
  playing: player.playing
1859
- }, undefined, false, undefined, this)
1860
- }, undefined, false, undefined, this),
1861
- showVolumeControls ? jsx8(Fragment2, {
1865
+ })
1866
+ }),
1867
+ showVolumeControls ? jsxs6(Fragment2, {
1862
1868
  children: [
1863
1869
  jsx8("div", {
1864
1870
  style: xSpacer
1865
- }, undefined, false, undefined, this),
1871
+ }),
1866
1872
  jsx8(MediaVolumeSlider, {
1867
1873
  displayVerticalVolumeSlider
1868
- }, undefined, false, undefined, this)
1874
+ })
1869
1875
  ]
1870
- }, undefined, true, undefined, this) : null,
1876
+ }) : null,
1871
1877
  jsx8("div", {
1872
1878
  style: xSpacer
1873
- }, undefined, false, undefined, this),
1874
- jsx8("div", {
1879
+ }),
1880
+ jsxs6("div", {
1875
1881
  style: timeLabel,
1876
1882
  children: [
1877
1883
  formatTime(frame / fps),
1878
1884
  " / ",
1879
1885
  formatTime(durationInFrames / fps)
1880
1886
  ]
1881
- }, undefined, true, undefined, this),
1887
+ }),
1882
1888
  jsx8("div", {
1883
1889
  style: xSpacer
1884
- }, undefined, false, undefined, this)
1890
+ })
1885
1891
  ]
1886
- }, undefined, true, undefined, this),
1892
+ }),
1887
1893
  jsx8("div", {
1888
1894
  style: flex1
1889
- }, undefined, false, undefined, this),
1895
+ }),
1890
1896
  playbackRates && canvasSize && jsx8(PlaybackrateControl, {
1891
1897
  canvasSize,
1892
1898
  playbackRates
1893
- }, undefined, false, undefined, this),
1899
+ }),
1894
1900
  playbackRates && supportsFullscreen && allowFullscreen ? jsx8("div", {
1895
1901
  style: xSpacer
1896
- }, undefined, false, undefined, this) : null,
1902
+ }) : null,
1897
1903
  jsx8("div", {
1898
1904
  style: fullscreen,
1899
1905
  children: supportsFullscreen && allowFullscreen ? jsx8("button", {
@@ -1904,23 +1910,23 @@ var Controls = ({
1904
1910
  onClick: isFullscreen ? onExitFullscreenButtonClick : onFullscreenButtonClick,
1905
1911
  children: renderFullscreenButton === null ? jsx8(FullscreenIcon, {
1906
1912
  isFullscreen
1907
- }, undefined, false, undefined, this) : renderFullscreenButton({ isFullscreen })
1908
- }, undefined, false, undefined, this) : null
1909
- }, undefined, false, undefined, this)
1913
+ }) : renderFullscreenButton({ isFullscreen })
1914
+ }) : null
1915
+ })
1910
1916
  ]
1911
- }, undefined, true, undefined, this),
1917
+ }),
1912
1918
  jsx8("div", {
1913
1919
  style: ySpacer
1914
- }, undefined, false, undefined, this),
1920
+ }),
1915
1921
  jsx8(PlayerSeekBar, {
1916
1922
  onSeekEnd,
1917
1923
  onSeekStart,
1918
1924
  durationInFrames,
1919
1925
  inFrame,
1920
1926
  outFrame
1921
- }, undefined, false, undefined, this)
1927
+ })
1922
1928
  ]
1923
- }, undefined, true, undefined, this);
1929
+ });
1924
1930
  };
1925
1931
 
1926
1932
  // src/error-boundary.tsx
@@ -1955,7 +1961,7 @@ class ErrorBoundary extends React6.Component {
1955
1961
  children: this.props.errorFallback({
1956
1962
  error: this.state.hasError
1957
1963
  })
1958
- }, undefined, false, undefined, this);
1964
+ });
1959
1965
  }
1960
1966
  return this.props.children;
1961
1967
  }
@@ -2055,6 +2061,7 @@ var useClickPreventionOnDoubleClick = (onClick, onDoubleClick, doubleClickToFull
2055
2061
  // src/PlayerUI.tsx
2056
2062
  import {
2057
2063
  jsx as jsx10,
2064
+ jsxs as jsxs7,
2058
2065
  Fragment as Fragment3
2059
2066
  } from "react/jsx-runtime";
2060
2067
  var reactVersion = React7.version.split(".")[0];
@@ -2414,13 +2421,13 @@ var PlayerUI = ({
2414
2421
  showPosterWhenBuffering && showBufferIndicator && player.isPlaying()
2415
2422
  ].some(Boolean);
2416
2423
  const { left, top, width, height, ...outerWithoutScale } = outer;
2417
- const content = jsx10(Fragment3, {
2424
+ const content = jsxs7(Fragment3, {
2418
2425
  children: [
2419
2426
  jsx10("div", {
2420
2427
  style: outer,
2421
2428
  onPointerUp: clickToPlay ? handleClick : undefined,
2422
2429
  onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined,
2423
- children: jsx10("div", {
2430
+ children: jsxs7("div", {
2424
2431
  style: containerStyle3,
2425
2432
  className: PLAYER_CSS_CLASSNAME,
2426
2433
  children: [
@@ -2433,10 +2440,10 @@ var PlayerUI = ({
2433
2440
  children: jsx10(VideoComponent, {
2434
2441
  ...video?.props ?? {},
2435
2442
  ...inputProps ?? {}
2436
- }, undefined, false, undefined, this)
2437
- }, undefined, false, undefined, this)
2438
- }, undefined, false, undefined, this)
2439
- }, undefined, false, undefined, this) : null,
2443
+ })
2444
+ })
2445
+ })
2446
+ }) : null,
2440
2447
  shouldShowPoster && posterFillMode === "composition-size" ? jsx10("div", {
2441
2448
  style: {
2442
2449
  ...outerWithoutScale,
@@ -2446,16 +2453,16 @@ var PlayerUI = ({
2446
2453
  onPointerUp: clickToPlay ? handleClick : undefined,
2447
2454
  onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined,
2448
2455
  children: poster
2449
- }, undefined, false, undefined, this) : null
2456
+ }) : null
2450
2457
  ]
2451
- }, undefined, true, undefined, this)
2452
- }, undefined, false, undefined, this),
2458
+ })
2459
+ }),
2453
2460
  shouldShowPoster && posterFillMode === "player-size" ? jsx10("div", {
2454
2461
  style: outer,
2455
2462
  onPointerUp: clickToPlay ? handleClick : undefined,
2456
2463
  onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined,
2457
2464
  children: poster
2458
- }, undefined, false, undefined, this) : null,
2465
+ }) : null,
2459
2466
  controls ? jsx10(Controls, {
2460
2467
  fps: config.fps,
2461
2468
  durationInFrames: config.durationInFrames,
@@ -2481,16 +2488,16 @@ var PlayerUI = ({
2481
2488
  hideControlsWhenPointerDoesntMove,
2482
2489
  onDoubleClick: doubleClickToFullscreen ? handleDoubleClick : undefined,
2483
2490
  onPointerUp: clickToPlay ? handleClick : undefined
2484
- }, undefined, false, undefined, this) : null
2491
+ }) : null
2485
2492
  ]
2486
- }, undefined, true, undefined, this);
2493
+ });
2487
2494
  if (IS_NODE && !doesReactVersionSupportSuspense) {
2488
2495
  return jsx10("div", {
2489
2496
  ref: container,
2490
2497
  style: outerStyle,
2491
2498
  className: className2,
2492
2499
  children: content
2493
- }, undefined, false, undefined, this);
2500
+ });
2494
2501
  }
2495
2502
  return jsx10("div", {
2496
2503
  ref: container,
@@ -2499,8 +2506,8 @@ var PlayerUI = ({
2499
2506
  children: jsx10(Suspense, {
2500
2507
  fallback: loadingMarkup,
2501
2508
  children: content
2502
- }, undefined, false, undefined, this)
2503
- }, undefined, false, undefined, this);
2509
+ })
2510
+ });
2504
2511
  };
2505
2512
  var PlayerUI_default = forwardRef(PlayerUI);
2506
2513
 
@@ -2625,17 +2632,17 @@ var SharedPlayerContexts = ({
2625
2632
  component,
2626
2633
  children: jsx11(Internals11.BufferingProvider, {
2627
2634
  children
2628
- }, undefined, false, undefined, this)
2629
- }, undefined, false, undefined, this)
2630
- }, undefined, false, undefined, this)
2631
- }, undefined, false, undefined, this)
2632
- }, undefined, false, undefined, this)
2633
- }, undefined, false, undefined, this)
2634
- }, undefined, false, undefined, this)
2635
- }, undefined, false, undefined, this)
2636
- }, undefined, false, undefined, this)
2637
- }, undefined, false, undefined, this)
2638
- }, undefined, false, undefined, this);
2635
+ })
2636
+ })
2637
+ })
2638
+ })
2639
+ })
2640
+ })
2641
+ })
2642
+ })
2643
+ })
2644
+ })
2645
+ });
2639
2646
  };
2640
2647
 
2641
2648
  // src/utils/validate-in-out-frame.ts
@@ -2933,11 +2940,11 @@ var PlayerFn = ({
2933
2940
  showPlaybackRateControl,
2934
2941
  bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds ?? 300,
2935
2942
  hideControlsWhenPointerDoesntMove
2936
- }, undefined, false, undefined, this)
2937
- }, undefined, false, undefined, this)
2938
- }, undefined, false, undefined, this)
2939
- }, undefined, false, undefined, this)
2940
- }, undefined, false, undefined, this);
2943
+ })
2944
+ })
2945
+ })
2946
+ })
2947
+ });
2941
2948
  };
2942
2949
  var forward = forwardRef2;
2943
2950
  var Player = forward(PlayerFn);
@@ -3064,18 +3071,18 @@ var ThumbnailUI = ({ style, inputProps, errorFallback, renderLoading, className:
3064
3071
  children: jsx13(VideoComponent, {
3065
3072
  ...video?.props ?? {},
3066
3073
  ...inputProps ?? {}
3067
- }, undefined, false, undefined, this)
3068
- }, undefined, false, undefined, this)
3069
- }, undefined, false, undefined, this) : null
3070
- }, undefined, false, undefined, this)
3071
- }, undefined, false, undefined, this);
3074
+ })
3075
+ })
3076
+ }) : null
3077
+ })
3078
+ });
3072
3079
  if (IS_NODE && !doesReactVersionSupportSuspense2) {
3073
3080
  return jsx13("div", {
3074
3081
  ref: container,
3075
3082
  style: outerStyle,
3076
3083
  className: className2,
3077
3084
  children: content
3078
- }, undefined, false, undefined, this);
3085
+ });
3079
3086
  }
3080
3087
  return jsx13("div", {
3081
3088
  ref: container,
@@ -3084,8 +3091,8 @@ var ThumbnailUI = ({ style, inputProps, errorFallback, renderLoading, className:
3084
3091
  children: jsx13(Suspense2, {
3085
3092
  fallback: loadingMarkup,
3086
3093
  children: content
3087
- }, undefined, false, undefined, this)
3088
- }, undefined, false, undefined, this);
3094
+ })
3095
+ });
3089
3096
  };
3090
3097
  var ThumbnailUI_default = forwardRef3(ThumbnailUI);
3091
3098
 
@@ -3156,10 +3163,10 @@ var ThumbnailFn = ({
3156
3163
  inputProps: passedInputProps,
3157
3164
  renderLoading,
3158
3165
  style
3159
- }, undefined, false, undefined, this)
3160
- }, undefined, false, undefined, this)
3161
- }, undefined, false, undefined, this)
3162
- }, undefined, false, undefined, this);
3166
+ })
3167
+ })
3168
+ })
3169
+ });
3163
3170
  };
3164
3171
  var forward2 = forwardRef4;
3165
3172
  var Thumbnail = forward2(ThumbnailFn);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/player",
3
- "version": "4.0.149",
3
+ "version": "4.0.151",
4
4
  "description": "Remotion Player",
5
5
  "main": "dist/cjs/index.js",
6
6
  "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.149"
31
+ "remotion": "4.0.151"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": ">=16.8.0",
@@ -66,7 +66,7 @@
66
66
  "scripts": {
67
67
  "formatting": "prettier src --check",
68
68
  "lint": "eslint src --ext ts,tsx",
69
- "build": "bun ensure-correct-version.ts && bun bundle.ts",
69
+ "build": "bun ensure-correct-version.ts && bun --env-file=../.env.bundle bundle.ts",
70
70
  "test": "vitest src --run",
71
71
  "prerelease": "cp ../../README.md ."
72
72
  }