stormcloud-video-player 0.6.6 → 0.7.1

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.
@@ -383,7 +383,7 @@ __export(StormcloudVideoPlayer_exports, {
383
383
  }
384
384
  });
385
385
  module.exports = __toCommonJS(StormcloudVideoPlayer_exports);
386
- var import_react = __toESM(require("react"), 1);
386
+ var import_react2 = __toESM(require("react"), 1);
387
387
  // src/player/StormcloudVideoPlayer.ts
388
388
  var import_hls2 = __toESM(require("hls.js"), 1);
389
389
  // src/sdk/vastParser.ts
@@ -6020,6 +6020,46 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
6020
6020
  return this.isLiveStream;
6021
6021
  }
6022
6022
  },
6023
+ {
6024
+ key: "getMinHlsResolution",
6025
+ value: function getMinHlsResolution() {
6026
+ var _this_hls;
6027
+ var levels = (_this_hls = this.hls) === null || _this_hls === void 0 ? void 0 : _this_hls.levels;
6028
+ if (!levels || levels.length === 0) return null;
6029
+ var min = null;
6030
+ var minPixels = Infinity;
6031
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
6032
+ try {
6033
+ for(var _iterator = levels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
6034
+ var level = _step.value;
6035
+ if (level.width && level.height) {
6036
+ var pixels = level.width * level.height;
6037
+ if (pixels < minPixels) {
6038
+ minPixels = pixels;
6039
+ min = {
6040
+ width: level.width,
6041
+ height: level.height
6042
+ };
6043
+ }
6044
+ }
6045
+ }
6046
+ } catch (err) {
6047
+ _didIteratorError = true;
6048
+ _iteratorError = err;
6049
+ } finally{
6050
+ try {
6051
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
6052
+ _iterator.return();
6053
+ }
6054
+ } finally{
6055
+ if (_didIteratorError) {
6056
+ throw _iteratorError;
6057
+ }
6058
+ }
6059
+ }
6060
+ return min;
6061
+ }
6062
+ },
6023
6063
  {
6024
6064
  key: "videoElement",
6025
6065
  get: function get() {
@@ -6082,7 +6122,1107 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
6082
6122
  }();
6083
6123
  // src/ui/StormcloudVideoPlayer.tsx
6084
6124
  var import_fa = require("react-icons/fa");
6125
+ // src/ui/OverlayRenderer.tsx
6126
+ var import_react = __toESM(require("react"), 1);
6127
+ // src/utils/overlays.ts
6128
+ var OVERLAY_API_BASE = "https://adstorm.co/api-adstorm-dev";
6129
+ function timeStringToSeconds(timeStr) {
6130
+ if (!timeStr) return 0;
6131
+ var parts = timeStr.split(":");
6132
+ if (parts.length >= 3) {
6133
+ var _parts_, _parts_1, _parts_2;
6134
+ var hours = parseInt((_parts_ = parts[0]) !== null && _parts_ !== void 0 ? _parts_ : "0", 10) || 0;
6135
+ var minutes = parseInt((_parts_1 = parts[1]) !== null && _parts_1 !== void 0 ? _parts_1 : "0", 10) || 0;
6136
+ var secStr = (_parts_2 = parts[2]) !== null && _parts_2 !== void 0 ? _parts_2 : "0";
6137
+ var dotIdx = secStr.indexOf(".");
6138
+ var seconds = parseInt(dotIdx >= 0 ? secStr.substring(0, dotIdx) : secStr, 10) || 0;
6139
+ var msFrag = dotIdx >= 0 ? secStr.substring(dotIdx + 1) : "";
6140
+ var ms = msFrag ? parseInt(msFrag.padEnd(3, "0").substring(0, 3), 10) || 0 : 0;
6141
+ return hours * 3600 + minutes * 60 + seconds + ms / 1e3;
6142
+ }
6143
+ if (parts.length === 2) {
6144
+ var _parts_3, _parts_4;
6145
+ var minutes1 = parseInt((_parts_3 = parts[0]) !== null && _parts_3 !== void 0 ? _parts_3 : "0", 10) || 0;
6146
+ var secStr1 = (_parts_4 = parts[1]) !== null && _parts_4 !== void 0 ? _parts_4 : "0";
6147
+ var dotIdx1 = secStr1.indexOf(".");
6148
+ var seconds1 = parseInt(dotIdx1 >= 0 ? secStr1.substring(0, dotIdx1) : secStr1, 10) || 0;
6149
+ var msFrag1 = dotIdx1 >= 0 ? secStr1.substring(dotIdx1 + 1) : "";
6150
+ var ms1 = msFrag1 ? parseInt(msFrag1.padEnd(3, "0").substring(0, 3), 10) || 0 : 0;
6151
+ return minutes1 * 60 + seconds1 + ms1 / 1e3;
6152
+ }
6153
+ var num = parseFloat(timeStr);
6154
+ return isFinite(num) ? Math.max(0, num) : 0;
6155
+ }
6156
+ function isOverlayActive(overlay, currentTime) {
6157
+ if (!overlay.visible) return false;
6158
+ var startSec = timeStringToSeconds(overlay.start_time);
6159
+ var durationSec = timeStringToSeconds(overlay.duration);
6160
+ if (durationSec <= 0) return false;
6161
+ return currentTime >= startSec && currentTime < startSec + durationSec;
6162
+ }
6163
+ function fetchProjectOverlays(_0) {
6164
+ return _async_to_generator(function(projectId) {
6165
+ var apiBaseUrl, response, data;
6166
+ var _arguments = arguments;
6167
+ return _ts_generator(this, function(_state) {
6168
+ switch(_state.label){
6169
+ case 0:
6170
+ apiBaseUrl = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : OVERLAY_API_BASE;
6171
+ return [
6172
+ 4,
6173
+ fetch("".concat(apiBaseUrl, "/adstorm/swirl/projects/").concat(projectId, "/overlays"))
6174
+ ];
6175
+ case 1:
6176
+ response = _state.sent();
6177
+ if (!response.ok) {
6178
+ throw new Error("Failed to fetch overlays: ".concat(response.status, " ").concat(response.statusText));
6179
+ }
6180
+ return [
6181
+ 4,
6182
+ response.json()
6183
+ ];
6184
+ case 2:
6185
+ data = _state.sent();
6186
+ return [
6187
+ 2,
6188
+ Array.isArray(data) ? data : []
6189
+ ];
6190
+ }
6191
+ });
6192
+ }).apply(this, arguments);
6193
+ }
6194
+ function resolveImageUrl(imageUrl) {
6195
+ var apiBaseUrl = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : OVERLAY_API_BASE;
6196
+ if (!imageUrl) return "";
6197
+ if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://")) {
6198
+ return imageUrl;
6199
+ }
6200
+ if (imageUrl.startsWith("/")) {
6201
+ try {
6202
+ var url = new URL(apiBaseUrl);
6203
+ return "".concat(url.origin).concat(imageUrl);
6204
+ } catch (unused) {
6205
+ return imageUrl;
6206
+ }
6207
+ }
6208
+ return "".concat(apiBaseUrl, "/").concat(imageUrl);
6209
+ }
6210
+ // src/ui/OverlayRenderer.tsx
6085
6211
  var import_jsx_runtime = require("react/jsx-runtime");
6212
+ function computeVideoDimensions(video) {
6213
+ var nativeWidth = video.videoWidth;
6214
+ var nativeHeight = video.videoHeight;
6215
+ if (!nativeWidth || !nativeHeight) return null;
6216
+ var displayWidth = video.offsetWidth;
6217
+ var displayHeight = video.offsetHeight;
6218
+ if (!displayWidth || !displayHeight) return null;
6219
+ var videoAspect = nativeWidth / nativeHeight;
6220
+ var displayAspect = displayWidth / displayHeight;
6221
+ var renderWidth;
6222
+ var renderHeight;
6223
+ var offsetX;
6224
+ var offsetY;
6225
+ if (videoAspect > displayAspect) {
6226
+ renderWidth = displayWidth;
6227
+ renderHeight = displayWidth / videoAspect;
6228
+ offsetX = 0;
6229
+ offsetY = (displayHeight - renderHeight) / 2;
6230
+ } else {
6231
+ renderHeight = displayHeight;
6232
+ renderWidth = displayHeight * videoAspect;
6233
+ offsetX = (displayWidth - renderWidth) / 2;
6234
+ offsetY = 0;
6235
+ }
6236
+ return {
6237
+ nativeWidth: nativeWidth,
6238
+ nativeHeight: nativeHeight,
6239
+ displayWidth: renderWidth,
6240
+ displayHeight: renderHeight,
6241
+ offsetX: offsetX,
6242
+ offsetY: offsetY,
6243
+ scaleX: renderWidth / nativeWidth,
6244
+ scaleY: renderHeight / nativeHeight
6245
+ };
6246
+ }
6247
+ function ImageOverlay(param) {
6248
+ var overlay = param.overlay;
6249
+ var src = resolveImageUrl(overlay.image_url || "");
6250
+ if (!src) return null;
6251
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
6252
+ src: src,
6253
+ alt: overlay.name,
6254
+ draggable: false,
6255
+ style: {
6256
+ width: "100%",
6257
+ height: "100%",
6258
+ objectFit: "contain",
6259
+ display: "block",
6260
+ pointerEvents: "none",
6261
+ userSelect: "none"
6262
+ }
6263
+ });
6264
+ }
6265
+ function TextOverlay(param) {
6266
+ var overlay = param.overlay;
6267
+ var text = overlay.content || "";
6268
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6269
+ style: {
6270
+ width: "100%",
6271
+ height: "100%",
6272
+ display: "flex",
6273
+ alignItems: "center",
6274
+ justifyContent: "center",
6275
+ color: "#ffffff",
6276
+ fontSize: "clamp(10px, 1.4vw, 20px)",
6277
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6278
+ fontWeight: 600,
6279
+ textAlign: "center",
6280
+ padding: "4px 8px",
6281
+ boxSizing: "border-box",
6282
+ wordBreak: "break-word",
6283
+ textShadow: "0 1px 4px rgba(0,0,0,0.7)",
6284
+ pointerEvents: "none",
6285
+ userSelect: "none",
6286
+ lineHeight: 1.3
6287
+ },
6288
+ children: text
6289
+ });
6290
+ }
6291
+ function ScrollerOverlay(param) {
6292
+ var overlay = param.overlay;
6293
+ var _ref, _ref1, _ref2, _ref3, _ref4;
6294
+ var cfg = overlay.scroller_config;
6295
+ var text = (cfg === null || cfg === void 0 ? void 0 : cfg.use_custom_text) && cfg.custom_text ? cfg.custom_text : overlay.content || (cfg === null || cfg === void 0 ? void 0 : cfg.custom_text) || "";
6296
+ var scrollSpeed = (_ref = cfg === null || cfg === void 0 ? void 0 : cfg.scroll_speed) !== null && _ref !== void 0 ? _ref : 50;
6297
+ var direction = (_ref1 = cfg === null || cfg === void 0 ? void 0 : cfg.direction) !== null && _ref1 !== void 0 ? _ref1 : "left";
6298
+ var fontSize = (cfg === null || cfg === void 0 ? void 0 : cfg.font_size) ? "".concat(cfg.font_size, "px") : "clamp(10px, 1.2vw, 18px)";
6299
+ var fontFamily = (cfg === null || cfg === void 0 ? void 0 : cfg.font_family) || "Roboto, 'Segoe UI', Arial, sans-serif";
6300
+ var fontWeight = (cfg === null || cfg === void 0 ? void 0 : cfg.font_weight) || "600";
6301
+ var textColor = (cfg === null || cfg === void 0 ? void 0 : cfg.text_color) || "#ffffff";
6302
+ var bgColor = (cfg === null || cfg === void 0 ? void 0 : cfg.background_color) || "transparent";
6303
+ var bgOpacity = (cfg === null || cfg === void 0 ? void 0 : cfg.background_opacity) !== void 0 ? cfg.background_opacity / 100 : 0;
6304
+ var borderColor = (cfg === null || cfg === void 0 ? void 0 : cfg.border_color) || "transparent";
6305
+ var borderWidth = (_ref2 = cfg === null || cfg === void 0 ? void 0 : cfg.border_width) !== null && _ref2 !== void 0 ? _ref2 : 0;
6306
+ var borderRadius = (_ref3 = cfg === null || cfg === void 0 ? void 0 : cfg.border_radius) !== null && _ref3 !== void 0 ? _ref3 : 0;
6307
+ var padding = (_ref4 = cfg === null || cfg === void 0 ? void 0 : cfg.padding) !== null && _ref4 !== void 0 ? _ref4 : 4;
6308
+ var isVertical = direction === "up" || direction === "down";
6309
+ var isReverse = direction === "right" || direction === "down";
6310
+ var durationSec = Math.max(3, 120 - scrollSpeed);
6311
+ var animId = "sc-scroller-".concat(overlay.id);
6312
+ var keyframes = isVertical ? "@keyframes ".concat(animId, " {\n 0% { transform: translateY(").concat(isReverse ? "-100%" : "100%", "); }\n 100% { transform: translateY(").concat(isReverse ? "100%" : "-100%", "); }\n }") : "@keyframes ".concat(animId, " {\n 0% { transform: translateX(").concat(isReverse ? "-100%" : "100%", "); }\n 100% { transform: translateX(").concat(isReverse ? "100%" : "-100%", "); }\n }");
6313
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
6314
+ children: [
6315
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
6316
+ children: keyframes
6317
+ }),
6318
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6319
+ style: {
6320
+ width: "100%",
6321
+ height: "100%",
6322
+ overflow: "hidden",
6323
+ display: "flex",
6324
+ alignItems: "center",
6325
+ backgroundColor: bgOpacity > 0 ? "rgba(".concat(hexToRgb(bgColor), ", ").concat(bgOpacity, ")") : void 0,
6326
+ border: borderWidth > 0 ? "".concat(borderWidth, "px solid ").concat(borderColor) : void 0,
6327
+ borderRadius: borderRadius > 0 ? "".concat(borderRadius, "px") : void 0,
6328
+ padding: "".concat(padding, "px"),
6329
+ boxSizing: "border-box",
6330
+ pointerEvents: "none"
6331
+ },
6332
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6333
+ style: {
6334
+ whiteSpace: "nowrap",
6335
+ fontSize: fontSize,
6336
+ fontFamily: fontFamily,
6337
+ fontWeight: fontWeight,
6338
+ color: textColor,
6339
+ animation: "".concat(animId, " ").concat(durationSec, "s linear infinite"),
6340
+ textShadow: "0 1px 4px rgba(0,0,0,0.5)",
6341
+ userSelect: "none"
6342
+ },
6343
+ children: text
6344
+ })
6345
+ })
6346
+ ]
6347
+ });
6348
+ }
6349
+ function parseConfig(content) {
6350
+ if (!content) return null;
6351
+ try {
6352
+ return JSON.parse(content);
6353
+ } catch (unused) {
6354
+ return null;
6355
+ }
6356
+ }
6357
+ function ScoreBugOverlay(param) {
6358
+ var overlay = param.overlay, size = param.size;
6359
+ var cfg = parseConfig(overlay.content);
6360
+ if (!cfg) return null;
6361
+ var f = Math.max(6, size.w * 0.058);
6362
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6363
+ style: {
6364
+ width: "100%",
6365
+ height: "100%",
6366
+ borderRadius: Math.max(2, size.w * 0.035),
6367
+ display: "flex",
6368
+ flexDirection: "column",
6369
+ background: cfg.backgroundColor,
6370
+ color: cfg.textColor,
6371
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6372
+ overflow: "hidden",
6373
+ pointerEvents: "none",
6374
+ userSelect: "none",
6375
+ fontSize: "".concat(f, "px")
6376
+ },
6377
+ children: [
6378
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6379
+ style: {
6380
+ flex: 1,
6381
+ display: "flex",
6382
+ alignItems: "center",
6383
+ padding: "0 ".concat(f * 0.8, "px"),
6384
+ gap: f * 0.4
6385
+ },
6386
+ children: [
6387
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6388
+ style: {
6389
+ flex: 1,
6390
+ textAlign: "center"
6391
+ },
6392
+ children: [
6393
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6394
+ style: {
6395
+ fontSize: "1em",
6396
+ fontWeight: 700
6397
+ },
6398
+ children: cfg.homeTeam
6399
+ }),
6400
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6401
+ style: {
6402
+ fontSize: "1.8em",
6403
+ fontWeight: 900,
6404
+ lineHeight: 1
6405
+ },
6406
+ children: cfg.homeScore
6407
+ })
6408
+ ]
6409
+ }),
6410
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6411
+ style: {
6412
+ fontSize: "0.8em",
6413
+ textAlign: "center",
6414
+ opacity: 0.7,
6415
+ padding: "0 ".concat(f * 0.4, "px")
6416
+ },
6417
+ children: [
6418
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6419
+ children: cfg.period
6420
+ }),
6421
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6422
+ children: cfg.clock
6423
+ })
6424
+ ]
6425
+ }),
6426
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6427
+ style: {
6428
+ flex: 1,
6429
+ textAlign: "center"
6430
+ },
6431
+ children: [
6432
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6433
+ style: {
6434
+ fontSize: "1em",
6435
+ fontWeight: 700
6436
+ },
6437
+ children: cfg.awayTeam
6438
+ }),
6439
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6440
+ style: {
6441
+ fontSize: "1.8em",
6442
+ fontWeight: 900,
6443
+ lineHeight: 1
6444
+ },
6445
+ children: cfg.awayScore
6446
+ })
6447
+ ]
6448
+ })
6449
+ ]
6450
+ }),
6451
+ cfg.sponsorText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6452
+ style: {
6453
+ fontSize: "0.7em",
6454
+ textAlign: "center",
6455
+ opacity: 0.5,
6456
+ padding: "".concat(f * 0.2, "px 0"),
6457
+ borderTop: "1px solid ".concat(cfg.accentColor, "40")
6458
+ },
6459
+ children: cfg.sponsorText
6460
+ })
6461
+ ]
6462
+ });
6463
+ }
6464
+ function LowerThirdOverlay(param) {
6465
+ var overlay = param.overlay, size = param.size;
6466
+ var cfg = parseConfig(overlay.content);
6467
+ if (!cfg) return null;
6468
+ var f = Math.max(6, size.w * 0.055);
6469
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6470
+ style: {
6471
+ width: "100%",
6472
+ height: "100%",
6473
+ borderRadius: Math.max(2, size.w * 0.02),
6474
+ display: "flex",
6475
+ flexDirection: "column",
6476
+ justifyContent: "flex-end",
6477
+ background: cfg.backgroundColor,
6478
+ color: cfg.textColor,
6479
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6480
+ overflow: "hidden",
6481
+ pointerEvents: "none",
6482
+ userSelect: "none",
6483
+ fontSize: "".concat(f, "px")
6484
+ },
6485
+ children: [
6486
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6487
+ style: {
6488
+ width: "100%",
6489
+ height: Math.max(2, size.h * 0.06),
6490
+ backgroundColor: cfg.accentColor
6491
+ }
6492
+ }),
6493
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6494
+ style: {
6495
+ flex: 1,
6496
+ display: "flex",
6497
+ flexDirection: "column",
6498
+ justifyContent: "center",
6499
+ padding: "".concat(f * 0.5, "px ").concat(f * 1.2, "px")
6500
+ },
6501
+ children: [
6502
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6503
+ style: {
6504
+ fontSize: "1.4em",
6505
+ fontWeight: 700,
6506
+ lineHeight: 1.2,
6507
+ textShadow: "0 1px 4px rgba(0,0,0,0.5)"
6508
+ },
6509
+ children: cfg.headline
6510
+ }),
6511
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6512
+ style: {
6513
+ fontSize: "1em",
6514
+ opacity: 0.7,
6515
+ marginTop: f * 0.2
6516
+ },
6517
+ children: cfg.subtitle
6518
+ })
6519
+ ]
6520
+ }),
6521
+ cfg.sponsorText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6522
+ style: {
6523
+ fontSize: "0.7em",
6524
+ opacity: 0.4,
6525
+ padding: "0 ".concat(f * 1.2, "px ").concat(f * 0.4, "px")
6526
+ },
6527
+ children: cfg.sponsorText
6528
+ })
6529
+ ]
6530
+ });
6531
+ }
6532
+ function QrCodeOverlay(param) {
6533
+ var overlay = param.overlay, size = param.size;
6534
+ var cfg = parseConfig(overlay.content);
6535
+ if (!cfg) return null;
6536
+ var qrSide = Math.max(32, Math.min(size.w, size.h) * 0.55);
6537
+ var qrUrl = "https://api.qrserver.com/v1/create-qr-code/?size=".concat(Math.round(qrSide * 2), "x").concat(Math.round(qrSide * 2), "&data=").concat(encodeURIComponent(cfg.url || "https://example.com"));
6538
+ var f = Math.max(6, size.w * 0.06);
6539
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6540
+ style: {
6541
+ width: "100%",
6542
+ height: "100%",
6543
+ borderRadius: Math.max(2, size.w * 0.035),
6544
+ display: "flex",
6545
+ flexDirection: "column",
6546
+ alignItems: "center",
6547
+ justifyContent: "center",
6548
+ gap: f * 0.4,
6549
+ background: cfg.backgroundColor,
6550
+ color: cfg.textColor,
6551
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6552
+ padding: f * 0.6,
6553
+ boxSizing: "border-box",
6554
+ pointerEvents: "none",
6555
+ userSelect: "none",
6556
+ overflow: "hidden"
6557
+ },
6558
+ children: [
6559
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6560
+ style: {
6561
+ flexShrink: 0,
6562
+ background: "#fff",
6563
+ borderRadius: Math.max(2, qrSide * 0.06),
6564
+ padding: Math.max(2, qrSide * 0.06),
6565
+ lineHeight: 0
6566
+ },
6567
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
6568
+ src: qrUrl,
6569
+ alt: "QR Code",
6570
+ style: {
6571
+ width: "".concat(qrSide, "px"),
6572
+ height: "".concat(qrSide, "px"),
6573
+ display: "block"
6574
+ }
6575
+ })
6576
+ }),
6577
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6578
+ style: {
6579
+ fontSize: "".concat(f * 1.1, "px"),
6580
+ fontWeight: 700,
6581
+ textAlign: "center",
6582
+ color: cfg.accentColor,
6583
+ overflow: "hidden",
6584
+ textOverflow: "ellipsis",
6585
+ whiteSpace: "nowrap",
6586
+ width: "100%"
6587
+ },
6588
+ children: cfg.ctaText
6589
+ }),
6590
+ cfg.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6591
+ style: {
6592
+ fontSize: "".concat(f * 0.75, "px"),
6593
+ opacity: 0.6,
6594
+ textAlign: "center",
6595
+ overflow: "hidden",
6596
+ textOverflow: "ellipsis",
6597
+ whiteSpace: "nowrap",
6598
+ width: "100%"
6599
+ },
6600
+ children: cfg.description
6601
+ })
6602
+ ]
6603
+ });
6604
+ }
6605
+ function ComingUpNextOverlay(param) {
6606
+ var overlay = param.overlay, size = param.size;
6607
+ var cfg = parseConfig(overlay.content);
6608
+ if (!cfg) return null;
6609
+ var f = Math.max(6, size.w * 0.05);
6610
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6611
+ style: {
6612
+ width: "100%",
6613
+ height: "100%",
6614
+ borderRadius: Math.max(2, size.w * 0.035),
6615
+ display: "flex",
6616
+ background: cfg.backgroundColor,
6617
+ color: cfg.textColor,
6618
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6619
+ overflow: "hidden",
6620
+ pointerEvents: "none",
6621
+ userSelect: "none",
6622
+ fontSize: "".concat(f, "px")
6623
+ },
6624
+ children: [
6625
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6626
+ style: {
6627
+ width: Math.max(2, size.w * 0.015),
6628
+ flexShrink: 0,
6629
+ backgroundColor: cfg.accentColor
6630
+ }
6631
+ }),
6632
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6633
+ style: {
6634
+ flex: 1,
6635
+ display: "flex",
6636
+ flexDirection: "column",
6637
+ justifyContent: "center",
6638
+ padding: "".concat(f * 0.6, "px ").concat(f * 1, "px"),
6639
+ minWidth: 0
6640
+ },
6641
+ children: [
6642
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6643
+ style: {
6644
+ fontSize: "0.8em",
6645
+ fontWeight: 600,
6646
+ textTransform: "uppercase",
6647
+ letterSpacing: "0.05em",
6648
+ color: cfg.accentColor
6649
+ },
6650
+ children: "Coming Up Next"
6651
+ }),
6652
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6653
+ style: {
6654
+ fontSize: "1.5em",
6655
+ fontWeight: 700,
6656
+ lineHeight: 1.2,
6657
+ marginTop: f * 0.2,
6658
+ overflow: "hidden",
6659
+ textOverflow: "ellipsis",
6660
+ whiteSpace: "nowrap"
6661
+ },
6662
+ children: cfg.title
6663
+ }),
6664
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6665
+ style: {
6666
+ fontSize: "0.9em",
6667
+ opacity: 0.6,
6668
+ overflow: "hidden",
6669
+ textOverflow: "ellipsis",
6670
+ whiteSpace: "nowrap"
6671
+ },
6672
+ children: cfg.subtitle
6673
+ }),
6674
+ cfg.scheduledTime && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6675
+ style: {
6676
+ fontSize: "1em",
6677
+ fontWeight: 600,
6678
+ marginTop: f * 0.4,
6679
+ color: cfg.accentColor
6680
+ },
6681
+ children: cfg.scheduledTime
6682
+ })
6683
+ ]
6684
+ })
6685
+ ]
6686
+ });
6687
+ }
6688
+ function ContextualTriggerOverlay(param) {
6689
+ var overlay = param.overlay, size = param.size;
6690
+ var cfg = parseConfig(overlay.content);
6691
+ if (!cfg) return null;
6692
+ var icons = {
6693
+ alert: "\u26A0\uFE0F",
6694
+ celebration: "\uD83C\uDF89",
6695
+ info: "\u2139\uFE0F",
6696
+ warning: "\uD83D\uDD14"
6697
+ };
6698
+ var f = Math.max(6, size.w * 0.05);
6699
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6700
+ style: {
6701
+ width: "100%",
6702
+ height: "100%",
6703
+ borderRadius: Math.max(2, size.w * 0.035),
6704
+ display: "flex",
6705
+ alignItems: "center",
6706
+ gap: f * 0.8,
6707
+ padding: "0 ".concat(f * 1.2, "px"),
6708
+ background: cfg.backgroundColor,
6709
+ color: cfg.textColor,
6710
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6711
+ borderLeft: "".concat(Math.max(2, size.w * 0.02), "px solid ").concat(cfg.accentColor),
6712
+ boxSizing: "border-box",
6713
+ pointerEvents: "none",
6714
+ userSelect: "none",
6715
+ fontSize: "".concat(f, "px")
6716
+ },
6717
+ children: [
6718
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6719
+ style: {
6720
+ fontSize: "2em",
6721
+ flexShrink: 0
6722
+ },
6723
+ children: icons[cfg.iconType] || "\u26A1"
6724
+ }),
6725
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6726
+ style: {
6727
+ flex: 1,
6728
+ minWidth: 0
6729
+ },
6730
+ children: [
6731
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6732
+ style: {
6733
+ fontSize: "1.3em",
6734
+ fontWeight: 700,
6735
+ overflow: "hidden",
6736
+ textOverflow: "ellipsis",
6737
+ whiteSpace: "nowrap"
6738
+ },
6739
+ children: cfg.headline
6740
+ }),
6741
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6742
+ style: {
6743
+ fontSize: "0.9em",
6744
+ opacity: 0.7,
6745
+ overflow: "hidden",
6746
+ textOverflow: "ellipsis",
6747
+ whiteSpace: "nowrap"
6748
+ },
6749
+ children: cfg.message
6750
+ })
6751
+ ]
6752
+ })
6753
+ ]
6754
+ });
6755
+ }
6756
+ function OddsBettingOverlay(param) {
6757
+ var overlay = param.overlay, size = param.size;
6758
+ var cfg = parseConfig(overlay.content);
6759
+ if (!cfg) return null;
6760
+ var f = Math.max(6, size.w * 0.052);
6761
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6762
+ style: {
6763
+ width: "100%",
6764
+ height: "100%",
6765
+ borderRadius: Math.max(2, size.w * 0.035),
6766
+ display: "flex",
6767
+ flexDirection: "column",
6768
+ padding: f * 0.8,
6769
+ background: cfg.backgroundColor,
6770
+ color: cfg.textColor,
6771
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6772
+ boxSizing: "border-box",
6773
+ pointerEvents: "none",
6774
+ userSelect: "none",
6775
+ fontSize: "".concat(f, "px")
6776
+ },
6777
+ children: [
6778
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6779
+ style: {
6780
+ fontSize: "0.9em",
6781
+ fontWeight: 700,
6782
+ textTransform: "uppercase",
6783
+ letterSpacing: "0.05em",
6784
+ color: cfg.accentColor,
6785
+ marginBottom: f * 0.4
6786
+ },
6787
+ children: cfg.eventTitle
6788
+ }),
6789
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6790
+ style: {
6791
+ flex: 1,
6792
+ display: "flex",
6793
+ flexDirection: "column",
6794
+ gap: f * 0.2,
6795
+ justifyContent: "center"
6796
+ },
6797
+ children: (cfg.options || []).slice(0, 5).map(function(opt, i) {
6798
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6799
+ style: {
6800
+ display: "flex",
6801
+ justifyContent: "space-between",
6802
+ alignItems: "center",
6803
+ padding: "".concat(f * 0.2, "px ").concat(f * 0.6, "px"),
6804
+ borderRadius: Math.max(2, f * 0.3),
6805
+ background: "".concat(cfg.accentColor, "15"),
6806
+ fontSize: "1em"
6807
+ },
6808
+ children: [
6809
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6810
+ style: {
6811
+ overflow: "hidden",
6812
+ textOverflow: "ellipsis",
6813
+ whiteSpace: "nowrap",
6814
+ flex: 1
6815
+ },
6816
+ children: opt.label
6817
+ }),
6818
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6819
+ style: {
6820
+ fontWeight: 700,
6821
+ marginLeft: f * 0.8,
6822
+ flexShrink: 0,
6823
+ color: cfg.accentColor
6824
+ },
6825
+ children: opt.odds
6826
+ })
6827
+ ]
6828
+ }, i);
6829
+ })
6830
+ }),
6831
+ cfg.sponsorText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6832
+ style: {
6833
+ fontSize: "0.7em",
6834
+ opacity: 0.4,
6835
+ textAlign: "center",
6836
+ marginTop: f * 0.4
6837
+ },
6838
+ children: cfg.sponsorText
6839
+ })
6840
+ ]
6841
+ });
6842
+ }
6843
+ function BreakingNewsOverlay(param) {
6844
+ var overlay = param.overlay, size = param.size;
6845
+ var cfg = parseConfig(overlay.content);
6846
+ if (!cfg) return null;
6847
+ var urgencyColors = {
6848
+ breaking: "#dc2626",
6849
+ urgent: "#ea580c",
6850
+ normal: "#2563eb"
6851
+ };
6852
+ var labelBg = urgencyColors[cfg.urgency] || urgencyColors.normal;
6853
+ var label = cfg.urgency === "breaking" ? "BREAKING" : cfg.urgency === "urgent" ? "URGENT" : "NEWS";
6854
+ var f = Math.max(6, size.w * 0.05);
6855
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6856
+ style: {
6857
+ width: "100%",
6858
+ height: "100%",
6859
+ borderRadius: Math.max(2, size.w * 0.02),
6860
+ display: "flex",
6861
+ alignItems: "center",
6862
+ background: cfg.backgroundColor,
6863
+ color: cfg.textColor,
6864
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6865
+ overflow: "hidden",
6866
+ pointerEvents: "none",
6867
+ userSelect: "none",
6868
+ fontSize: "".concat(f, "px")
6869
+ },
6870
+ children: [
6871
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6872
+ style: {
6873
+ padding: "0 ".concat(f * 0.8, "px"),
6874
+ height: "100%",
6875
+ display: "flex",
6876
+ alignItems: "center",
6877
+ background: labelBg,
6878
+ color: "#fff",
6879
+ fontSize: "1em",
6880
+ fontWeight: 900,
6881
+ textTransform: "uppercase",
6882
+ letterSpacing: "0.05em",
6883
+ flexShrink: 0
6884
+ },
6885
+ children: label
6886
+ }),
6887
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6888
+ style: {
6889
+ flex: 1,
6890
+ padding: "0 ".concat(f * 1, "px"),
6891
+ minWidth: 0
6892
+ },
6893
+ children: [
6894
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6895
+ style: {
6896
+ fontSize: "1.3em",
6897
+ fontWeight: 700,
6898
+ overflow: "hidden",
6899
+ textOverflow: "ellipsis",
6900
+ whiteSpace: "nowrap"
6901
+ },
6902
+ children: cfg.headline
6903
+ }),
6904
+ cfg.body && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6905
+ style: {
6906
+ fontSize: "0.9em",
6907
+ opacity: 0.7,
6908
+ overflow: "hidden",
6909
+ textOverflow: "ellipsis",
6910
+ whiteSpace: "nowrap"
6911
+ },
6912
+ children: cfg.body
6913
+ })
6914
+ ]
6915
+ })
6916
+ ]
6917
+ });
6918
+ }
6919
+ function CountdownOverlay(param) {
6920
+ var overlay = param.overlay, size = param.size;
6921
+ var cfg = parseConfig(overlay.content);
6922
+ var _ref = _sliced_to_array((0, import_react.useState)({
6923
+ d: 0,
6924
+ h: 0,
6925
+ m: 0,
6926
+ s: 0
6927
+ }), 2), remaining = _ref[0], setRemaining = _ref[1];
6928
+ (0, import_react.useEffect)(function() {
6929
+ if (!cfg) return;
6930
+ var update = function update() {
6931
+ var target = new Date(cfg.targetTime).getTime();
6932
+ var now = Date.now();
6933
+ var diff = Math.max(0, target - now);
6934
+ setRemaining({
6935
+ d: Math.floor(diff / 864e5),
6936
+ h: Math.floor(diff % 864e5 / 36e5),
6937
+ m: Math.floor(diff % 36e5 / 6e4),
6938
+ s: Math.floor(diff % 6e4 / 1e3)
6939
+ });
6940
+ };
6941
+ update();
6942
+ var id = setInterval(update, 1e3);
6943
+ return function() {
6944
+ return clearInterval(id);
6945
+ };
6946
+ }, [
6947
+ cfg === null || cfg === void 0 ? void 0 : cfg.targetTime
6948
+ ]);
6949
+ if (!cfg) return null;
6950
+ var f = Math.max(6, size.w * 0.055);
6951
+ var pad = function pad(n) {
6952
+ return String(n).padStart(2, "0");
6953
+ };
6954
+ var units = [
6955
+ {
6956
+ show: cfg.showDays,
6957
+ value: pad(remaining.d),
6958
+ label: "DAYS"
6959
+ },
6960
+ {
6961
+ show: cfg.showHours,
6962
+ value: pad(remaining.h),
6963
+ label: "HRS"
6964
+ },
6965
+ {
6966
+ show: cfg.showMinutes,
6967
+ value: pad(remaining.m),
6968
+ label: "MIN"
6969
+ },
6970
+ {
6971
+ show: cfg.showSeconds,
6972
+ value: pad(remaining.s),
6973
+ label: "SEC"
6974
+ }
6975
+ ];
6976
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6977
+ style: {
6978
+ width: "100%",
6979
+ height: "100%",
6980
+ borderRadius: Math.max(2, size.w * 0.035),
6981
+ display: "flex",
6982
+ flexDirection: "column",
6983
+ alignItems: "center",
6984
+ justifyContent: "center",
6985
+ padding: f * 0.8,
6986
+ background: cfg.backgroundColor,
6987
+ color: cfg.textColor,
6988
+ fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6989
+ boxSizing: "border-box",
6990
+ pointerEvents: "none",
6991
+ userSelect: "none",
6992
+ fontSize: "".concat(f, "px")
6993
+ },
6994
+ children: [
6995
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6996
+ style: {
6997
+ fontSize: "0.8em",
6998
+ fontWeight: 600,
6999
+ textTransform: "uppercase",
7000
+ letterSpacing: "0.05em",
7001
+ color: cfg.accentColor,
7002
+ marginBottom: f * 0.4
7003
+ },
7004
+ children: cfg.eventName
7005
+ }),
7006
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7007
+ style: {
7008
+ display: "flex",
7009
+ gap: f * 0.6,
7010
+ alignItems: "center"
7011
+ },
7012
+ children: units.filter(function(u) {
7013
+ return u.show;
7014
+ }).map(function(u, i, arr) {
7015
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.default.Fragment, {
7016
+ children: [
7017
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7018
+ style: {
7019
+ textAlign: "center"
7020
+ },
7021
+ children: [
7022
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7023
+ style: {
7024
+ fontSize: "2em",
7025
+ fontWeight: 900,
7026
+ lineHeight: 1,
7027
+ borderRadius: Math.max(2, f * 0.4),
7028
+ padding: "".concat(f * 0.2, "px ").concat(f * 0.4, "px"),
7029
+ background: "".concat(cfg.accentColor, "20")
7030
+ },
7031
+ children: u.value
7032
+ }),
7033
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7034
+ style: {
7035
+ fontSize: "0.5em",
7036
+ opacity: 0.5,
7037
+ marginTop: f * 0.2
7038
+ },
7039
+ children: u.label
7040
+ })
7041
+ ]
7042
+ }),
7043
+ i < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7044
+ style: {
7045
+ fontSize: "1.8em",
7046
+ fontWeight: 700,
7047
+ opacity: 0.3
7048
+ },
7049
+ children: ":"
7050
+ })
7051
+ ]
7052
+ }, u.label);
7053
+ })
7054
+ }),
7055
+ cfg.message && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7056
+ style: {
7057
+ fontSize: "0.8em",
7058
+ opacity: 0.6,
7059
+ marginTop: f * 0.4,
7060
+ textAlign: "center"
7061
+ },
7062
+ children: cfg.message
7063
+ })
7064
+ ]
7065
+ });
7066
+ }
7067
+ function ShapeOverlay(param) {
7068
+ var overlay = param.overlay, size = param.size;
7069
+ var f = Math.max(6, size.w * 0.05);
7070
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7071
+ style: {
7072
+ width: "100%",
7073
+ height: "100%",
7074
+ borderRadius: Math.max(2, size.w * 0.03),
7075
+ background: "rgba(99, 102, 241, 0.2)",
7076
+ border: "2px solid rgba(99, 102, 241, 0.4)",
7077
+ display: "flex",
7078
+ alignItems: "center",
7079
+ justifyContent: "center",
7080
+ pointerEvents: "none",
7081
+ userSelect: "none"
7082
+ },
7083
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7084
+ style: {
7085
+ fontSize: "".concat(f, "px"),
7086
+ fontWeight: 500,
7087
+ color: "rgba(163, 163, 163, 0.8)",
7088
+ textTransform: "uppercase"
7089
+ },
7090
+ children: overlay.name
7091
+ })
7092
+ });
7093
+ }
7094
+ function hexToRgb(hex) {
7095
+ if (!hex || !hex.startsWith("#")) return "0,0,0";
7096
+ var clean = hex.slice(1);
7097
+ var num = parseInt(clean.length === 3 ? clean.replace(/./g, "$&$&") : clean, 16);
7098
+ return "".concat(num >> 16 & 255, ",").concat(num >> 8 & 255, ",").concat(num & 255);
7099
+ }
7100
+ var OverlayRenderer = function OverlayRenderer(param) {
7101
+ var overlays = param.overlays, currentTime = param.currentTime, videoRef = param.videoRef, coordinateSpace = param.coordinateSpace;
7102
+ var _ref = _sliced_to_array((0, import_react.useState)(null), 2), dims = _ref[0], setDims = _ref[1];
7103
+ var rafRef = (0, import_react.useRef)(null);
7104
+ var updateDims = (0, import_react.useCallback)(function() {
7105
+ var video = videoRef.current;
7106
+ if (video) {
7107
+ var computed = computeVideoDimensions(video);
7108
+ setDims(function(prev) {
7109
+ if (!computed || prev && prev.nativeWidth === computed.nativeWidth && prev.nativeHeight === computed.nativeHeight && prev.displayWidth === computed.displayWidth && prev.displayHeight === computed.displayHeight && prev.offsetX === computed.offsetX && prev.offsetY === computed.offsetY) {
7110
+ return prev;
7111
+ }
7112
+ return computed;
7113
+ });
7114
+ }
7115
+ }, [
7116
+ videoRef
7117
+ ]);
7118
+ (0, import_react.useEffect)(function() {
7119
+ updateDims();
7120
+ var interval = setInterval(updateDims, 500);
7121
+ var handleResize = function handleResize() {
7122
+ if (rafRef.current) cancelAnimationFrame(rafRef.current);
7123
+ rafRef.current = requestAnimationFrame(updateDims);
7124
+ };
7125
+ window.addEventListener("resize", handleResize);
7126
+ return function() {
7127
+ clearInterval(interval);
7128
+ window.removeEventListener("resize", handleResize);
7129
+ if (rafRef.current) cancelAnimationFrame(rafRef.current);
7130
+ };
7131
+ }, [
7132
+ updateDims
7133
+ ]);
7134
+ var activeOverlays = overlays.filter(function(o) {
7135
+ return isOverlayActive(o, currentTime);
7136
+ });
7137
+ if (!dims || activeOverlays.length === 0) return null;
7138
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7139
+ "aria-hidden": "true",
7140
+ style: {
7141
+ position: "absolute",
7142
+ left: "".concat(dims.offsetX, "px"),
7143
+ top: "".concat(dims.offsetY, "px"),
7144
+ width: "".concat(dims.displayWidth, "px"),
7145
+ height: "".concat(dims.displayHeight, "px"),
7146
+ pointerEvents: "none",
7147
+ overflow: "hidden",
7148
+ zIndex: 8
7149
+ },
7150
+ children: activeOverlays.map(function(overlay) {
7151
+ var scaleX = (coordinateSpace === null || coordinateSpace === void 0 ? void 0 : coordinateSpace.width) ? dims.displayWidth / coordinateSpace.width : dims.scaleX;
7152
+ var scaleY = (coordinateSpace === null || coordinateSpace === void 0 ? void 0 : coordinateSpace.height) ? dims.displayHeight / coordinateSpace.height : dims.scaleY;
7153
+ var left = overlay.x * scaleX;
7154
+ var top = overlay.y * scaleY;
7155
+ var width = overlay.width * scaleX;
7156
+ var height = overlay.height * scaleY;
7157
+ var opacity = Math.max(0, Math.min(100, overlay.opacity)) / 100;
7158
+ var sz = {
7159
+ w: width,
7160
+ h: height
7161
+ };
7162
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7163
+ style: {
7164
+ position: "absolute",
7165
+ left: "".concat(left, "px"),
7166
+ top: "".concat(top, "px"),
7167
+ width: "".concat(width, "px"),
7168
+ height: "".concat(height, "px"),
7169
+ opacity: opacity,
7170
+ zIndex: overlay.z_index,
7171
+ overflow: "hidden"
7172
+ },
7173
+ children: [
7174
+ overlay.type === "image" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ImageOverlay, {
7175
+ overlay: overlay
7176
+ }),
7177
+ overlay.type === "text" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextOverlay, {
7178
+ overlay: overlay
7179
+ }),
7180
+ overlay.type === "scroller" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollerOverlay, {
7181
+ overlay: overlay
7182
+ }),
7183
+ overlay.type === "shape" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShapeOverlay, {
7184
+ overlay: overlay,
7185
+ size: sz
7186
+ }),
7187
+ overlay.type === "score_bug" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScoreBugOverlay, {
7188
+ overlay: overlay,
7189
+ size: sz
7190
+ }),
7191
+ overlay.type === "lower_third" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LowerThirdOverlay, {
7192
+ overlay: overlay,
7193
+ size: sz
7194
+ }),
7195
+ overlay.type === "qr_code" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QrCodeOverlay, {
7196
+ overlay: overlay,
7197
+ size: sz
7198
+ }),
7199
+ overlay.type === "coming_up_next" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ComingUpNextOverlay, {
7200
+ overlay: overlay,
7201
+ size: sz
7202
+ }),
7203
+ overlay.type === "contextual_trigger" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContextualTriggerOverlay, {
7204
+ overlay: overlay,
7205
+ size: sz
7206
+ }),
7207
+ overlay.type === "odds_betting" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OddsBettingOverlay, {
7208
+ overlay: overlay,
7209
+ size: sz
7210
+ }),
7211
+ overlay.type === "breaking_news" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BreakingNewsOverlay, {
7212
+ overlay: overlay,
7213
+ size: sz
7214
+ }),
7215
+ overlay.type === "countdown" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CountdownOverlay, {
7216
+ overlay: overlay,
7217
+ size: sz
7218
+ })
7219
+ ]
7220
+ }, overlay.id);
7221
+ })
7222
+ });
7223
+ };
7224
+ // src/ui/StormcloudVideoPlayer.tsx
7225
+ var import_jsx_runtime2 = require("react/jsx-runtime");
6086
7226
  var CRITICAL_PROPS = [
6087
7227
  "src",
6088
7228
  "allowNativeHls",
@@ -6091,8 +7231,8 @@ var CRITICAL_PROPS = [
6091
7231
  "driftToleranceMs"
6092
7232
  ];
6093
7233
  var CONTROLS_HIDE_DELAY = 3e3;
6094
- var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6095
- var src = props.src, autoplay = props.autoplay, muted = props.muted, lowLatencyMode = props.lowLatencyMode, allowNativeHls = props.allowNativeHls, driftToleranceMs = props.driftToleranceMs, immediateManifestAds = props.immediateManifestAds, debugAdTiming = props.debugAdTiming, showCustomControls = props.showCustomControls, hideLoadingIndicator = props.hideLoadingIndicator, onVolumeToggle = props.onVolumeToggle, onFullscreenToggle = props.onFullscreenToggle, onControlClick = props.onControlClick, onReady = props.onReady, wrapperClassName = props.wrapperClassName, wrapperStyle = props.wrapperStyle, className = props.className, style = props.style, controls = props.controls, playsInline = props.playsInline, preload = props.preload, poster = props.poster, children = props.children, licenseKey = props.licenseKey, minSegmentsBeforePlay = props.minSegmentsBeforePlay, disableAds = props.disableAds, disableFiller = props.disableFiller, restVideoAttrs = _object_without_properties(props, [
7234
+ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props) {
7235
+ var src = props.src, autoplay = props.autoplay, muted = props.muted, lowLatencyMode = props.lowLatencyMode, allowNativeHls = props.allowNativeHls, driftToleranceMs = props.driftToleranceMs, immediateManifestAds = props.immediateManifestAds, debugAdTiming = props.debugAdTiming, showCustomControls = props.showCustomControls, hideLoadingIndicator = props.hideLoadingIndicator, onVolumeToggle = props.onVolumeToggle, onFullscreenToggle = props.onFullscreenToggle, onControlClick = props.onControlClick, onReady = props.onReady, wrapperClassName = props.wrapperClassName, wrapperStyle = props.wrapperStyle, className = props.className, style = props.style, controls = props.controls, playsInline = props.playsInline, preload = props.preload, poster = props.poster, children = props.children, licenseKey = props.licenseKey, minSegmentsBeforePlay = props.minSegmentsBeforePlay, disableAds = props.disableAds, disableFiller = props.disableFiller, swirlProjectId = props.swirlProjectId, restVideoAttrs = _object_without_properties(props, [
6096
7236
  "src",
6097
7237
  "autoplay",
6098
7238
  "muted",
@@ -6119,35 +7259,38 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6119
7259
  "licenseKey",
6120
7260
  "minSegmentsBeforePlay",
6121
7261
  "disableAds",
6122
- "disableFiller"
7262
+ "disableFiller",
7263
+ "swirlProjectId"
6123
7264
  ]);
6124
- var videoRef = (0, import_react.useRef)(null);
6125
- var playerRef = (0, import_react.useRef)(null);
6126
- var bufferingTimeoutRef = (0, import_react.useRef)(null);
6127
- var controlsTimerRef = (0, import_react.useRef)(null);
6128
- var wrapperRef = (0, import_react.useRef)(null);
6129
- var _import_react_default_useState = _sliced_to_array(import_react.default.useState({
7265
+ var videoRef = (0, import_react2.useRef)(null);
7266
+ var playerRef = (0, import_react2.useRef)(null);
7267
+ var bufferingTimeoutRef = (0, import_react2.useRef)(null);
7268
+ var controlsTimerRef = (0, import_react2.useRef)(null);
7269
+ var wrapperRef = (0, import_react2.useRef)(null);
7270
+ var _import_react2_default_useState = _sliced_to_array(import_react2.default.useState({
6130
7271
  showAds: false,
6131
7272
  currentIndex: 0,
6132
7273
  totalAds: 0
6133
- }), 2), adStatus = _import_react_default_useState[0], setAdStatus = _import_react_default_useState[1];
6134
- var _import_react_default_useState1 = _sliced_to_array(import_react.default.useState(true), 2), shouldShowNativeControls = _import_react_default_useState1[0], setShouldShowNativeControls = _import_react_default_useState1[1];
6135
- var _import_react_default_useState2 = _sliced_to_array(import_react.default.useState(false), 2), isMuted = _import_react_default_useState2[0], setIsMuted = _import_react_default_useState2[1];
6136
- var _import_react_default_useState3 = _sliced_to_array(import_react.default.useState(false), 2), isFullscreen = _import_react_default_useState3[0], setIsFullscreen = _import_react_default_useState3[1];
6137
- var _import_react_default_useState4 = _sliced_to_array(import_react.default.useState(false), 2), isPlaying = _import_react_default_useState4[0], setIsPlaying = _import_react_default_useState4[1];
6138
- var _import_react_default_useState5 = _sliced_to_array(import_react.default.useState(0), 2), currentTime = _import_react_default_useState5[0], setCurrentTime = _import_react_default_useState5[1];
6139
- var _import_react_default_useState6 = _sliced_to_array(import_react.default.useState(0), 2), duration = _import_react_default_useState6[0], setDuration = _import_react_default_useState6[1];
6140
- var _import_react_default_useState7 = _sliced_to_array(import_react.default.useState(1), 2), volume = _import_react_default_useState7[0], setVolume = _import_react_default_useState7[1];
6141
- var _import_react_default_useState8 = _sliced_to_array(import_react.default.useState(1), 2), playbackRate = _import_react_default_useState8[0], setPlaybackRate = _import_react_default_useState8[1];
6142
- var _import_react_default_useState9 = _sliced_to_array(import_react.default.useState(false), 2), showVolumeSlider = _import_react_default_useState9[0], setShowVolumeSlider = _import_react_default_useState9[1];
6143
- var _import_react_default_useState10 = _sliced_to_array(import_react.default.useState(false), 2), showSpeedMenu = _import_react_default_useState10[0], setShowSpeedMenu = _import_react_default_useState10[1];
6144
- var _import_react_default_useState11 = _sliced_to_array(import_react.default.useState(true), 2), isLoading = _import_react_default_useState11[0], setIsLoading = _import_react_default_useState11[1];
6145
- var _import_react_default_useState12 = _sliced_to_array(import_react.default.useState(false), 2), isBuffering = _import_react_default_useState12[0], setIsBuffering = _import_react_default_useState12[1];
6146
- var _import_react_default_useState13 = _sliced_to_array(import_react.default.useState(false), 2), showCenterPlay = _import_react_default_useState13[0], setShowCenterPlay = _import_react_default_useState13[1];
6147
- var _import_react_default_useState14 = _sliced_to_array(import_react.default.useState(false), 2), showLicenseWarning = _import_react_default_useState14[0], setShowLicenseWarning = _import_react_default_useState14[1];
6148
- var _import_react_default_useState15 = _sliced_to_array(import_react.default.useState(true), 2), controlsVisible = _import_react_default_useState15[0], setControlsVisible = _import_react_default_useState15[1];
6149
- var _import_react_default_useState16 = _sliced_to_array(import_react.default.useState(typeof window !== "undefined" ? window.innerWidth : 1920), 2), viewportWidth = _import_react_default_useState16[0], setViewportWidth = _import_react_default_useState16[1];
6150
- var _import_react_default_useState17 = _sliced_to_array(import_react.default.useState(typeof window !== "undefined" ? window.innerHeight > window.innerWidth : false), 2), isPortrait = _import_react_default_useState17[0], setIsPortrait = _import_react_default_useState17[1];
7274
+ }), 2), adStatus = _import_react2_default_useState[0], setAdStatus = _import_react2_default_useState[1];
7275
+ var _import_react2_default_useState1 = _sliced_to_array(import_react2.default.useState(true), 2), shouldShowNativeControls = _import_react2_default_useState1[0], setShouldShowNativeControls = _import_react2_default_useState1[1];
7276
+ var _import_react2_default_useState2 = _sliced_to_array(import_react2.default.useState(false), 2), isMuted = _import_react2_default_useState2[0], setIsMuted = _import_react2_default_useState2[1];
7277
+ var _import_react2_default_useState3 = _sliced_to_array(import_react2.default.useState(false), 2), isFullscreen = _import_react2_default_useState3[0], setIsFullscreen = _import_react2_default_useState3[1];
7278
+ var _import_react2_default_useState4 = _sliced_to_array(import_react2.default.useState(false), 2), isPlaying = _import_react2_default_useState4[0], setIsPlaying = _import_react2_default_useState4[1];
7279
+ var _import_react2_default_useState5 = _sliced_to_array(import_react2.default.useState(0), 2), currentTime = _import_react2_default_useState5[0], setCurrentTime = _import_react2_default_useState5[1];
7280
+ var _import_react2_default_useState6 = _sliced_to_array(import_react2.default.useState(0), 2), duration = _import_react2_default_useState6[0], setDuration = _import_react2_default_useState6[1];
7281
+ var _import_react2_default_useState7 = _sliced_to_array(import_react2.default.useState(1), 2), volume = _import_react2_default_useState7[0], setVolume = _import_react2_default_useState7[1];
7282
+ var _import_react2_default_useState8 = _sliced_to_array(import_react2.default.useState(1), 2), playbackRate = _import_react2_default_useState8[0], setPlaybackRate = _import_react2_default_useState8[1];
7283
+ var _import_react2_default_useState9 = _sliced_to_array(import_react2.default.useState(false), 2), showVolumeSlider = _import_react2_default_useState9[0], setShowVolumeSlider = _import_react2_default_useState9[1];
7284
+ var _import_react2_default_useState10 = _sliced_to_array(import_react2.default.useState(false), 2), showSpeedMenu = _import_react2_default_useState10[0], setShowSpeedMenu = _import_react2_default_useState10[1];
7285
+ var _import_react2_default_useState11 = _sliced_to_array(import_react2.default.useState(true), 2), isLoading = _import_react2_default_useState11[0], setIsLoading = _import_react2_default_useState11[1];
7286
+ var _import_react2_default_useState12 = _sliced_to_array(import_react2.default.useState(false), 2), isBuffering = _import_react2_default_useState12[0], setIsBuffering = _import_react2_default_useState12[1];
7287
+ var _import_react2_default_useState13 = _sliced_to_array(import_react2.default.useState(false), 2), showCenterPlay = _import_react2_default_useState13[0], setShowCenterPlay = _import_react2_default_useState13[1];
7288
+ var _import_react2_default_useState14 = _sliced_to_array(import_react2.default.useState(false), 2), showLicenseWarning = _import_react2_default_useState14[0], setShowLicenseWarning = _import_react2_default_useState14[1];
7289
+ var _import_react2_default_useState15 = _sliced_to_array(import_react2.default.useState(true), 2), controlsVisible = _import_react2_default_useState15[0], setControlsVisible = _import_react2_default_useState15[1];
7290
+ var _import_react2_default_useState16 = _sliced_to_array(import_react2.default.useState([]), 2), overlays = _import_react2_default_useState16[0], setOverlays = _import_react2_default_useState16[1];
7291
+ var _import_react2_default_useState17 = _sliced_to_array(import_react2.default.useState(null), 2), overlayCoordSpace = _import_react2_default_useState17[0], setOverlayCoordSpace = _import_react2_default_useState17[1];
7292
+ var _import_react2_default_useState18 = _sliced_to_array(import_react2.default.useState(typeof window !== "undefined" ? window.innerWidth : 1920), 2), viewportWidth = _import_react2_default_useState18[0], setViewportWidth = _import_react2_default_useState18[1];
7293
+ var _import_react2_default_useState19 = _sliced_to_array(import_react2.default.useState(typeof window !== "undefined" ? window.innerHeight > window.innerWidth : false), 2), isPortrait = _import_react2_default_useState19[0], setIsPortrait = _import_react2_default_useState19[1];
6151
7294
  var getResponsiveScale = function getResponsiveScale() {
6152
7295
  if (viewportWidth < 480) return 0.7;
6153
7296
  if (viewportWidth < 768) return 0.8;
@@ -6155,7 +7298,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6155
7298
  return 1;
6156
7299
  };
6157
7300
  var responsiveScale = getResponsiveScale();
6158
- var resetControlsTimer = (0, import_react.useCallback)(function() {
7301
+ var resetControlsTimer = (0, import_react2.useCallback)(function() {
6159
7302
  if (controlsTimerRef.current) {
6160
7303
  clearTimeout(controlsTimerRef.current);
6161
7304
  }
@@ -6232,7 +7375,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6232
7375
  };
6233
7376
  var isHlsStream = (src === null || src === void 0 ? void 0 : src.toLowerCase().includes(".m3u8")) || (src === null || src === void 0 ? void 0 : src.toLowerCase().includes("/hls/"));
6234
7377
  var shouldShowEnhancedControls = showCustomControls && (isHlsStream ? allowNativeHls : true);
6235
- var criticalPropsKey = (0, import_react.useMemo)(function() {
7378
+ var criticalPropsKey = (0, import_react2.useMemo)(function() {
6236
7379
  return CRITICAL_PROPS.map(function(prop) {
6237
7380
  return "".concat(prop, ":").concat(props[prop]);
6238
7381
  }).join("|");
@@ -6243,7 +7386,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6243
7386
  lowLatencyMode,
6244
7387
  driftToleranceMs
6245
7388
  ]);
6246
- (0, import_react.useEffect)(function() {
7389
+ (0, import_react2.useEffect)(function() {
6247
7390
  if (typeof window === "undefined") return;
6248
7391
  var el = videoRef.current;
6249
7392
  if (!el || !src) return;
@@ -6298,7 +7441,61 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6298
7441
  }, [
6299
7442
  criticalPropsKey
6300
7443
  ]);
6301
- (0, import_react.useEffect)(function() {
7444
+ (0, import_react2.useEffect)(function() {
7445
+ if (!swirlProjectId) {
7446
+ setOverlays([]);
7447
+ setOverlayCoordSpace(null);
7448
+ return;
7449
+ }
7450
+ var cancelled = false;
7451
+ fetchProjectOverlays(swirlProjectId).then(function(data) {
7452
+ if (!cancelled) setOverlays(data);
7453
+ }).catch(function(err) {
7454
+ if (!cancelled) {
7455
+ console.warn("[StormcloudVideoPlayer] Failed to fetch overlays:", err);
7456
+ }
7457
+ });
7458
+ return function() {
7459
+ cancelled = true;
7460
+ };
7461
+ }, [
7462
+ swirlProjectId
7463
+ ]);
7464
+ (0, import_react2.useEffect)(function() {
7465
+ if (!swirlProjectId) return;
7466
+ var player = playerRef.current;
7467
+ if (!player) return;
7468
+ var attempts = 0;
7469
+ var maxAttempts = 30;
7470
+ var tryResolve = function tryResolve() {
7471
+ var res = player.getMinHlsResolution();
7472
+ if (res) {
7473
+ setOverlayCoordSpace(res);
7474
+ return true;
7475
+ }
7476
+ var video = player.videoElement;
7477
+ if (video && video.videoWidth > 0 && video.videoHeight > 0) {
7478
+ setOverlayCoordSpace({
7479
+ width: video.videoWidth,
7480
+ height: video.videoHeight
7481
+ });
7482
+ return true;
7483
+ }
7484
+ return false;
7485
+ };
7486
+ if (tryResolve()) return;
7487
+ var interval = setInterval(function() {
7488
+ attempts++;
7489
+ if (tryResolve() || attempts >= maxAttempts) clearInterval(interval);
7490
+ }, 300);
7491
+ return function() {
7492
+ return clearInterval(interval);
7493
+ };
7494
+ }, [
7495
+ swirlProjectId,
7496
+ criticalPropsKey
7497
+ ]);
7498
+ (0, import_react2.useEffect)(function() {
6302
7499
  if (!playerRef.current) return;
6303
7500
  try {
6304
7501
  if (autoplay !== void 0 && playerRef.current.videoElement) {
@@ -6314,7 +7511,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6314
7511
  autoplay,
6315
7512
  muted
6316
7513
  ]);
6317
- (0, import_react.useEffect)(function() {
7514
+ (0, import_react2.useEffect)(function() {
6318
7515
  if (!playerRef.current) return;
6319
7516
  var checkAdStatus = function checkAdStatus() {
6320
7517
  if (playerRef.current) {
@@ -6344,7 +7541,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6344
7541
  return clearInterval(interval);
6345
7542
  };
6346
7543
  }, []);
6347
- (0, import_react.useEffect)(function() {
7544
+ (0, import_react2.useEffect)(function() {
6348
7545
  if (typeof window === "undefined" || !playerRef.current) return;
6349
7546
  var handleResize = function handleResize() {
6350
7547
  if (playerRef.current && videoRef.current) {
@@ -6360,7 +7557,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6360
7557
  return window.removeEventListener("resize", handleResize);
6361
7558
  };
6362
7559
  }, []);
6363
- (0, import_react.useEffect)(function() {
7560
+ (0, import_react2.useEffect)(function() {
6364
7561
  if (!playerRef.current || !videoRef.current) return;
6365
7562
  var updateStates = function updateStates() {
6366
7563
  if (playerRef.current && videoRef.current) {
@@ -6387,7 +7584,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6387
7584
  document.removeEventListener("fullscreenchange", handleFullscreenChange);
6388
7585
  };
6389
7586
  }, []);
6390
- (0, import_react.useEffect)(function() {
7587
+ (0, import_react2.useEffect)(function() {
6391
7588
  if (!videoRef.current) return;
6392
7589
  var handleCanPlay = function handleCanPlay() {
6393
7590
  setIsLoading(false);
@@ -6459,19 +7656,19 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6459
7656
  }, [
6460
7657
  debugAdTiming
6461
7658
  ]);
6462
- (0, import_react.useEffect)(function() {
7659
+ (0, import_react2.useEffect)(function() {
6463
7660
  return function() {
6464
7661
  if (controlsTimerRef.current) {
6465
7662
  clearTimeout(controlsTimerRef.current);
6466
7663
  }
6467
7664
  };
6468
7665
  }, []);
6469
- var handleWrapperMouseMove = (0, import_react.useCallback)(function() {
7666
+ var handleWrapperMouseMove = (0, import_react2.useCallback)(function() {
6470
7667
  resetControlsTimer();
6471
7668
  }, [
6472
7669
  resetControlsTimer
6473
7670
  ]);
6474
- var handleWrapperMouseLeave = (0, import_react.useCallback)(function() {
7671
+ var handleWrapperMouseLeave = (0, import_react2.useCallback)(function() {
6475
7672
  if (!showVolumeSlider && !showSpeedMenu) {
6476
7673
  setControlsVisible(false);
6477
7674
  }
@@ -6481,12 +7678,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6481
7678
  ]);
6482
7679
  var progressPercent = duration > 0 ? currentTime / duration * 100 : 0;
6483
7680
  var VolumeIcon = isMuted || volume === 0 ? import_fa.FaVolumeMute : volume < 0.5 ? import_fa.FaVolumeDown : import_fa.FaVolumeUp;
6484
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
7681
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, {
6485
7682
  children: [
6486
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
7683
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", {
6487
7684
  children: "\n @keyframes sc-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n @keyframes sc-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.6; }\n }\n @keyframes sc-fade-in {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: translateY(0); }\n }\n .sc-wrapper:fullscreen,\n .sc-wrapper:has(*:fullscreen) {\n border-radius: 0 !important;\n box-shadow: none !important;\n width: 100vw !important;\n height: 100vh !important;\n max-width: 100vw !important;\n max-height: 100vh !important;\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n z-index: 999999 !important;\n background: #000 !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n }\n .sc-ctrl-btn {\n background: none;\n border: none;\n color: #fff;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n padding: 8px;\n transition: background 0.15s ease, opacity 0.15s ease;\n opacity: 0.9;\n }\n .sc-ctrl-btn:hover {\n opacity: 1;\n background: rgba(255, 255, 255, 0.1);\n }\n .sc-ctrl-btn:active {\n opacity: 0.7;\n }\n .sc-controls-bar {\n transition: opacity 0.35s ease, transform 0.35s ease;\n }\n .sc-progress-track:hover .sc-progress-thumb {\n transform: translate(-50%, -50%) scale(1) !important;\n }\n .sc-loading-hidden .sc-loading-indicator {\n display: none !important;\n }\n "
6488
7685
  }),
6489
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7686
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6490
7687
  ref: wrapperRef,
6491
7688
  className: "sc-wrapper ".concat(wrapperClassName || ""),
6492
7689
  onMouseMove: handleWrapperMouseMove,
@@ -6510,10 +7707,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6510
7707
  boxShadow: isFullscreen ? "none" : void 0
6511
7708
  }, wrapperStyle),
6512
7709
  children: [
6513
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("video", _object_spread_props(_object_spread({
7710
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("video", _object_spread_props(_object_spread({
6514
7711
  ref: videoRef,
6515
7712
  className: className,
6516
7713
  style: _object_spread({
7714
+ position: "relative",
7715
+ zIndex: 1,
6517
7716
  display: "block",
6518
7717
  width: "100%",
6519
7718
  height: isFullscreen ? "100%" : "auto",
@@ -6530,7 +7729,13 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6530
7729
  }, restVideoAttrs), {
6531
7730
  children: children
6532
7731
  })),
6533
- (isLoading || isBuffering) && !hideLoadingIndicator && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaSpinner, {
7732
+ overlays.length > 0 && !adStatus.showAds && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(OverlayRenderer, {
7733
+ overlays: overlays,
7734
+ currentTime: currentTime,
7735
+ videoRef: videoRef,
7736
+ coordinateSpace: overlayCoordSpace
7737
+ }),
7738
+ (isLoading || isBuffering) && !hideLoadingIndicator && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_fa.FaSpinner, {
6534
7739
  className: "sc-loading-indicator",
6535
7740
  size: 40,
6536
7741
  color: "rgba(255, 255, 255, 0.85)",
@@ -6543,7 +7748,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6543
7748
  filter: "drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6))"
6544
7749
  }
6545
7750
  }),
6546
- showLicenseWarning && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7751
+ showLicenseWarning && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6547
7752
  style: {
6548
7753
  position: "absolute",
6549
7754
  top: "50%",
@@ -6562,7 +7767,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6562
7767
  margin: "0 16px"
6563
7768
  },
6564
7769
  children: [
6565
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7770
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6566
7771
  style: {
6567
7772
  fontSize: "18px",
6568
7773
  fontWeight: "700",
@@ -6571,7 +7776,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6571
7776
  },
6572
7777
  children: "License Key Required"
6573
7778
  }),
6574
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7779
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6575
7780
  style: {
6576
7781
  fontSize: "13px",
6577
7782
  lineHeight: "1.6",
@@ -6579,13 +7784,13 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6579
7784
  },
6580
7785
  children: [
6581
7786
  "Please provide a valid license key to use the Stormcloud Video Player.",
6582
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
7787
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("br", {}),
6583
7788
  "Contact your administrator for licensing information."
6584
7789
  ]
6585
7790
  })
6586
7791
  ]
6587
7792
  }),
6588
- showCenterPlay && !isLoading && !isBuffering && !showLicenseWarning && !adStatus.showAds && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7793
+ showCenterPlay && !isLoading && !isBuffering && !showLicenseWarning && !adStatus.showAds && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6589
7794
  onClick: handleCenterPlayClick,
6590
7795
  style: {
6591
7796
  position: "absolute",
@@ -6620,7 +7825,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6620
7825
  el.style.transform = "translate(-50%, -50%) scale(1)";
6621
7826
  },
6622
7827
  title: "Play",
6623
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaPlay, {
7828
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_fa.FaPlay, {
6624
7829
  size: Math.max(22, 28 * responsiveScale),
6625
7830
  color: "white",
6626
7831
  style: {
@@ -6629,7 +7834,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6629
7834
  }
6630
7835
  })
6631
7836
  }),
6632
- adStatus.showAds && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7837
+ adStatus.showAds && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6633
7838
  style: {
6634
7839
  position: "absolute",
6635
7840
  top: "".concat(12 * responsiveScale, "px"),
@@ -6641,7 +7846,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6641
7846
  animation: "sc-fade-in 0.3s ease"
6642
7847
  },
6643
7848
  children: [
6644
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7849
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6645
7850
  style: {
6646
7851
  background: "rgba(234, 179, 8, 0.9)",
6647
7852
  backdropFilter: "blur(12px)",
@@ -6656,7 +7861,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6656
7861
  },
6657
7862
  children: "Ad"
6658
7863
  }),
6659
- adStatus.currentIndex > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7864
+ adStatus.currentIndex > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6660
7865
  style: {
6661
7866
  background: "rgba(0, 0, 0, 0.5)",
6662
7867
  backdropFilter: "blur(12px)",
@@ -6675,7 +7880,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6675
7880
  })
6676
7881
  ]
6677
7882
  }),
6678
- shouldShowEnhancedControls && !showLicenseWarning ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7883
+ shouldShowEnhancedControls && !showLicenseWarning ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6679
7884
  className: "sc-controls-bar",
6680
7885
  style: {
6681
7886
  position: "absolute",
@@ -6690,7 +7895,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6690
7895
  pointerEvents: controlsVisible || adStatus.showAds ? "auto" : "none"
6691
7896
  },
6692
7897
  children: [
6693
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7898
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6694
7899
  className: "sc-progress-track",
6695
7900
  style: {
6696
7901
  width: "100%",
@@ -6710,7 +7915,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6710
7915
  e.currentTarget.style.height = "3px";
6711
7916
  },
6712
7917
  children: [
6713
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7918
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6714
7919
  style: {
6715
7920
  position: "absolute",
6716
7921
  top: 0,
@@ -6722,7 +7927,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6722
7927
  transition: "width 0.15s linear"
6723
7928
  }
6724
7929
  }),
6725
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7930
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6726
7931
  className: "sc-progress-thumb",
6727
7932
  style: {
6728
7933
  position: "absolute",
@@ -6739,7 +7944,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6739
7944
  })
6740
7945
  ]
6741
7946
  }),
6742
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7947
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6743
7948
  style: {
6744
7949
  display: "flex",
6745
7950
  alignItems: "center",
@@ -6748,14 +7953,14 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6748
7953
  gap: "".concat(8 * responsiveScale, "px")
6749
7954
  },
6750
7955
  children: [
6751
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7956
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6752
7957
  style: {
6753
7958
  display: "flex",
6754
7959
  alignItems: "center",
6755
7960
  gap: "".concat(8 * responsiveScale, "px")
6756
7961
  },
6757
7962
  children: [
6758
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
7963
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
6759
7964
  className: "sc-ctrl-btn",
6760
7965
  onClick: handlePlayPause,
6761
7966
  style: {
@@ -6765,16 +7970,16 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6765
7970
  minHeight: "".concat(36 * responsiveScale, "px")
6766
7971
  },
6767
7972
  title: isPlaying ? "Pause" : "Play",
6768
- children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaPause, {
7973
+ children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_fa.FaPause, {
6769
7974
  size: Math.max(14, 18 * responsiveScale)
6770
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaPlay, {
7975
+ }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_fa.FaPlay, {
6771
7976
  size: Math.max(14, 18 * responsiveScale),
6772
7977
  style: {
6773
7978
  marginLeft: "2px"
6774
7979
  }
6775
7980
  })
6776
7981
  }),
6777
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7982
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6778
7983
  style: {
6779
7984
  display: "flex",
6780
7985
  alignItems: "center"
@@ -6786,7 +7991,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6786
7991
  return setShowVolumeSlider(false);
6787
7992
  },
6788
7993
  children: [
6789
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
7994
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
6790
7995
  className: "sc-ctrl-btn",
6791
7996
  onClick: function onClick() {
6792
7997
  if (playerRef.current) {
@@ -6802,11 +8007,11 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6802
8007
  minHeight: "".concat(36 * responsiveScale, "px")
6803
8008
  },
6804
8009
  title: isMuted ? "Unmute" : "Mute",
6805
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VolumeIcon, {
8010
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(VolumeIcon, {
6806
8011
  size: Math.max(14, 18 * responsiveScale)
6807
8012
  })
6808
8013
  }),
6809
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8014
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6810
8015
  style: {
6811
8016
  width: showVolumeSlider ? "".concat(62 * responsiveScale, "px") : "0px",
6812
8017
  overflow: "hidden",
@@ -6816,7 +8021,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6816
8021
  paddingLeft: showVolumeSlider ? "2px" : "0",
6817
8022
  paddingRight: showVolumeSlider ? "4px" : "0"
6818
8023
  },
6819
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
8024
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6820
8025
  style: {
6821
8026
  position: "relative",
6822
8027
  width: "".concat(56 * responsiveScale, "px"),
@@ -6846,7 +8051,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6846
8051
  handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
6847
8052
  },
6848
8053
  children: [
6849
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8054
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6850
8055
  style: {
6851
8056
  position: "absolute",
6852
8057
  inset: 0,
@@ -6854,7 +8059,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6854
8059
  borderRadius: "1.5px"
6855
8060
  }
6856
8061
  }),
6857
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8062
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6858
8063
  style: {
6859
8064
  position: "absolute",
6860
8065
  top: 0,
@@ -6866,7 +8071,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6866
8071
  transition: "width 0.1s ease-out"
6867
8072
  }
6868
8073
  }),
6869
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8074
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6870
8075
  style: {
6871
8076
  position: "absolute",
6872
8077
  top: "50%",
@@ -6885,7 +8090,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6885
8090
  })
6886
8091
  ]
6887
8092
  }),
6888
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
8093
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6889
8094
  style: {
6890
8095
  fontSize: "".concat(13 * responsiveScale, "px"),
6891
8096
  fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
@@ -6898,7 +8103,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6898
8103
  children: [
6899
8104
  formatTime(currentTime),
6900
8105
  " ",
6901
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
8106
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
6902
8107
  style: {
6903
8108
  color: "rgba(255,255,255,0.5)"
6904
8109
  },
@@ -6910,20 +8115,20 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6910
8115
  })
6911
8116
  ]
6912
8117
  }),
6913
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
8118
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6914
8119
  style: {
6915
8120
  display: "flex",
6916
8121
  alignItems: "center",
6917
8122
  gap: "".concat(8 * responsiveScale, "px")
6918
8123
  },
6919
8124
  children: [
6920
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
8125
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
6921
8126
  style: {
6922
8127
  position: "relative",
6923
8128
  display: viewportWidth < 600 ? "none" : "block"
6924
8129
  },
6925
8130
  children: [
6926
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
8131
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", {
6927
8132
  className: "sc-ctrl-btn",
6928
8133
  onClick: function onClick() {
6929
8134
  setShowSpeedMenu(!showSpeedMenu);
@@ -6943,7 +8148,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6943
8148
  "x"
6944
8149
  ]
6945
8150
  }),
6946
- showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8151
+ showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
6947
8152
  style: {
6948
8153
  position: "absolute",
6949
8154
  bottom: "100%",
@@ -6969,7 +8174,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
6969
8174
  1.75,
6970
8175
  2
6971
8176
  ].map(function(speed) {
6972
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
8177
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", {
6973
8178
  onClick: function onClick() {
6974
8179
  return handlePlaybackRateChange(speed);
6975
8180
  },
@@ -7008,7 +8213,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7008
8213
  })
7009
8214
  ]
7010
8215
  }),
7011
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
8216
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
7012
8217
  className: "sc-ctrl-btn",
7013
8218
  onClick: function onClick() {
7014
8219
  if (onFullscreenToggle) {
@@ -7029,9 +8234,9 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7029
8234
  minHeight: "".concat(36 * responsiveScale, "px")
7030
8235
  },
7031
8236
  title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
7032
- children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaCompress, {
8237
+ children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_fa.FaCompress, {
7033
8238
  size: Math.max(14, 18 * responsiveScale)
7034
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaExpand, {
8239
+ }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_fa.FaExpand, {
7035
8240
  size: Math.max(14, 18 * responsiveScale)
7036
8241
  })
7037
8242
  })
@@ -7040,7 +8245,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7040
8245
  ]
7041
8246
  })
7042
8247
  ]
7043
- }) : showCustomControls && !showLicenseWarning && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
8248
+ }) : showCustomControls && !showLicenseWarning && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
7044
8249
  className: "sc-controls-bar",
7045
8250
  style: {
7046
8251
  position: "absolute",
@@ -7055,7 +8260,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7055
8260
  pointerEvents: controlsVisible ? "auto" : "none"
7056
8261
  },
7057
8262
  children: [
7058
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
8263
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
7059
8264
  style: {
7060
8265
  display: "flex",
7061
8266
  alignItems: "center",
@@ -7070,7 +8275,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7070
8275
  return setShowVolumeSlider(false);
7071
8276
  },
7072
8277
  children: [
7073
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
8278
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
7074
8279
  className: "sc-ctrl-btn",
7075
8280
  onClick: function onClick() {
7076
8281
  if (playerRef.current) playerRef.current.toggleMute();
@@ -7084,11 +8289,11 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7084
8289
  minHeight: "".concat(36 * responsiveScale, "px")
7085
8290
  },
7086
8291
  title: isMuted ? "Unmute" : "Mute",
7087
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VolumeIcon, {
8292
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(VolumeIcon, {
7088
8293
  size: Math.max(14, 18 * responsiveScale)
7089
8294
  })
7090
8295
  }),
7091
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8296
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
7092
8297
  style: {
7093
8298
  width: showVolumeSlider ? "".concat(62 * responsiveScale, "px") : "0px",
7094
8299
  overflow: "hidden",
@@ -7098,7 +8303,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7098
8303
  paddingLeft: showVolumeSlider ? "2px" : "0",
7099
8304
  paddingRight: showVolumeSlider ? "6px" : "0"
7100
8305
  },
7101
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
8306
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
7102
8307
  style: {
7103
8308
  position: "relative",
7104
8309
  width: "".concat(56 * responsiveScale, "px"),
@@ -7128,7 +8333,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7128
8333
  handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
7129
8334
  },
7130
8335
  children: [
7131
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8336
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
7132
8337
  style: {
7133
8338
  position: "absolute",
7134
8339
  inset: 0,
@@ -7136,7 +8341,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7136
8341
  borderRadius: "1.5px"
7137
8342
  }
7138
8343
  }),
7139
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8344
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
7140
8345
  style: {
7141
8346
  position: "absolute",
7142
8347
  top: 0,
@@ -7148,7 +8353,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7148
8353
  transition: "width 0.1s ease-out"
7149
8354
  }
7150
8355
  }),
7151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8356
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
7152
8357
  style: {
7153
8358
  position: "absolute",
7154
8359
  top: "50%",
@@ -7167,7 +8372,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7167
8372
  })
7168
8373
  ]
7169
8374
  }),
7170
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
8375
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
7171
8376
  className: "sc-ctrl-btn",
7172
8377
  onClick: function onClick() {
7173
8378
  if (onFullscreenToggle) {
@@ -7189,15 +8394,15 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7189
8394
  background: "rgba(0, 0, 0, 0.6)"
7190
8395
  },
7191
8396
  title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
7192
- children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaCompress, {
8397
+ children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_fa.FaCompress, {
7193
8398
  size: Math.max(14, 18 * responsiveScale)
7194
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaExpand, {
8399
+ }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_fa.FaExpand, {
7195
8400
  size: Math.max(14, 18 * responsiveScale)
7196
8401
  })
7197
8402
  })
7198
8403
  ]
7199
8404
  }),
7200
- onControlClick && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
8405
+ onControlClick && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
7201
8406
  onClick: onControlClick,
7202
8407
  style: {
7203
8408
  position: "absolute",
@@ -7248,7 +8453,8 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
7248
8453
  "playsInline",
7249
8454
  "preload",
7250
8455
  "poster",
7251
- "children"
8456
+ "children",
8457
+ "swirlProjectId"
7252
8458
  ];
7253
8459
  var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
7254
8460
  try {