stormcloud-video-player 0.7.39 → 0.7.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -5701,6 +5701,126 @@ function isOverlayActive(overlay, currentTime) {
5701
5701
  if (durationSec <= 0) return false;
5702
5702
  return currentTime >= startSec && currentTime < startSec + durationSec;
5703
5703
  }
5704
+ var SWIRL_HD_AUTHORING_WIDTH = 1920;
5705
+ var SWIRL_HD_AUTHORING_HEIGHT = 1080;
5706
+ var NAB_DEMO_NAME_PREFIX = "NAB Demo \u2014 ";
5707
+ function overlayAuthoringDimensions(overlay, decodeWidth, decodeHeight) {
5708
+ if (!decodeWidth || !decodeHeight) {
5709
+ return {
5710
+ width: decodeWidth || SWIRL_HD_AUTHORING_WIDTH,
5711
+ height: decodeHeight || SWIRL_HD_AUTHORING_HEIGHT
5712
+ };
5713
+ }
5714
+ if (!overlay.visible) {
5715
+ return {
5716
+ width: decodeWidth,
5717
+ height: decodeHeight
5718
+ };
5719
+ }
5720
+ var extR = overlay.x + overlay.width;
5721
+ var extB = overlay.y + overlay.height;
5722
+ var EPS = 2;
5723
+ var exceedsDecode = extR > decodeWidth + EPS || extB > decodeHeight + EPS;
5724
+ var isNabDemo = overlay.name.startsWith(NAB_DEMO_NAME_PREFIX);
5725
+ var isSyntheticMarketsTicker = overlay.id === -9001 || overlay.name === "Demo stock ticker";
5726
+ if (exceedsDecode && (isNabDemo || isSyntheticMarketsTicker)) {
5727
+ return {
5728
+ width: SWIRL_HD_AUTHORING_WIDTH,
5729
+ height: SWIRL_HD_AUTHORING_HEIGHT
5730
+ };
5731
+ }
5732
+ return {
5733
+ width: decodeWidth,
5734
+ height: decodeHeight
5735
+ };
5736
+ }
5737
+ function overlayExtents(overlays) {
5738
+ var maxR = 0;
5739
+ var maxB = 0;
5740
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5741
+ try {
5742
+ for(var _iterator = overlays[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5743
+ var o = _step.value;
5744
+ if (!o.visible) continue;
5745
+ maxR = Math.max(maxR, o.x + o.width);
5746
+ maxB = Math.max(maxB, o.y + o.height);
5747
+ }
5748
+ } catch (err) {
5749
+ _didIteratorError = true;
5750
+ _iteratorError = err;
5751
+ } finally{
5752
+ try {
5753
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5754
+ _iterator.return();
5755
+ }
5756
+ } finally{
5757
+ if (_didIteratorError) {
5758
+ throw _iteratorError;
5759
+ }
5760
+ }
5761
+ }
5762
+ return {
5763
+ maxR: maxR,
5764
+ maxB: maxB
5765
+ };
5766
+ }
5767
+ function swirlProjectHasNabDemoMixedWithOther(overlays) {
5768
+ var hasNab = false;
5769
+ var hasOther = false;
5770
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5771
+ try {
5772
+ for(var _iterator = overlays[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5773
+ var o = _step.value;
5774
+ if (!o.visible) continue;
5775
+ if (o.name.startsWith(NAB_DEMO_NAME_PREFIX)) hasNab = true;
5776
+ else hasOther = true;
5777
+ }
5778
+ } catch (err) {
5779
+ _didIteratorError = true;
5780
+ _iteratorError = err;
5781
+ } finally{
5782
+ try {
5783
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5784
+ _iterator.return();
5785
+ }
5786
+ } finally{
5787
+ if (_didIteratorError) {
5788
+ throw _iteratorError;
5789
+ }
5790
+ }
5791
+ }
5792
+ return hasNab && hasOther;
5793
+ }
5794
+ function inferSwirlOverlayCoordinateSpace(overlays, videoWidth, videoHeight) {
5795
+ if (!videoWidth || !videoHeight) {
5796
+ return {
5797
+ width: videoWidth || SWIRL_HD_AUTHORING_WIDTH,
5798
+ height: videoHeight || SWIRL_HD_AUTHORING_HEIGHT
5799
+ };
5800
+ }
5801
+ if (!overlays.length) {
5802
+ return {
5803
+ width: videoWidth,
5804
+ height: videoHeight
5805
+ };
5806
+ }
5807
+ var _overlayExtents = overlayExtents(overlays), maxR = _overlayExtents.maxR, maxB = _overlayExtents.maxB;
5808
+ var EPS = 1;
5809
+ var exceedsDecode = maxR > videoWidth + EPS || maxB > videoHeight + EPS;
5810
+ var fitsHdCanvas = maxR <= SWIRL_HD_AUTHORING_WIDTH + EPS && maxB <= SWIRL_HD_AUTHORING_HEIGHT + EPS;
5811
+ var mixed = swirlProjectHasNabDemoMixedWithOther(overlays);
5812
+ var decodeLargerThanHd = videoWidth > SWIRL_HD_AUTHORING_WIDTH + EPS || videoHeight > SWIRL_HD_AUTHORING_HEIGHT + EPS;
5813
+ if (fitsHdCanvas && (decodeLargerThanHd || exceedsDecode && !mixed)) {
5814
+ return {
5815
+ width: SWIRL_HD_AUTHORING_WIDTH,
5816
+ height: SWIRL_HD_AUTHORING_HEIGHT
5817
+ };
5818
+ }
5819
+ return {
5820
+ width: videoWidth,
5821
+ height: videoHeight
5822
+ };
5823
+ }
5704
5824
  function scrollerLooksLikeMarketsStock(o) {
5705
5825
  var _ref, _ref1, _ref2, _ref3;
5706
5826
  if (o.type !== "scroller") return false;
@@ -5709,39 +5829,52 @@ function scrollerLooksLikeMarketsStock(o) {
5709
5829
  return /\b(MARKETS?|NYSE|NASDAQ|DJIA|\bS&P\b|STOCK|AAPL|TSLA|NVDA|EQUITIES)\b/i.test(blob);
5710
5830
  }
5711
5831
  function createDemoStockTickerOverlay(projectId, opts) {
5712
- var stack = (opts === null || opts === void 0 ? void 0 : opts.stackAboveNews) === true;
5832
+ var cw = (opts === null || opts === void 0 ? void 0 : opts.coordinateWidth) && opts.coordinateWidth > 0 ? opts.coordinateWidth : SWIRL_HD_AUTHORING_WIDTH;
5833
+ var ch = (opts === null || opts === void 0 ? void 0 : opts.coordinateHeight) && opts.coordinateHeight > 0 ? opts.coordinateHeight : SWIRL_HD_AUTHORING_HEIGHT;
5834
+ var sx = cw / SWIRL_HD_AUTHORING_WIDTH;
5835
+ var sy = ch / SWIRL_HD_AUTHORING_HEIGHT;
5836
+ var x = 36 * sx;
5837
+ var y = 1002 * sy;
5838
+ var width = 1848 * sx;
5839
+ var height = 66 * sy;
5840
+ var fontSize = Math.max(8, Math.round(13 * sy));
5841
+ var scrollSpeed = Math.max(8, Math.round(36 * sx));
5842
+ var borderRadius = Math.max(1, Math.round(4 * sy));
5713
5843
  return {
5714
5844
  id: -9001,
5715
5845
  project_id: projectId,
5716
5846
  name: "Demo stock ticker",
5717
5847
  type: "scroller",
5718
5848
  visible: true,
5719
- x: 144,
5720
- y: stack ? 818 : 950,
5721
- width: 1632,
5722
- height: stack ? 78 : 97,
5849
+ x: x,
5850
+ y: y,
5851
+ width: width,
5852
+ height: height,
5723
5853
  opacity: 100,
5724
5854
  start_time: "00:00:00.000",
5725
5855
  duration: "24:00:00.000",
5726
- z_index: stack ? 125 : 120,
5856
+ z_index: 120,
5727
5857
  scroller_config: {
5858
+ preset: "equities_strip",
5728
5859
  use_custom_text: true,
5729
- custom_text: "AAPL +1.24% \u2022 MSFT +0.42% \u2022 GOOGL \u22120.11% \u2022 TSLA +2.31% \u2022 NVDA +1.87% \u2022 AMZN +0.65% \u2022 META +0.38% \u2022 DJIA +0.52% \u2022 S&P 500 +0.33% \u2022 NDAQ +0.41%",
5860
+ custom_text: "AAPL +0.84% \u2022 MSFT +0.31% \u2022 GOOGL \u22120.22% \u2022 AMZN +0.47% \u2022 NVDA +1.12% \u2022 META +0.19% \u2022 BRK.B +0.11% \u2022 JPM +0.55% \u2022 V +0.28% \u2022 UNH \u22120.17% \u2022 DJIA +0.41% \u2022 S&P 500 +0.29% \u2022 Nasdaq Composite +0.36% \u2022 Russell 2000 +0.52% \u2022 WTI crude $78.40 +0.6% \u2022 Gold $2,348/oz \u22120.2% \u2022 10Y Treasury 4.28%",
5730
5861
  direction: "left",
5731
- scroll_speed: 42,
5732
- font_size: 15,
5733
- font_weight: "700",
5734
- text_color: "#f8fafc",
5735
- background_color: "#0f172a",
5862
+ scroll_speed: scrollSpeed,
5863
+ font_size: fontSize,
5864
+ font_weight: "600",
5865
+ text_color: "#e2e8f0",
5866
+ background_color: "#0a0f18",
5736
5867
  background_opacity: 92,
5737
- border_radius: 4,
5738
- label: "MARKETS",
5739
- label_line2: "LIVE",
5740
- label_color: "#0ea5e9",
5741
- label_text_color: "#ffffff",
5868
+ border_radius: borderRadius,
5869
+ padding: Math.max(3, Math.round(6 * sy)),
5870
+ label: "U.S. equities",
5871
+ label_line2: "",
5872
+ label_color: "#1e3a5f",
5873
+ label_text_color: "#f8fafc",
5742
5874
  accent_color: "#38bdf8",
5743
5875
  show_accent_line: true,
5744
- separator_char: "\u2022"
5876
+ separator_char: "\u2022",
5877
+ item_spacing: Math.max(28, Math.round(48 * sx))
5745
5878
  }
5746
5879
  };
5747
5880
  }
@@ -6184,12 +6317,14 @@ function ScrollerOverlay(param) {
6184
6317
  var bgOpacity = (cfg === null || cfg === void 0 ? void 0 : cfg.background_opacity) !== void 0 ? cfg.background_opacity / 100 : 0.95;
6185
6318
  var borderRadius = (_ref6 = cfg === null || cfg === void 0 ? void 0 : cfg.border_radius) !== null && _ref6 !== void 0 ? _ref6 : 0;
6186
6319
  var itemSpacing = (_ref7 = cfg === null || cfg === void 0 ? void 0 : cfg.item_spacing) !== null && _ref7 !== void 0 ? _ref7 : 60;
6320
+ var pad = (cfg === null || cfg === void 0 ? void 0 : cfg.padding) !== void 0 && cfg.padding >= 0 ? cfg.padding : 8;
6187
6321
  var label = (_ref8 = cfg === null || cfg === void 0 ? void 0 : cfg.label) !== null && _ref8 !== void 0 ? _ref8 : "NEWS";
6188
6322
  var labelLine2 = (_ref9 = cfg === null || cfg === void 0 ? void 0 : cfg.label_line2) !== null && _ref9 !== void 0 ? _ref9 : "";
6189
6323
  var labelColor = (_ref10 = cfg === null || cfg === void 0 ? void 0 : cfg.label_color) !== null && _ref10 !== void 0 ? _ref10 : "#f97316";
6190
6324
  var labelTextColor = (_ref11 = cfg === null || cfg === void 0 ? void 0 : cfg.label_text_color) !== null && _ref11 !== void 0 ? _ref11 : "#ffffff";
6191
6325
  var accentColor = (_ref12 = cfg === null || cfg === void 0 ? void 0 : cfg.accent_color) !== null && _ref12 !== void 0 ? _ref12 : labelColor;
6192
6326
  var showAccentLine = (cfg === null || cfg === void 0 ? void 0 : cfg.show_accent_line) !== false;
6327
+ var isEquitiesStrip = (cfg === null || cfg === void 0 ? void 0 : cfg.preset) === "equities_strip";
6193
6328
  var isHorizontal = direction === "left" || direction === "right";
6194
6329
  var isReverse = direction === "right" || direction === "down";
6195
6330
  var fullText = segments.join(" ".concat(sep, " "));
@@ -6220,7 +6355,7 @@ function ScrollerOverlay(param) {
6220
6355
  children: [
6221
6356
  showAccentLine && /* @__PURE__ */ jsx("div", {
6222
6357
  style: {
6223
- height: 3,
6358
+ height: isEquitiesStrip ? 2 : 3,
6224
6359
  background: accentColor,
6225
6360
  flexShrink: 0,
6226
6361
  width: "100%"
@@ -6231,42 +6366,50 @@ function ScrollerOverlay(param) {
6231
6366
  display: "flex",
6232
6367
  flex: 1,
6233
6368
  overflow: "hidden",
6234
- minHeight: 0
6369
+ minHeight: 0,
6370
+ alignItems: "center",
6371
+ padding: isEquitiesStrip ? "".concat(Math.max(2, pad * 0.5), "px ").concat(pad, "px") : "".concat(Math.max(4, pad * 0.75), "px ").concat(pad, "px"),
6372
+ gap: isEquitiesStrip ? Math.max(4, Math.round(pad * 0.75)) : Math.max(6, pad),
6373
+ boxSizing: "border-box"
6235
6374
  },
6236
6375
  children: [
6237
6376
  label && /* @__PURE__ */ jsxs("div", {
6238
6377
  style: {
6239
6378
  background: labelColor,
6240
6379
  color: labelTextColor,
6241
- padding: "0 14px",
6380
+ padding: isEquitiesStrip ? "6px 12px" : "10px 14px",
6242
6381
  display: "flex",
6243
- flexDirection: "column",
6382
+ flexDirection: isEquitiesStrip ? "row" : "column",
6244
6383
  alignItems: "center",
6245
6384
  justifyContent: "center",
6246
6385
  flexShrink: 0,
6247
- minWidth: 72,
6248
6386
  textAlign: "center",
6249
- gap: 1
6387
+ gap: isEquitiesStrip ? 0 : 2,
6388
+ borderRadius: Math.max(2, borderRadius > 0 ? borderRadius : 6),
6389
+ boxShadow: isEquitiesStrip ? "inset 0 1px 0 rgba(255,255,255,0.08)" : "0 2px 8px rgba(0,0,0,0.35)",
6390
+ alignSelf: "stretch",
6391
+ maxWidth: isEquitiesStrip ? "min(200px, 28%)" : void 0
6250
6392
  },
6251
6393
  children: [
6252
6394
  /* @__PURE__ */ jsx("span", {
6253
6395
  style: {
6254
- fontWeight: 800,
6255
- fontSize: "0.82em",
6256
- letterSpacing: "0.05em",
6257
- lineHeight: 1.1,
6258
- textTransform: "uppercase",
6259
- whiteSpace: "nowrap"
6396
+ fontWeight: isEquitiesStrip ? 700 : 800,
6397
+ fontSize: isEquitiesStrip ? "0.82em" : "0.78em",
6398
+ letterSpacing: isEquitiesStrip ? "0.04em" : "0.08em",
6399
+ lineHeight: 1.2,
6400
+ textTransform: isEquitiesStrip ? "none" : "uppercase",
6401
+ whiteSpace: isEquitiesStrip ? "normal" : "nowrap",
6402
+ textAlign: isEquitiesStrip ? "left" : "center"
6260
6403
  },
6261
6404
  children: label
6262
6405
  }),
6263
- labelLine2 && /* @__PURE__ */ jsx("span", {
6406
+ labelLine2 && !isEquitiesStrip && /* @__PURE__ */ jsx("span", {
6264
6407
  style: {
6265
- fontWeight: 500,
6266
- fontSize: "0.62em",
6267
- letterSpacing: "0.03em",
6268
- lineHeight: 1.1,
6269
- opacity: 0.85,
6408
+ fontWeight: 600,
6409
+ fontSize: "0.58em",
6410
+ letterSpacing: "0.06em",
6411
+ lineHeight: 1.15,
6412
+ opacity: 0.92,
6270
6413
  whiteSpace: "nowrap"
6271
6414
  },
6272
6415
  children: labelLine2
@@ -6275,9 +6418,13 @@ function ScrollerOverlay(param) {
6275
6418
  }),
6276
6419
  label && /* @__PURE__ */ jsx("div", {
6277
6420
  style: {
6278
- width: 3,
6421
+ width: isEquitiesStrip ? 1 : 2,
6422
+ alignSelf: "stretch",
6423
+ minHeight: isEquitiesStrip ? 20 : 24,
6279
6424
  background: accentColor,
6280
- flexShrink: 0
6425
+ flexShrink: 0,
6426
+ borderRadius: 1,
6427
+ opacity: 0.85
6281
6428
  }
6282
6429
  }),
6283
6430
  /* @__PURE__ */ jsx("div", {
@@ -6286,7 +6433,8 @@ function ScrollerOverlay(param) {
6286
6433
  overflow: "hidden",
6287
6434
  position: "relative",
6288
6435
  display: "flex",
6289
- alignItems: "center"
6436
+ alignItems: "center",
6437
+ minWidth: 0
6290
6438
  },
6291
6439
  children: isHorizontal ? /* @__PURE__ */ jsx("div", {
6292
6440
  style: {
@@ -6366,21 +6514,22 @@ function ScoreBugOverlay(param) {
6366
6514
  var overlay = param.overlay, size = param.size;
6367
6515
  var cfg = parseConfig(overlay.content);
6368
6516
  if (!cfg) return null;
6369
- var f = Math.max(6, size.w * 0.058);
6517
+ var f = Math.max(6, size.w * 0.052);
6370
6518
  return /* @__PURE__ */ jsxs("div", {
6371
6519
  style: {
6372
6520
  width: "100%",
6373
6521
  height: "100%",
6374
- borderRadius: Math.max(2, size.w * 0.035),
6522
+ borderRadius: Math.max(2, size.w * 0.028),
6375
6523
  display: "flex",
6376
6524
  flexDirection: "column",
6377
6525
  background: cfg.backgroundColor,
6378
6526
  color: cfg.textColor,
6379
- fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6527
+ fontFamily: "'Inter', 'Roboto', 'Segoe UI', system-ui, sans-serif",
6380
6528
  overflow: "hidden",
6381
6529
  pointerEvents: "none",
6382
6530
  userSelect: "none",
6383
- fontSize: "".concat(f, "px")
6531
+ fontSize: "".concat(f, "px"),
6532
+ boxShadow: "0 8px 28px rgba(0,0,0,0.45)"
6384
6533
  },
6385
6534
  children: [
6386
6535
  /* @__PURE__ */ jsxs("div", {
@@ -6388,28 +6537,36 @@ function ScoreBugOverlay(param) {
6388
6537
  flex: 1,
6389
6538
  display: "flex",
6390
6539
  alignItems: "center",
6391
- padding: "0 ".concat(f * 0.8, "px"),
6392
- gap: f * 0.4
6540
+ padding: "".concat(f * 0.42, "px ").concat(f * 0.85, "px"),
6541
+ gap: f * 0.45,
6542
+ minHeight: 0
6393
6543
  },
6394
6544
  children: [
6395
6545
  /* @__PURE__ */ jsxs("div", {
6396
6546
  style: {
6397
6547
  flex: 1,
6398
- textAlign: "center"
6548
+ textAlign: "center",
6549
+ minWidth: 0,
6550
+ padding: "0 ".concat(f * 0.15, "px")
6399
6551
  },
6400
6552
  children: [
6401
6553
  /* @__PURE__ */ jsx("div", {
6402
6554
  style: {
6403
- fontSize: "1em",
6404
- fontWeight: 700
6555
+ fontSize: "1.05em",
6556
+ fontWeight: 800,
6557
+ letterSpacing: "0.02em",
6558
+ overflow: "hidden",
6559
+ textOverflow: "ellipsis",
6560
+ whiteSpace: "nowrap"
6405
6561
  },
6406
6562
  children: cfg.homeTeam
6407
6563
  }),
6408
6564
  /* @__PURE__ */ jsx("div", {
6409
6565
  style: {
6410
- fontSize: "1.8em",
6566
+ fontSize: "1.75em",
6411
6567
  fontWeight: 900,
6412
- lineHeight: 1
6568
+ lineHeight: 1.05,
6569
+ marginTop: f * 0.08
6413
6570
  },
6414
6571
  children: cfg.homeScore
6415
6572
  })
@@ -6417,16 +6574,26 @@ function ScoreBugOverlay(param) {
6417
6574
  }),
6418
6575
  /* @__PURE__ */ jsxs("div", {
6419
6576
  style: {
6420
- fontSize: "0.8em",
6577
+ fontSize: "0.88em",
6421
6578
  textAlign: "center",
6422
- opacity: 0.7,
6423
- padding: "0 ".concat(f * 0.4, "px")
6579
+ fontWeight: 600,
6580
+ opacity: 0.92,
6581
+ color: cfg.textColor,
6582
+ padding: "0 ".concat(f * 0.5, "px"),
6583
+ flexShrink: 0,
6584
+ lineHeight: 1.25,
6585
+ textTransform: "uppercase",
6586
+ letterSpacing: "0.04em"
6424
6587
  },
6425
6588
  children: [
6426
6589
  /* @__PURE__ */ jsx("div", {
6427
6590
  children: cfg.period
6428
6591
  }),
6429
6592
  /* @__PURE__ */ jsx("div", {
6593
+ style: {
6594
+ fontWeight: 700,
6595
+ opacity: 1
6596
+ },
6430
6597
  children: cfg.clock
6431
6598
  })
6432
6599
  ]
@@ -6434,21 +6601,28 @@ function ScoreBugOverlay(param) {
6434
6601
  /* @__PURE__ */ jsxs("div", {
6435
6602
  style: {
6436
6603
  flex: 1,
6437
- textAlign: "center"
6604
+ textAlign: "center",
6605
+ minWidth: 0,
6606
+ padding: "0 ".concat(f * 0.15, "px")
6438
6607
  },
6439
6608
  children: [
6440
6609
  /* @__PURE__ */ jsx("div", {
6441
6610
  style: {
6442
- fontSize: "1em",
6443
- fontWeight: 700
6611
+ fontSize: "1.05em",
6612
+ fontWeight: 800,
6613
+ letterSpacing: "0.02em",
6614
+ overflow: "hidden",
6615
+ textOverflow: "ellipsis",
6616
+ whiteSpace: "nowrap"
6444
6617
  },
6445
6618
  children: cfg.awayTeam
6446
6619
  }),
6447
6620
  /* @__PURE__ */ jsx("div", {
6448
6621
  style: {
6449
- fontSize: "1.8em",
6622
+ fontSize: "1.75em",
6450
6623
  fontWeight: 900,
6451
- lineHeight: 1
6624
+ lineHeight: 1.05,
6625
+ marginTop: f * 0.08
6452
6626
  },
6453
6627
  children: cfg.awayScore
6454
6628
  })
@@ -6458,23 +6632,27 @@ function ScoreBugOverlay(param) {
6458
6632
  }),
6459
6633
  (cfg.sponsorText || cfg.sponsorImageUrl) && /* @__PURE__ */ jsxs("div", {
6460
6634
  style: {
6461
- fontSize: "0.7em",
6635
+ fontSize: "0.72em",
6462
6636
  textAlign: "center",
6463
- opacity: 0.6,
6464
- padding: "".concat(f * 0.2, "px ").concat(f * 0.4, "px"),
6465
- borderTop: "1px solid ".concat(cfg.accentColor, "40"),
6637
+ fontWeight: 600,
6638
+ opacity: 0.88,
6639
+ padding: "".concat(f * 0.34, "px ").concat(f * 0.55, "px"),
6640
+ borderTop: "1px solid ".concat(cfg.accentColor, "55"),
6466
6641
  display: "flex",
6467
6642
  alignItems: "center",
6468
6643
  justifyContent: "center",
6469
- gap: f * 0.4,
6470
- overflow: "hidden"
6644
+ gap: f * 0.45,
6645
+ overflow: "hidden",
6646
+ letterSpacing: "0.04em",
6647
+ textTransform: "uppercase",
6648
+ background: "linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.22) 100%)"
6471
6649
  },
6472
6650
  children: [
6473
6651
  cfg.sponsorImageUrl && /* @__PURE__ */ jsx("img", {
6474
6652
  src: cfg.sponsorImageUrl,
6475
6653
  alt: "sponsor",
6476
6654
  style: {
6477
- height: "".concat(f * 1.4, "px"),
6655
+ height: "".concat(f * 1.35, "px"),
6478
6656
  objectFit: "contain",
6479
6657
  flexShrink: 0
6480
6658
  }
@@ -6496,29 +6674,32 @@ function LowerThirdOverlay(param) {
6496
6674
  var overlay = param.overlay, size = param.size;
6497
6675
  var cfg = parseConfig(overlay.content);
6498
6676
  if (!cfg) return null;
6499
- var f = Math.max(6, size.w * 0.055);
6677
+ var f = Math.max(6, size.w * 0.05);
6678
+ var accentH = Math.max(3, size.h * 0.038);
6500
6679
  return /* @__PURE__ */ jsxs("div", {
6501
6680
  style: {
6502
6681
  width: "100%",
6503
6682
  height: "100%",
6504
- borderRadius: Math.max(2, size.w * 0.02),
6683
+ borderRadius: Math.max(2, size.w * 0.018),
6505
6684
  display: "flex",
6506
6685
  flexDirection: "column",
6507
6686
  justifyContent: "flex-end",
6508
6687
  background: cfg.backgroundColor,
6509
6688
  color: cfg.textColor,
6510
- fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
6689
+ fontFamily: "'Inter', 'Roboto', 'Segoe UI', system-ui, sans-serif",
6511
6690
  overflow: "hidden",
6512
6691
  pointerEvents: "none",
6513
6692
  userSelect: "none",
6514
- fontSize: "".concat(f, "px")
6693
+ fontSize: "".concat(f, "px"),
6694
+ boxShadow: "0 10px 32px rgba(0,0,0,0.4)"
6515
6695
  },
6516
6696
  children: [
6517
6697
  /* @__PURE__ */ jsx("div", {
6518
6698
  style: {
6519
6699
  width: "100%",
6520
- height: Math.max(2, size.h * 0.06),
6521
- backgroundColor: cfg.accentColor
6700
+ height: accentH,
6701
+ backgroundColor: cfg.accentColor,
6702
+ flexShrink: 0
6522
6703
  }
6523
6704
  }),
6524
6705
  /* @__PURE__ */ jsxs("div", {
@@ -6527,23 +6708,28 @@ function LowerThirdOverlay(param) {
6527
6708
  display: "flex",
6528
6709
  flexDirection: "column",
6529
6710
  justifyContent: "center",
6530
- padding: "".concat(f * 0.5, "px ").concat(f * 1.2, "px")
6711
+ padding: "".concat(f * 0.62, "px ").concat(f * 1.05, "px"),
6712
+ minHeight: 0,
6713
+ gap: f * 0.18
6531
6714
  },
6532
6715
  children: [
6533
6716
  /* @__PURE__ */ jsx("div", {
6534
6717
  style: {
6535
- fontSize: "1.4em",
6536
- fontWeight: 700,
6537
- lineHeight: 1.2,
6538
- textShadow: "0 1px 4px rgba(0,0,0,0.5)"
6718
+ fontSize: "1.28em",
6719
+ fontWeight: 800,
6720
+ lineHeight: 1.22,
6721
+ letterSpacing: "0.01em",
6722
+ textShadow: "0 2px 6px rgba(0,0,0,0.55)"
6539
6723
  },
6540
6724
  children: cfg.headline
6541
6725
  }),
6542
6726
  /* @__PURE__ */ jsx("div", {
6543
6727
  style: {
6544
- fontSize: "1em",
6545
- opacity: 0.7,
6546
- marginTop: f * 0.2
6728
+ fontSize: "0.94em",
6729
+ fontWeight: 500,
6730
+ opacity: 0.92,
6731
+ lineHeight: 1.35,
6732
+ color: cfg.textColor
6547
6733
  },
6548
6734
  children: cfg.subtitle
6549
6735
  })
@@ -6551,20 +6737,24 @@ function LowerThirdOverlay(param) {
6551
6737
  }),
6552
6738
  (cfg.sponsorText || cfg.sponsorImageUrl) && /* @__PURE__ */ jsxs("div", {
6553
6739
  style: {
6554
- fontSize: "0.7em",
6555
- opacity: 0.5,
6556
- padding: "0 ".concat(f * 1.2, "px ").concat(f * 0.4, "px"),
6740
+ fontSize: "0.68em",
6741
+ fontWeight: 600,
6742
+ opacity: 0.72,
6743
+ padding: "".concat(f * 0.28, "px ").concat(f * 1.05, "px ").concat(f * 0.48, "px"),
6557
6744
  display: "flex",
6558
6745
  alignItems: "center",
6559
6746
  gap: f * 0.4,
6560
- overflow: "hidden"
6747
+ overflow: "hidden",
6748
+ letterSpacing: "0.06em",
6749
+ textTransform: "uppercase",
6750
+ borderTop: "1px solid rgba(255,255,255,0.08)"
6561
6751
  },
6562
6752
  children: [
6563
6753
  cfg.sponsorImageUrl && /* @__PURE__ */ jsx("img", {
6564
6754
  src: cfg.sponsorImageUrl,
6565
6755
  alt: "sponsor",
6566
6756
  style: {
6567
- height: "".concat(f * 1.4, "px"),
6757
+ height: "".concat(f * 1.25, "px"),
6568
6758
  objectFit: "contain",
6569
6759
  flexShrink: 0
6570
6760
  }
@@ -7478,8 +7668,13 @@ var OverlayRenderer = function OverlayRenderer(param) {
7478
7668
  },
7479
7669
  children: _to_consumable_array(fadeMap.values()).map(function(param) {
7480
7670
  var overlay = param.overlay, visible = param.visible;
7481
- var scaleX = (coordinateSpace === null || coordinateSpace === void 0 ? void 0 : coordinateSpace.width) ? dims.displayWidth / coordinateSpace.width : dims.scaleX;
7482
- var scaleY = (coordinateSpace === null || coordinateSpace === void 0 ? void 0 : coordinateSpace.height) ? dims.displayHeight / coordinateSpace.height : dims.scaleY;
7671
+ var uniform = coordinateSpace && coordinateSpace.width > 0 && coordinateSpace.height > 0;
7672
+ var auth = uniform ? {
7673
+ width: coordinateSpace.width,
7674
+ height: coordinateSpace.height
7675
+ } : overlayAuthoringDimensions(overlay, dims.nativeWidth, dims.nativeHeight);
7676
+ var scaleX = dims.displayWidth / auth.width;
7677
+ var scaleY = dims.displayHeight / auth.height;
7483
7678
  var left = overlay.x * scaleX;
7484
7679
  var top = overlay.y * scaleY;
7485
7680
  var width = overlay.width * scaleX;
@@ -7702,23 +7897,28 @@ var StormcloudVideoPlayerComponent = React2.memo(function(props) {
7702
7897
  }, [
7703
7898
  swirlOverlayApiBaseUrl
7704
7899
  ]);
7900
+ var _React2_useState17 = _sliced_to_array(React2.useState(null), 2), overlayCoordSpace = _React2_useState17[0], setOverlayCoordSpace = _React2_useState17[1];
7705
7901
  var displayOverlays = React2.useMemo(function() {
7706
7902
  if (!swirlProjectId || !swirlShowcaseDemo) return overlays;
7707
7903
  if (overlays.some(scrollerLooksLikeMarketsStock)) return overlays;
7708
- var hasOtherScroller = overlays.some(function(o) {
7709
- return o.type === "scroller";
7710
- });
7904
+ if (overlays.some(function(o) {
7905
+ return o.visible && o.type === "scroller";
7906
+ })) return overlays;
7907
+ var cw = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.width;
7908
+ var ch = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.height;
7909
+ var tickerOpts = cw && cw > 0 && ch && ch > 0 ? {
7910
+ coordinateWidth: cw,
7911
+ coordinateHeight: ch
7912
+ } : {};
7711
7913
  return _to_consumable_array(overlays).concat([
7712
- createDemoStockTickerOverlay(swirlProjectId, {
7713
- stackAboveNews: hasOtherScroller
7714
- })
7914
+ createDemoStockTickerOverlay(swirlProjectId, tickerOpts)
7715
7915
  ]);
7716
7916
  }, [
7717
7917
  overlays,
7718
7918
  swirlProjectId,
7719
- swirlShowcaseDemo
7919
+ swirlShowcaseDemo,
7920
+ overlayCoordSpace
7720
7921
  ]);
7721
- var _React2_useState17 = _sliced_to_array(React2.useState(null), 2), overlayCoordSpace = _React2_useState17[0], setOverlayCoordSpace = _React2_useState17[1];
7722
7922
  var _React2_useState18 = _sliced_to_array(React2.useState(typeof window !== "undefined" ? window.innerWidth : 1920), 2), viewportWidth = _React2_useState18[0], setViewportWidth = _React2_useState18[1];
7723
7923
  var _React2_useState19 = _sliced_to_array(React2.useState(typeof window !== "undefined" ? window.innerHeight > window.innerWidth : false), 2), isPortrait = _React2_useState19[0], setIsPortrait = _React2_useState19[1];
7724
7924
  var _React2_useState20 = _sliced_to_array(React2.useState(DEFAULT_PLAYER_ASPECT_RATIO), 2), playerAspectRatio = _React2_useState20[0], setPlayerAspectRatio = _React2_useState20[1];
@@ -8014,8 +8214,7 @@ var StormcloudVideoPlayerComponent = React2.memo(function(props) {
8014
8214
  var _playerRef_current;
8015
8215
  if (!swirlProjectId) return;
8016
8216
  var tryResolve = function tryResolve() {
8017
- var _player_getMaxHlsResolution, _player_getMinHlsResolution;
8018
- var player = playerRef.current;
8217
+ var _ref, _ref1;
8019
8218
  var fixed = swirlOverlayCoordinateSpace;
8020
8219
  if (fixed && fixed.width > 0 && fixed.height > 0) {
8021
8220
  setOverlayCoordSpace({
@@ -8024,26 +8223,29 @@ var StormcloudVideoPlayerComponent = React2.memo(function(props) {
8024
8223
  });
8025
8224
  return true;
8026
8225
  }
8226
+ var player = playerRef.current;
8027
8227
  if (!player) return false;
8028
8228
  var video2 = player.videoElement;
8029
- if (video2 && video2.videoWidth > 0 && video2.videoHeight > 0) {
8030
- setOverlayCoordSpace({
8031
- width: video2.videoWidth,
8032
- height: video2.videoHeight
8033
- });
8034
- return true;
8035
- }
8036
- var maxRes = (_player_getMaxHlsResolution = player.getMaxHlsResolution) === null || _player_getMaxHlsResolution === void 0 ? void 0 : _player_getMaxHlsResolution.call(player);
8037
- if (maxRes) {
8038
- setOverlayCoordSpace(maxRes);
8039
- return true;
8040
- }
8041
- var minRes = (_player_getMinHlsResolution = player.getMinHlsResolution) === null || _player_getMinHlsResolution === void 0 ? void 0 : _player_getMinHlsResolution.call(player);
8042
- if (minRes) {
8043
- setOverlayCoordSpace(minRes);
8044
- return true;
8229
+ var vw = (_ref = video2 === null || video2 === void 0 ? void 0 : video2.videoWidth) !== null && _ref !== void 0 ? _ref : 0;
8230
+ var vh = (_ref1 = video2 === null || video2 === void 0 ? void 0 : video2.videoHeight) !== null && _ref1 !== void 0 ? _ref1 : 0;
8231
+ if (!vw || !vh) {
8232
+ var _player_getMaxHlsResolution;
8233
+ var maxRes = (_player_getMaxHlsResolution = player.getMaxHlsResolution) === null || _player_getMaxHlsResolution === void 0 ? void 0 : _player_getMaxHlsResolution.call(player);
8234
+ if (maxRes && maxRes.width > 0 && maxRes.height > 0) {
8235
+ vw = maxRes.width;
8236
+ vh = maxRes.height;
8237
+ } else {
8238
+ var _player_getMinHlsResolution;
8239
+ var minRes = (_player_getMinHlsResolution = player.getMinHlsResolution) === null || _player_getMinHlsResolution === void 0 ? void 0 : _player_getMinHlsResolution.call(player);
8240
+ if (minRes && minRes.width > 0 && minRes.height > 0) {
8241
+ vw = minRes.width;
8242
+ vh = minRes.height;
8243
+ }
8244
+ }
8045
8245
  }
8046
- return false;
8246
+ if (!vw || !vh) return false;
8247
+ setOverlayCoordSpace(inferSwirlOverlayCoordinateSpace(overlays, vw, vh));
8248
+ return true;
8047
8249
  };
8048
8250
  var attempts = 0;
8049
8251
  var maxAttempts = 40;
@@ -8069,7 +8271,8 @@ var StormcloudVideoPlayerComponent = React2.memo(function(props) {
8069
8271
  }, [
8070
8272
  swirlProjectId,
8071
8273
  criticalPropsKey,
8072
- swirlOverlayCoordinateSpace
8274
+ swirlOverlayCoordinateSpace,
8275
+ overlays
8073
8276
  ]);
8074
8277
  useEffect2(function() {
8075
8278
  if (!playerRef.current) return;
@@ -8500,7 +8703,7 @@ var StormcloudVideoPlayerComponent = React2.memo(function(props) {
8500
8703
  overlays: displayOverlays,
8501
8704
  currentTime: currentTime,
8502
8705
  videoRef: videoRef,
8503
- coordinateSpace: overlayCoordSpace,
8706
+ coordinateSpace: swirlOverlayCoordinateSpace && swirlOverlayCoordinateSpace.width > 0 && swirlOverlayCoordinateSpace.height > 0 ? swirlOverlayCoordinateSpace : null,
8504
8707
  showcaseMode: !!swirlShowcaseDemo
8505
8708
  }),
8506
8709
  (isLoading || isBuffering) && !hideLoadingIndicator && /* @__PURE__ */ jsxs2("div", {
@@ -11098,5 +11301,5 @@ var createStormcloudPlayer = function createStormcloudPlayer(playerList, fallbac
11098
11301
  };
11099
11302
  var StormcloudPlayer = createStormcloudPlayer(players_default, players_default[players_default.length - 1]);
11100
11303
  var StormcloudPlayer_default = StormcloudPlayer;
11101
- export { IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, OVERLAY_API_BASE, SUPPORTS_DASH, SUPPORTS_HLS, StormcloudPlayer_default as StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, canPlay, createAdStormPlayer, createDemoStockTickerOverlay, createStormcloudPlayer, StormcloudVideoPlayerComponent as default, detectBrowser, fetchProjectOverlays, getBrowserConfigOverrides, getBrowserID, getClientInfo, initializePolyfills, isMediaStream, isOverlayActive, lazy, logBrowserInfo, merge, normalizeSwirlOverlay, omit, parseQuery, players_default as players, randomString, resolveImageUrl, scrollerLooksLikeMarketsStock, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode, timeStringToSeconds };
11304
+ export { IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, OVERLAY_API_BASE, SUPPORTS_DASH, SUPPORTS_HLS, SWIRL_HD_AUTHORING_HEIGHT, SWIRL_HD_AUTHORING_WIDTH, StormcloudPlayer_default as StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, canPlay, createAdStormPlayer, createDemoStockTickerOverlay, createStormcloudPlayer, StormcloudVideoPlayerComponent as default, detectBrowser, fetchProjectOverlays, getBrowserConfigOverrides, getBrowserID, getClientInfo, inferSwirlOverlayCoordinateSpace, initializePolyfills, isMediaStream, isOverlayActive, lazy, logBrowserInfo, merge, normalizeSwirlOverlay, omit, overlayAuthoringDimensions, parseQuery, players_default as players, randomString, resolveImageUrl, scrollerLooksLikeMarketsStock, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode, swirlProjectHasNabDemoMixedWithOther, timeStringToSeconds };
11102
11305
  //# sourceMappingURL=index.js.map