@remotion/player 4.0.503 → 4.0.505

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.
@@ -2,4 +2,5 @@ import React from 'react';
2
2
  export declare const bufferingIndicatorStrokeWidth = 3;
3
3
  export declare const BufferingIndicator: React.FC<{
4
4
  readonly type: 'player' | 'studio';
5
+ readonly color?: string;
5
6
  }>;
@@ -20,7 +20,7 @@ const studioStyle = {
20
20
  lineHeight: 'normal',
21
21
  fontSize: 'inherit',
22
22
  };
23
- const BufferingIndicator = ({ type }) => {
23
+ const BufferingIndicator = ({ type, color = 'white' }) => {
24
24
  const style = type === 'player' ? playerStyle : studioStyle;
25
25
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
26
26
  jsx_runtime_1.jsx("style", { type: "text/css", children: `
@@ -38,7 +38,7 @@ const BufferingIndicator = ({ type }) => {
38
38
  }
39
39
  ` }), jsx_runtime_1.jsx("div", { style: style, children: jsx_runtime_1.jsx("svg", { viewBox: type === 'player' ? '0 0 22 22' : '0 0 18 18', style: style, className: className, children: jsx_runtime_1.jsx("path", { d: type === 'player'
40
40
  ? 'M 11 4 A 7 7 0 0 1 15.1145 16.66312'
41
- : 'M 9 2 A 7 7 0 0 1 13.1145 14.66312', stroke: "white", strokeLinecap: "round", fill: "none", strokeWidth: 3 }) }) })
41
+ : 'M 9 2 A 7 7 0 0 1 13.1145 14.66312', stroke: color, strokeLinecap: "round", fill: "none", strokeWidth: 3 }) }) })
42
42
  ] }));
43
43
  };
44
44
  exports.BufferingIndicator = BufferingIndicator;
@@ -66,5 +66,6 @@ export declare const PlayerInternals: {
66
66
  }>;
67
67
  BufferingIndicator: import("react").FC<{
68
68
  readonly type: "player" | "studio";
69
+ readonly color?: string | undefined;
69
70
  }>;
70
71
  };
@@ -36,7 +36,7 @@ const usePlayer = () => {
36
36
  ? remotion_1.Internals.TimelinePosition.clampFrameToCompositionRange(newFrame, config.durationInFrames)
37
37
  : Math.max(0, newFrame);
38
38
  if (video === null || video === void 0 ? void 0 : video.id) {
39
- setTimelinePosition((c) => ({ ...c, [video.id]: frameToSeekTo }));
39
+ setTimelinePosition((c) => c[video.id] === frameToSeekTo ? c : { ...c, [video.id]: frameToSeekTo });
40
40
  }
41
41
  frameRef.current = frameToSeekTo;
42
42
  emitter.dispatchSeek(frameToSeekTo);
@@ -160,7 +160,7 @@ var studioStyle = {
160
160
  lineHeight: "normal",
161
161
  fontSize: "inherit"
162
162
  };
163
- var BufferingIndicator = ({ type }) => {
163
+ var BufferingIndicator = ({ type, color = "white" }) => {
164
164
  const style = type === "player" ? playerStyle : studioStyle;
165
165
  return /* @__PURE__ */ jsxs2(Fragment, {
166
166
  children: [
@@ -189,7 +189,7 @@ var BufferingIndicator = ({ type }) => {
189
189
  className,
190
190
  children: /* @__PURE__ */ jsx2("path", {
191
191
  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",
192
- stroke: "white",
192
+ stroke: color,
193
193
  strokeLinecap: "round",
194
194
  fill: "none",
195
195
  strokeWidth: 3
@@ -596,7 +596,7 @@ var usePlayer = () => {
596
596
  const seek = useCallback((newFrame) => {
597
597
  const frameToSeekTo = config ? Internals4.TimelinePosition.clampFrameToCompositionRange(newFrame, config.durationInFrames) : Math.max(0, newFrame);
598
598
  if (video?.id) {
599
- setTimelinePosition((c) => ({ ...c, [video.id]: frameToSeekTo }));
599
+ setTimelinePosition((c) => c[video.id] === frameToSeekTo ? c : { ...c, [video.id]: frameToSeekTo });
600
600
  }
601
601
  frameRef.current = frameToSeekTo;
602
602
  emitter.dispatchSeek(frameToSeekTo);
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.503",
6
+ "version": "4.0.505",
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",
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "license": "SEE LICENSE IN LICENSE.md",
37
37
  "dependencies": {
38
- "remotion": "4.0.503"
38
+ "remotion": "4.0.505"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.8.0",
@@ -49,7 +49,7 @@
49
49
  "react-dom": "19.2.3",
50
50
  "webpack": "5.105.0",
51
51
  "zod": "4.4.3",
52
- "@remotion/eslint-config-internal": "4.0.503",
52
+ "@remotion/eslint-config-internal": "4.0.505",
53
53
  "eslint": "9.19.0",
54
54
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
55
55
  },