@remotion/player 4.0.259 → 4.0.261
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.
|
@@ -17,6 +17,9 @@ const PlayerTimeLabel = ({ durationInFrames, maxTimeLabelWidth, fps }) => {
|
|
|
17
17
|
textOverflow: 'ellipsis',
|
|
18
18
|
};
|
|
19
19
|
}, [maxTimeLabelWidth]);
|
|
20
|
-
|
|
20
|
+
// If the video ended and is not looping, it should show 0:04 / 0:04 instead of 0:03 / 0:04
|
|
21
|
+
const isLastFrame = frame === durationInFrames - 1;
|
|
22
|
+
const frameToDisplay = isLastFrame ? frame + 1 : frame;
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: timeLabel, children: [(0, format_time_1.formatTime)(frameToDisplay / fps), " / ", (0, format_time_1.formatTime)(durationInFrames / fps)] }));
|
|
21
24
|
};
|
|
22
25
|
exports.PlayerTimeLabel = PlayerTimeLabel;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1791,10 +1791,12 @@ var PlayerTimeLabel = ({ durationInFrames, maxTimeLabelWidth, fps }) => {
|
|
|
1791
1791
|
textOverflow: "ellipsis"
|
|
1792
1792
|
};
|
|
1793
1793
|
}, [maxTimeLabelWidth]);
|
|
1794
|
+
const isLastFrame = frame === durationInFrames - 1;
|
|
1795
|
+
const frameToDisplay = isLastFrame ? frame + 1 : frame;
|
|
1794
1796
|
return /* @__PURE__ */ jsxs7("div", {
|
|
1795
1797
|
style: timeLabel,
|
|
1796
1798
|
children: [
|
|
1797
|
-
formatTime(
|
|
1799
|
+
formatTime(frameToDisplay / fps),
|
|
1798
1800
|
" / ",
|
|
1799
1801
|
formatTime(durationInFrames / fps)
|
|
1800
1802
|
]
|
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.261",
|
|
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.261"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": ">=16.8.0",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"react-dom": "19.0.0",
|
|
43
43
|
"webpack": "5.96.1",
|
|
44
44
|
"zod": "3.22.3",
|
|
45
|
-
"eslint": "9.
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
45
|
+
"eslint": "9.19.0",
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.261"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|