@remotion/player 4.0.236 → 4.0.237

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.
@@ -78,9 +78,38 @@ const RenderWarningIfBlacklist = () => {
78
78
  })
79
79
  .catch(() => { });
80
80
  }, []);
81
+ (0, react_1.useEffect)(() => {
82
+ if (!unlicensed) {
83
+ return;
84
+ }
85
+ const ensureBanner = () => {
86
+ const banner = document.querySelector('.warning-banner');
87
+ if (!banner) {
88
+ const div = document.createElement('div');
89
+ div.className = 'warning-banner';
90
+ Object.assign(div.style, style, {
91
+ zIndex: '9999',
92
+ // @ts-expect-error
93
+ cssText: `${style.cssText} !important;`,
94
+ });
95
+ div.innerHTML = `
96
+ <a href="https://github.com/remotion-dev/remotion/pull/4589" style="color: white;">
97
+ Remotion Unlicensed – Contact hi@remotion.dev
98
+ </a>
99
+ `;
100
+ document.body.appendChild(div);
101
+ }
102
+ };
103
+ // Using MutationObserver to watch for changes
104
+ const observer = new MutationObserver(() => ensureBanner());
105
+ observer.observe(document.body, { childList: true, subtree: true });
106
+ return () => {
107
+ observer.disconnect();
108
+ };
109
+ }, [unlicensed]);
81
110
  if (!unlicensed) {
82
111
  return null;
83
112
  }
84
- return ((0, jsx_runtime_1.jsx)("div", { style: style, children: (0, jsx_runtime_1.jsx)("a", { style: { color: 'white' }, href: "https://github.com/remotion-dev/remotion/pull/4589", children: "Remotion Unlicensed \u2013 Contact hi@remotion.dev" }) }));
113
+ return ((0, jsx_runtime_1.jsx)("div", { style: style, className: "warning-banner", children: (0, jsx_runtime_1.jsx)("a", { style: { color: 'white' }, href: "https://github.com/remotion-dev/remotion/pull/4589", children: "Remotion Unlicensed \u2013 Contact hi@remotion.dev" }) }));
85
114
  };
86
115
  exports.RenderWarningIfBlacklist = RenderWarningIfBlacklist;
@@ -2200,11 +2200,39 @@ var RenderWarningIfBlacklist = () => {
2200
2200
  }).catch(() => {
2201
2201
  });
2202
2202
  }, []);
2203
+ useEffect12(() => {
2204
+ if (!unlicensed) {
2205
+ return;
2206
+ }
2207
+ const ensureBanner = () => {
2208
+ const banner = document.querySelector(".warning-banner");
2209
+ if (!banner) {
2210
+ const div = document.createElement("div");
2211
+ div.className = "warning-banner";
2212
+ Object.assign(div.style, style, {
2213
+ zIndex: "9999",
2214
+ cssText: `${style.cssText} !important;`
2215
+ });
2216
+ div.innerHTML = `
2217
+ \t <a href="https://github.com/remotion-dev/remotion/pull/4589" style="color: white;">
2218
+ \t Remotion Unlicensed – Contact hi@remotion.dev
2219
+ \t </a>
2220
+ \t `;
2221
+ document.body.appendChild(div);
2222
+ }
2223
+ };
2224
+ const observer = new MutationObserver(() => ensureBanner());
2225
+ observer.observe(document.body, { childList: true, subtree: true });
2226
+ return () => {
2227
+ observer.disconnect();
2228
+ };
2229
+ }, [unlicensed]);
2203
2230
  if (!unlicensed) {
2204
2231
  return null;
2205
2232
  }
2206
2233
  return /* @__PURE__ */ jsx11("div", {
2207
2234
  style,
2235
+ className: "warning-banner",
2208
2236
  children: /* @__PURE__ */ jsx11("a", {
2209
2237
  style: { color: "white" },
2210
2238
  href: "https://github.com/remotion-dev/remotion/pull/4589",
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.236",
6
+ "version": "4.0.237",
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.236"
31
+ "remotion": "4.0.237"
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.14.0",
46
- "@remotion/eslint-config-internal": "4.0.236"
46
+ "@remotion/eslint-config-internal": "4.0.237"
47
47
  },
48
48
  "keywords": [
49
49
  "remotion",