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/dist/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +338 -115
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +11 -2
- package/lib/index.d.ts +11 -2
- package/lib/index.js +319 -116
- package/lib/index.js.map +1 -1
- package/lib/ui/OverlayRenderer.cjs +163 -68
- package/lib/ui/OverlayRenderer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +318 -115
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/utils/overlays.cjs +171 -18
- package/lib/utils/overlays.cjs.map +1 -1
- package/lib/utils/overlays.d.cts +11 -2
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -449,6 +449,12 @@ __export(index_exports, {
|
|
|
449
449
|
SUPPORTS_HLS: function SUPPORTS_HLS1() {
|
|
450
450
|
return SUPPORTS_HLS;
|
|
451
451
|
},
|
|
452
|
+
SWIRL_HD_AUTHORING_HEIGHT: function SWIRL_HD_AUTHORING_HEIGHT1() {
|
|
453
|
+
return SWIRL_HD_AUTHORING_HEIGHT;
|
|
454
|
+
},
|
|
455
|
+
SWIRL_HD_AUTHORING_WIDTH: function SWIRL_HD_AUTHORING_WIDTH1() {
|
|
456
|
+
return SWIRL_HD_AUTHORING_WIDTH;
|
|
457
|
+
},
|
|
452
458
|
StormcloudPlayer: function StormcloudPlayer() {
|
|
453
459
|
return StormcloudPlayer_default;
|
|
454
460
|
},
|
|
@@ -488,6 +494,9 @@ __export(index_exports, {
|
|
|
488
494
|
getClientInfo: function getClientInfo1() {
|
|
489
495
|
return getClientInfo;
|
|
490
496
|
},
|
|
497
|
+
inferSwirlOverlayCoordinateSpace: function inferSwirlOverlayCoordinateSpace1() {
|
|
498
|
+
return inferSwirlOverlayCoordinateSpace;
|
|
499
|
+
},
|
|
491
500
|
initializePolyfills: function initializePolyfills1() {
|
|
492
501
|
return initializePolyfills;
|
|
493
502
|
},
|
|
@@ -512,6 +521,9 @@ __export(index_exports, {
|
|
|
512
521
|
omit: function omit1() {
|
|
513
522
|
return omit;
|
|
514
523
|
},
|
|
524
|
+
overlayAuthoringDimensions: function overlayAuthoringDimensions1() {
|
|
525
|
+
return overlayAuthoringDimensions;
|
|
526
|
+
},
|
|
515
527
|
parseQuery: function parseQuery1() {
|
|
516
528
|
return parseQuery;
|
|
517
529
|
},
|
|
@@ -542,6 +554,9 @@ __export(index_exports, {
|
|
|
542
554
|
supportsWebKitPresentationMode: function supportsWebKitPresentationMode1() {
|
|
543
555
|
return supportsWebKitPresentationMode;
|
|
544
556
|
},
|
|
557
|
+
swirlProjectHasNabDemoMixedWithOther: function swirlProjectHasNabDemoMixedWithOther1() {
|
|
558
|
+
return swirlProjectHasNabDemoMixedWithOther;
|
|
559
|
+
},
|
|
545
560
|
timeStringToSeconds: function timeStringToSeconds1() {
|
|
546
561
|
return timeStringToSeconds;
|
|
547
562
|
}
|
|
@@ -5879,6 +5894,126 @@ function isOverlayActive(overlay, currentTime) {
|
|
|
5879
5894
|
if (durationSec <= 0) return false;
|
|
5880
5895
|
return currentTime >= startSec && currentTime < startSec + durationSec;
|
|
5881
5896
|
}
|
|
5897
|
+
var SWIRL_HD_AUTHORING_WIDTH = 1920;
|
|
5898
|
+
var SWIRL_HD_AUTHORING_HEIGHT = 1080;
|
|
5899
|
+
var NAB_DEMO_NAME_PREFIX = "NAB Demo \u2014 ";
|
|
5900
|
+
function overlayAuthoringDimensions(overlay, decodeWidth, decodeHeight) {
|
|
5901
|
+
if (!decodeWidth || !decodeHeight) {
|
|
5902
|
+
return {
|
|
5903
|
+
width: decodeWidth || SWIRL_HD_AUTHORING_WIDTH,
|
|
5904
|
+
height: decodeHeight || SWIRL_HD_AUTHORING_HEIGHT
|
|
5905
|
+
};
|
|
5906
|
+
}
|
|
5907
|
+
if (!overlay.visible) {
|
|
5908
|
+
return {
|
|
5909
|
+
width: decodeWidth,
|
|
5910
|
+
height: decodeHeight
|
|
5911
|
+
};
|
|
5912
|
+
}
|
|
5913
|
+
var extR = overlay.x + overlay.width;
|
|
5914
|
+
var extB = overlay.y + overlay.height;
|
|
5915
|
+
var EPS = 2;
|
|
5916
|
+
var exceedsDecode = extR > decodeWidth + EPS || extB > decodeHeight + EPS;
|
|
5917
|
+
var isNabDemo = overlay.name.startsWith(NAB_DEMO_NAME_PREFIX);
|
|
5918
|
+
var isSyntheticMarketsTicker = overlay.id === -9001 || overlay.name === "Demo stock ticker";
|
|
5919
|
+
if (exceedsDecode && (isNabDemo || isSyntheticMarketsTicker)) {
|
|
5920
|
+
return {
|
|
5921
|
+
width: SWIRL_HD_AUTHORING_WIDTH,
|
|
5922
|
+
height: SWIRL_HD_AUTHORING_HEIGHT
|
|
5923
|
+
};
|
|
5924
|
+
}
|
|
5925
|
+
return {
|
|
5926
|
+
width: decodeWidth,
|
|
5927
|
+
height: decodeHeight
|
|
5928
|
+
};
|
|
5929
|
+
}
|
|
5930
|
+
function overlayExtents(overlays) {
|
|
5931
|
+
var maxR = 0;
|
|
5932
|
+
var maxB = 0;
|
|
5933
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
5934
|
+
try {
|
|
5935
|
+
for(var _iterator = overlays[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
5936
|
+
var o = _step.value;
|
|
5937
|
+
if (!o.visible) continue;
|
|
5938
|
+
maxR = Math.max(maxR, o.x + o.width);
|
|
5939
|
+
maxB = Math.max(maxB, o.y + o.height);
|
|
5940
|
+
}
|
|
5941
|
+
} catch (err) {
|
|
5942
|
+
_didIteratorError = true;
|
|
5943
|
+
_iteratorError = err;
|
|
5944
|
+
} finally{
|
|
5945
|
+
try {
|
|
5946
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
5947
|
+
_iterator.return();
|
|
5948
|
+
}
|
|
5949
|
+
} finally{
|
|
5950
|
+
if (_didIteratorError) {
|
|
5951
|
+
throw _iteratorError;
|
|
5952
|
+
}
|
|
5953
|
+
}
|
|
5954
|
+
}
|
|
5955
|
+
return {
|
|
5956
|
+
maxR: maxR,
|
|
5957
|
+
maxB: maxB
|
|
5958
|
+
};
|
|
5959
|
+
}
|
|
5960
|
+
function swirlProjectHasNabDemoMixedWithOther(overlays) {
|
|
5961
|
+
var hasNab = false;
|
|
5962
|
+
var hasOther = false;
|
|
5963
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
5964
|
+
try {
|
|
5965
|
+
for(var _iterator = overlays[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
5966
|
+
var o = _step.value;
|
|
5967
|
+
if (!o.visible) continue;
|
|
5968
|
+
if (o.name.startsWith(NAB_DEMO_NAME_PREFIX)) hasNab = true;
|
|
5969
|
+
else hasOther = true;
|
|
5970
|
+
}
|
|
5971
|
+
} catch (err) {
|
|
5972
|
+
_didIteratorError = true;
|
|
5973
|
+
_iteratorError = err;
|
|
5974
|
+
} finally{
|
|
5975
|
+
try {
|
|
5976
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
5977
|
+
_iterator.return();
|
|
5978
|
+
}
|
|
5979
|
+
} finally{
|
|
5980
|
+
if (_didIteratorError) {
|
|
5981
|
+
throw _iteratorError;
|
|
5982
|
+
}
|
|
5983
|
+
}
|
|
5984
|
+
}
|
|
5985
|
+
return hasNab && hasOther;
|
|
5986
|
+
}
|
|
5987
|
+
function inferSwirlOverlayCoordinateSpace(overlays, videoWidth, videoHeight) {
|
|
5988
|
+
if (!videoWidth || !videoHeight) {
|
|
5989
|
+
return {
|
|
5990
|
+
width: videoWidth || SWIRL_HD_AUTHORING_WIDTH,
|
|
5991
|
+
height: videoHeight || SWIRL_HD_AUTHORING_HEIGHT
|
|
5992
|
+
};
|
|
5993
|
+
}
|
|
5994
|
+
if (!overlays.length) {
|
|
5995
|
+
return {
|
|
5996
|
+
width: videoWidth,
|
|
5997
|
+
height: videoHeight
|
|
5998
|
+
};
|
|
5999
|
+
}
|
|
6000
|
+
var _overlayExtents = overlayExtents(overlays), maxR = _overlayExtents.maxR, maxB = _overlayExtents.maxB;
|
|
6001
|
+
var EPS = 1;
|
|
6002
|
+
var exceedsDecode = maxR > videoWidth + EPS || maxB > videoHeight + EPS;
|
|
6003
|
+
var fitsHdCanvas = maxR <= SWIRL_HD_AUTHORING_WIDTH + EPS && maxB <= SWIRL_HD_AUTHORING_HEIGHT + EPS;
|
|
6004
|
+
var mixed = swirlProjectHasNabDemoMixedWithOther(overlays);
|
|
6005
|
+
var decodeLargerThanHd = videoWidth > SWIRL_HD_AUTHORING_WIDTH + EPS || videoHeight > SWIRL_HD_AUTHORING_HEIGHT + EPS;
|
|
6006
|
+
if (fitsHdCanvas && (decodeLargerThanHd || exceedsDecode && !mixed)) {
|
|
6007
|
+
return {
|
|
6008
|
+
width: SWIRL_HD_AUTHORING_WIDTH,
|
|
6009
|
+
height: SWIRL_HD_AUTHORING_HEIGHT
|
|
6010
|
+
};
|
|
6011
|
+
}
|
|
6012
|
+
return {
|
|
6013
|
+
width: videoWidth,
|
|
6014
|
+
height: videoHeight
|
|
6015
|
+
};
|
|
6016
|
+
}
|
|
5882
6017
|
function scrollerLooksLikeMarketsStock(o) {
|
|
5883
6018
|
var _ref, _ref1, _ref2, _ref3;
|
|
5884
6019
|
if (o.type !== "scroller") return false;
|
|
@@ -5887,39 +6022,52 @@ function scrollerLooksLikeMarketsStock(o) {
|
|
|
5887
6022
|
return /\b(MARKETS?|NYSE|NASDAQ|DJIA|\bS&P\b|STOCK|AAPL|TSLA|NVDA|EQUITIES)\b/i.test(blob);
|
|
5888
6023
|
}
|
|
5889
6024
|
function createDemoStockTickerOverlay(projectId, opts) {
|
|
5890
|
-
var
|
|
6025
|
+
var cw = (opts === null || opts === void 0 ? void 0 : opts.coordinateWidth) && opts.coordinateWidth > 0 ? opts.coordinateWidth : SWIRL_HD_AUTHORING_WIDTH;
|
|
6026
|
+
var ch = (opts === null || opts === void 0 ? void 0 : opts.coordinateHeight) && opts.coordinateHeight > 0 ? opts.coordinateHeight : SWIRL_HD_AUTHORING_HEIGHT;
|
|
6027
|
+
var sx = cw / SWIRL_HD_AUTHORING_WIDTH;
|
|
6028
|
+
var sy = ch / SWIRL_HD_AUTHORING_HEIGHT;
|
|
6029
|
+
var x = 36 * sx;
|
|
6030
|
+
var y = 1002 * sy;
|
|
6031
|
+
var width = 1848 * sx;
|
|
6032
|
+
var height = 66 * sy;
|
|
6033
|
+
var fontSize = Math.max(8, Math.round(13 * sy));
|
|
6034
|
+
var scrollSpeed = Math.max(8, Math.round(36 * sx));
|
|
6035
|
+
var borderRadius = Math.max(1, Math.round(4 * sy));
|
|
5891
6036
|
return {
|
|
5892
6037
|
id: -9001,
|
|
5893
6038
|
project_id: projectId,
|
|
5894
6039
|
name: "Demo stock ticker",
|
|
5895
6040
|
type: "scroller",
|
|
5896
6041
|
visible: true,
|
|
5897
|
-
x:
|
|
5898
|
-
y:
|
|
5899
|
-
width:
|
|
5900
|
-
height:
|
|
6042
|
+
x: x,
|
|
6043
|
+
y: y,
|
|
6044
|
+
width: width,
|
|
6045
|
+
height: height,
|
|
5901
6046
|
opacity: 100,
|
|
5902
6047
|
start_time: "00:00:00.000",
|
|
5903
6048
|
duration: "24:00:00.000",
|
|
5904
|
-
z_index:
|
|
6049
|
+
z_index: 120,
|
|
5905
6050
|
scroller_config: {
|
|
6051
|
+
preset: "equities_strip",
|
|
5906
6052
|
use_custom_text: true,
|
|
5907
|
-
custom_text: "AAPL +
|
|
6053
|
+
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%",
|
|
5908
6054
|
direction: "left",
|
|
5909
|
-
scroll_speed:
|
|
5910
|
-
font_size:
|
|
5911
|
-
font_weight: "
|
|
5912
|
-
text_color: "#
|
|
5913
|
-
background_color: "#
|
|
6055
|
+
scroll_speed: scrollSpeed,
|
|
6056
|
+
font_size: fontSize,
|
|
6057
|
+
font_weight: "600",
|
|
6058
|
+
text_color: "#e2e8f0",
|
|
6059
|
+
background_color: "#0a0f18",
|
|
5914
6060
|
background_opacity: 92,
|
|
5915
|
-
border_radius:
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
6061
|
+
border_radius: borderRadius,
|
|
6062
|
+
padding: Math.max(3, Math.round(6 * sy)),
|
|
6063
|
+
label: "U.S. equities",
|
|
6064
|
+
label_line2: "",
|
|
6065
|
+
label_color: "#1e3a5f",
|
|
6066
|
+
label_text_color: "#f8fafc",
|
|
5920
6067
|
accent_color: "#38bdf8",
|
|
5921
6068
|
show_accent_line: true,
|
|
5922
|
-
separator_char: "\u2022"
|
|
6069
|
+
separator_char: "\u2022",
|
|
6070
|
+
item_spacing: Math.max(28, Math.round(48 * sx))
|
|
5923
6071
|
}
|
|
5924
6072
|
};
|
|
5925
6073
|
}
|
|
@@ -6362,12 +6510,14 @@ function ScrollerOverlay(param) {
|
|
|
6362
6510
|
var bgOpacity = (cfg === null || cfg === void 0 ? void 0 : cfg.background_opacity) !== void 0 ? cfg.background_opacity / 100 : 0.95;
|
|
6363
6511
|
var borderRadius = (_ref6 = cfg === null || cfg === void 0 ? void 0 : cfg.border_radius) !== null && _ref6 !== void 0 ? _ref6 : 0;
|
|
6364
6512
|
var itemSpacing = (_ref7 = cfg === null || cfg === void 0 ? void 0 : cfg.item_spacing) !== null && _ref7 !== void 0 ? _ref7 : 60;
|
|
6513
|
+
var pad = (cfg === null || cfg === void 0 ? void 0 : cfg.padding) !== void 0 && cfg.padding >= 0 ? cfg.padding : 8;
|
|
6365
6514
|
var label = (_ref8 = cfg === null || cfg === void 0 ? void 0 : cfg.label) !== null && _ref8 !== void 0 ? _ref8 : "NEWS";
|
|
6366
6515
|
var labelLine2 = (_ref9 = cfg === null || cfg === void 0 ? void 0 : cfg.label_line2) !== null && _ref9 !== void 0 ? _ref9 : "";
|
|
6367
6516
|
var labelColor = (_ref10 = cfg === null || cfg === void 0 ? void 0 : cfg.label_color) !== null && _ref10 !== void 0 ? _ref10 : "#f97316";
|
|
6368
6517
|
var labelTextColor = (_ref11 = cfg === null || cfg === void 0 ? void 0 : cfg.label_text_color) !== null && _ref11 !== void 0 ? _ref11 : "#ffffff";
|
|
6369
6518
|
var accentColor = (_ref12 = cfg === null || cfg === void 0 ? void 0 : cfg.accent_color) !== null && _ref12 !== void 0 ? _ref12 : labelColor;
|
|
6370
6519
|
var showAccentLine = (cfg === null || cfg === void 0 ? void 0 : cfg.show_accent_line) !== false;
|
|
6520
|
+
var isEquitiesStrip = (cfg === null || cfg === void 0 ? void 0 : cfg.preset) === "equities_strip";
|
|
6371
6521
|
var isHorizontal = direction === "left" || direction === "right";
|
|
6372
6522
|
var isReverse = direction === "right" || direction === "down";
|
|
6373
6523
|
var fullText = segments.join(" ".concat(sep, " "));
|
|
@@ -6398,7 +6548,7 @@ function ScrollerOverlay(param) {
|
|
|
6398
6548
|
children: [
|
|
6399
6549
|
showAccentLine && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6400
6550
|
style: {
|
|
6401
|
-
height: 3,
|
|
6551
|
+
height: isEquitiesStrip ? 2 : 3,
|
|
6402
6552
|
background: accentColor,
|
|
6403
6553
|
flexShrink: 0,
|
|
6404
6554
|
width: "100%"
|
|
@@ -6409,42 +6559,50 @@ function ScrollerOverlay(param) {
|
|
|
6409
6559
|
display: "flex",
|
|
6410
6560
|
flex: 1,
|
|
6411
6561
|
overflow: "hidden",
|
|
6412
|
-
minHeight: 0
|
|
6562
|
+
minHeight: 0,
|
|
6563
|
+
alignItems: "center",
|
|
6564
|
+
padding: isEquitiesStrip ? "".concat(Math.max(2, pad * 0.5), "px ").concat(pad, "px") : "".concat(Math.max(4, pad * 0.75), "px ").concat(pad, "px"),
|
|
6565
|
+
gap: isEquitiesStrip ? Math.max(4, Math.round(pad * 0.75)) : Math.max(6, pad),
|
|
6566
|
+
boxSizing: "border-box"
|
|
6413
6567
|
},
|
|
6414
6568
|
children: [
|
|
6415
6569
|
label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6416
6570
|
style: {
|
|
6417
6571
|
background: labelColor,
|
|
6418
6572
|
color: labelTextColor,
|
|
6419
|
-
padding: "
|
|
6573
|
+
padding: isEquitiesStrip ? "6px 12px" : "10px 14px",
|
|
6420
6574
|
display: "flex",
|
|
6421
|
-
flexDirection: "column",
|
|
6575
|
+
flexDirection: isEquitiesStrip ? "row" : "column",
|
|
6422
6576
|
alignItems: "center",
|
|
6423
6577
|
justifyContent: "center",
|
|
6424
6578
|
flexShrink: 0,
|
|
6425
|
-
minWidth: 72,
|
|
6426
6579
|
textAlign: "center",
|
|
6427
|
-
gap:
|
|
6580
|
+
gap: isEquitiesStrip ? 0 : 2,
|
|
6581
|
+
borderRadius: Math.max(2, borderRadius > 0 ? borderRadius : 6),
|
|
6582
|
+
boxShadow: isEquitiesStrip ? "inset 0 1px 0 rgba(255,255,255,0.08)" : "0 2px 8px rgba(0,0,0,0.35)",
|
|
6583
|
+
alignSelf: "stretch",
|
|
6584
|
+
maxWidth: isEquitiesStrip ? "min(200px, 28%)" : void 0
|
|
6428
6585
|
},
|
|
6429
6586
|
children: [
|
|
6430
6587
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
6431
6588
|
style: {
|
|
6432
|
-
fontWeight: 800,
|
|
6433
|
-
fontSize: "0.82em",
|
|
6434
|
-
letterSpacing: "0.
|
|
6435
|
-
lineHeight: 1.
|
|
6436
|
-
textTransform: "uppercase",
|
|
6437
|
-
whiteSpace: "nowrap"
|
|
6589
|
+
fontWeight: isEquitiesStrip ? 700 : 800,
|
|
6590
|
+
fontSize: isEquitiesStrip ? "0.82em" : "0.78em",
|
|
6591
|
+
letterSpacing: isEquitiesStrip ? "0.04em" : "0.08em",
|
|
6592
|
+
lineHeight: 1.2,
|
|
6593
|
+
textTransform: isEquitiesStrip ? "none" : "uppercase",
|
|
6594
|
+
whiteSpace: isEquitiesStrip ? "normal" : "nowrap",
|
|
6595
|
+
textAlign: isEquitiesStrip ? "left" : "center"
|
|
6438
6596
|
},
|
|
6439
6597
|
children: label
|
|
6440
6598
|
}),
|
|
6441
|
-
labelLine2 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
6599
|
+
labelLine2 && !isEquitiesStrip && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
6442
6600
|
style: {
|
|
6443
|
-
fontWeight:
|
|
6444
|
-
fontSize: "0.
|
|
6445
|
-
letterSpacing: "0.
|
|
6446
|
-
lineHeight: 1.
|
|
6447
|
-
opacity: 0.
|
|
6601
|
+
fontWeight: 600,
|
|
6602
|
+
fontSize: "0.58em",
|
|
6603
|
+
letterSpacing: "0.06em",
|
|
6604
|
+
lineHeight: 1.15,
|
|
6605
|
+
opacity: 0.92,
|
|
6448
6606
|
whiteSpace: "nowrap"
|
|
6449
6607
|
},
|
|
6450
6608
|
children: labelLine2
|
|
@@ -6453,9 +6611,13 @@ function ScrollerOverlay(param) {
|
|
|
6453
6611
|
}),
|
|
6454
6612
|
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6455
6613
|
style: {
|
|
6456
|
-
width:
|
|
6614
|
+
width: isEquitiesStrip ? 1 : 2,
|
|
6615
|
+
alignSelf: "stretch",
|
|
6616
|
+
minHeight: isEquitiesStrip ? 20 : 24,
|
|
6457
6617
|
background: accentColor,
|
|
6458
|
-
flexShrink: 0
|
|
6618
|
+
flexShrink: 0,
|
|
6619
|
+
borderRadius: 1,
|
|
6620
|
+
opacity: 0.85
|
|
6459
6621
|
}
|
|
6460
6622
|
}),
|
|
6461
6623
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
@@ -6464,7 +6626,8 @@ function ScrollerOverlay(param) {
|
|
|
6464
6626
|
overflow: "hidden",
|
|
6465
6627
|
position: "relative",
|
|
6466
6628
|
display: "flex",
|
|
6467
|
-
alignItems: "center"
|
|
6629
|
+
alignItems: "center",
|
|
6630
|
+
minWidth: 0
|
|
6468
6631
|
},
|
|
6469
6632
|
children: isHorizontal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6470
6633
|
style: {
|
|
@@ -6544,21 +6707,22 @@ function ScoreBugOverlay(param) {
|
|
|
6544
6707
|
var overlay = param.overlay, size = param.size;
|
|
6545
6708
|
var cfg = parseConfig(overlay.content);
|
|
6546
6709
|
if (!cfg) return null;
|
|
6547
|
-
var f = Math.max(6, size.w * 0.
|
|
6710
|
+
var f = Math.max(6, size.w * 0.052);
|
|
6548
6711
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6549
6712
|
style: {
|
|
6550
6713
|
width: "100%",
|
|
6551
6714
|
height: "100%",
|
|
6552
|
-
borderRadius: Math.max(2, size.w * 0.
|
|
6715
|
+
borderRadius: Math.max(2, size.w * 0.028),
|
|
6553
6716
|
display: "flex",
|
|
6554
6717
|
flexDirection: "column",
|
|
6555
6718
|
background: cfg.backgroundColor,
|
|
6556
6719
|
color: cfg.textColor,
|
|
6557
|
-
fontFamily: "Roboto, 'Segoe UI',
|
|
6720
|
+
fontFamily: "'Inter', 'Roboto', 'Segoe UI', system-ui, sans-serif",
|
|
6558
6721
|
overflow: "hidden",
|
|
6559
6722
|
pointerEvents: "none",
|
|
6560
6723
|
userSelect: "none",
|
|
6561
|
-
fontSize: "".concat(f, "px")
|
|
6724
|
+
fontSize: "".concat(f, "px"),
|
|
6725
|
+
boxShadow: "0 8px 28px rgba(0,0,0,0.45)"
|
|
6562
6726
|
},
|
|
6563
6727
|
children: [
|
|
6564
6728
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -6566,28 +6730,36 @@ function ScoreBugOverlay(param) {
|
|
|
6566
6730
|
flex: 1,
|
|
6567
6731
|
display: "flex",
|
|
6568
6732
|
alignItems: "center",
|
|
6569
|
-
padding: "0 ".concat(f * 0.
|
|
6570
|
-
gap: f * 0.
|
|
6733
|
+
padding: "".concat(f * 0.42, "px ").concat(f * 0.85, "px"),
|
|
6734
|
+
gap: f * 0.45,
|
|
6735
|
+
minHeight: 0
|
|
6571
6736
|
},
|
|
6572
6737
|
children: [
|
|
6573
6738
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6574
6739
|
style: {
|
|
6575
6740
|
flex: 1,
|
|
6576
|
-
textAlign: "center"
|
|
6741
|
+
textAlign: "center",
|
|
6742
|
+
minWidth: 0,
|
|
6743
|
+
padding: "0 ".concat(f * 0.15, "px")
|
|
6577
6744
|
},
|
|
6578
6745
|
children: [
|
|
6579
6746
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6580
6747
|
style: {
|
|
6581
|
-
fontSize: "
|
|
6582
|
-
fontWeight:
|
|
6748
|
+
fontSize: "1.05em",
|
|
6749
|
+
fontWeight: 800,
|
|
6750
|
+
letterSpacing: "0.02em",
|
|
6751
|
+
overflow: "hidden",
|
|
6752
|
+
textOverflow: "ellipsis",
|
|
6753
|
+
whiteSpace: "nowrap"
|
|
6583
6754
|
},
|
|
6584
6755
|
children: cfg.homeTeam
|
|
6585
6756
|
}),
|
|
6586
6757
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6587
6758
|
style: {
|
|
6588
|
-
fontSize: "1.
|
|
6759
|
+
fontSize: "1.75em",
|
|
6589
6760
|
fontWeight: 900,
|
|
6590
|
-
lineHeight: 1
|
|
6761
|
+
lineHeight: 1.05,
|
|
6762
|
+
marginTop: f * 0.08
|
|
6591
6763
|
},
|
|
6592
6764
|
children: cfg.homeScore
|
|
6593
6765
|
})
|
|
@@ -6595,16 +6767,26 @@ function ScoreBugOverlay(param) {
|
|
|
6595
6767
|
}),
|
|
6596
6768
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6597
6769
|
style: {
|
|
6598
|
-
fontSize: "0.
|
|
6770
|
+
fontSize: "0.88em",
|
|
6599
6771
|
textAlign: "center",
|
|
6600
|
-
|
|
6601
|
-
|
|
6772
|
+
fontWeight: 600,
|
|
6773
|
+
opacity: 0.92,
|
|
6774
|
+
color: cfg.textColor,
|
|
6775
|
+
padding: "0 ".concat(f * 0.5, "px"),
|
|
6776
|
+
flexShrink: 0,
|
|
6777
|
+
lineHeight: 1.25,
|
|
6778
|
+
textTransform: "uppercase",
|
|
6779
|
+
letterSpacing: "0.04em"
|
|
6602
6780
|
},
|
|
6603
6781
|
children: [
|
|
6604
6782
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6605
6783
|
children: cfg.period
|
|
6606
6784
|
}),
|
|
6607
6785
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6786
|
+
style: {
|
|
6787
|
+
fontWeight: 700,
|
|
6788
|
+
opacity: 1
|
|
6789
|
+
},
|
|
6608
6790
|
children: cfg.clock
|
|
6609
6791
|
})
|
|
6610
6792
|
]
|
|
@@ -6612,21 +6794,28 @@ function ScoreBugOverlay(param) {
|
|
|
6612
6794
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6613
6795
|
style: {
|
|
6614
6796
|
flex: 1,
|
|
6615
|
-
textAlign: "center"
|
|
6797
|
+
textAlign: "center",
|
|
6798
|
+
minWidth: 0,
|
|
6799
|
+
padding: "0 ".concat(f * 0.15, "px")
|
|
6616
6800
|
},
|
|
6617
6801
|
children: [
|
|
6618
6802
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6619
6803
|
style: {
|
|
6620
|
-
fontSize: "
|
|
6621
|
-
fontWeight:
|
|
6804
|
+
fontSize: "1.05em",
|
|
6805
|
+
fontWeight: 800,
|
|
6806
|
+
letterSpacing: "0.02em",
|
|
6807
|
+
overflow: "hidden",
|
|
6808
|
+
textOverflow: "ellipsis",
|
|
6809
|
+
whiteSpace: "nowrap"
|
|
6622
6810
|
},
|
|
6623
6811
|
children: cfg.awayTeam
|
|
6624
6812
|
}),
|
|
6625
6813
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6626
6814
|
style: {
|
|
6627
|
-
fontSize: "1.
|
|
6815
|
+
fontSize: "1.75em",
|
|
6628
6816
|
fontWeight: 900,
|
|
6629
|
-
lineHeight: 1
|
|
6817
|
+
lineHeight: 1.05,
|
|
6818
|
+
marginTop: f * 0.08
|
|
6630
6819
|
},
|
|
6631
6820
|
children: cfg.awayScore
|
|
6632
6821
|
})
|
|
@@ -6636,23 +6825,27 @@ function ScoreBugOverlay(param) {
|
|
|
6636
6825
|
}),
|
|
6637
6826
|
(cfg.sponsorText || cfg.sponsorImageUrl) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6638
6827
|
style: {
|
|
6639
|
-
fontSize: "0.
|
|
6828
|
+
fontSize: "0.72em",
|
|
6640
6829
|
textAlign: "center",
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6830
|
+
fontWeight: 600,
|
|
6831
|
+
opacity: 0.88,
|
|
6832
|
+
padding: "".concat(f * 0.34, "px ").concat(f * 0.55, "px"),
|
|
6833
|
+
borderTop: "1px solid ".concat(cfg.accentColor, "55"),
|
|
6644
6834
|
display: "flex",
|
|
6645
6835
|
alignItems: "center",
|
|
6646
6836
|
justifyContent: "center",
|
|
6647
|
-
gap: f * 0.
|
|
6648
|
-
overflow: "hidden"
|
|
6837
|
+
gap: f * 0.45,
|
|
6838
|
+
overflow: "hidden",
|
|
6839
|
+
letterSpacing: "0.04em",
|
|
6840
|
+
textTransform: "uppercase",
|
|
6841
|
+
background: "linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.22) 100%)"
|
|
6649
6842
|
},
|
|
6650
6843
|
children: [
|
|
6651
6844
|
cfg.sponsorImageUrl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
6652
6845
|
src: cfg.sponsorImageUrl,
|
|
6653
6846
|
alt: "sponsor",
|
|
6654
6847
|
style: {
|
|
6655
|
-
height: "".concat(f * 1.
|
|
6848
|
+
height: "".concat(f * 1.35, "px"),
|
|
6656
6849
|
objectFit: "contain",
|
|
6657
6850
|
flexShrink: 0
|
|
6658
6851
|
}
|
|
@@ -6674,29 +6867,32 @@ function LowerThirdOverlay(param) {
|
|
|
6674
6867
|
var overlay = param.overlay, size = param.size;
|
|
6675
6868
|
var cfg = parseConfig(overlay.content);
|
|
6676
6869
|
if (!cfg) return null;
|
|
6677
|
-
var f = Math.max(6, size.w * 0.
|
|
6870
|
+
var f = Math.max(6, size.w * 0.05);
|
|
6871
|
+
var accentH = Math.max(3, size.h * 0.038);
|
|
6678
6872
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6679
6873
|
style: {
|
|
6680
6874
|
width: "100%",
|
|
6681
6875
|
height: "100%",
|
|
6682
|
-
borderRadius: Math.max(2, size.w * 0.
|
|
6876
|
+
borderRadius: Math.max(2, size.w * 0.018),
|
|
6683
6877
|
display: "flex",
|
|
6684
6878
|
flexDirection: "column",
|
|
6685
6879
|
justifyContent: "flex-end",
|
|
6686
6880
|
background: cfg.backgroundColor,
|
|
6687
6881
|
color: cfg.textColor,
|
|
6688
|
-
fontFamily: "Roboto, 'Segoe UI',
|
|
6882
|
+
fontFamily: "'Inter', 'Roboto', 'Segoe UI', system-ui, sans-serif",
|
|
6689
6883
|
overflow: "hidden",
|
|
6690
6884
|
pointerEvents: "none",
|
|
6691
6885
|
userSelect: "none",
|
|
6692
|
-
fontSize: "".concat(f, "px")
|
|
6886
|
+
fontSize: "".concat(f, "px"),
|
|
6887
|
+
boxShadow: "0 10px 32px rgba(0,0,0,0.4)"
|
|
6693
6888
|
},
|
|
6694
6889
|
children: [
|
|
6695
6890
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6696
6891
|
style: {
|
|
6697
6892
|
width: "100%",
|
|
6698
|
-
height:
|
|
6699
|
-
backgroundColor: cfg.accentColor
|
|
6893
|
+
height: accentH,
|
|
6894
|
+
backgroundColor: cfg.accentColor,
|
|
6895
|
+
flexShrink: 0
|
|
6700
6896
|
}
|
|
6701
6897
|
}),
|
|
6702
6898
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -6705,23 +6901,28 @@ function LowerThirdOverlay(param) {
|
|
|
6705
6901
|
display: "flex",
|
|
6706
6902
|
flexDirection: "column",
|
|
6707
6903
|
justifyContent: "center",
|
|
6708
|
-
padding: "".concat(f * 0.
|
|
6904
|
+
padding: "".concat(f * 0.62, "px ").concat(f * 1.05, "px"),
|
|
6905
|
+
minHeight: 0,
|
|
6906
|
+
gap: f * 0.18
|
|
6709
6907
|
},
|
|
6710
6908
|
children: [
|
|
6711
6909
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6712
6910
|
style: {
|
|
6713
|
-
fontSize: "1.
|
|
6714
|
-
fontWeight:
|
|
6715
|
-
lineHeight: 1.
|
|
6716
|
-
|
|
6911
|
+
fontSize: "1.28em",
|
|
6912
|
+
fontWeight: 800,
|
|
6913
|
+
lineHeight: 1.22,
|
|
6914
|
+
letterSpacing: "0.01em",
|
|
6915
|
+
textShadow: "0 2px 6px rgba(0,0,0,0.55)"
|
|
6717
6916
|
},
|
|
6718
6917
|
children: cfg.headline
|
|
6719
6918
|
}),
|
|
6720
6919
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6721
6920
|
style: {
|
|
6722
|
-
fontSize: "
|
|
6723
|
-
|
|
6724
|
-
|
|
6921
|
+
fontSize: "0.94em",
|
|
6922
|
+
fontWeight: 500,
|
|
6923
|
+
opacity: 0.92,
|
|
6924
|
+
lineHeight: 1.35,
|
|
6925
|
+
color: cfg.textColor
|
|
6725
6926
|
},
|
|
6726
6927
|
children: cfg.subtitle
|
|
6727
6928
|
})
|
|
@@ -6729,20 +6930,24 @@ function LowerThirdOverlay(param) {
|
|
|
6729
6930
|
}),
|
|
6730
6931
|
(cfg.sponsorText || cfg.sponsorImageUrl) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6731
6932
|
style: {
|
|
6732
|
-
fontSize: "0.
|
|
6733
|
-
|
|
6734
|
-
|
|
6933
|
+
fontSize: "0.68em",
|
|
6934
|
+
fontWeight: 600,
|
|
6935
|
+
opacity: 0.72,
|
|
6936
|
+
padding: "".concat(f * 0.28, "px ").concat(f * 1.05, "px ").concat(f * 0.48, "px"),
|
|
6735
6937
|
display: "flex",
|
|
6736
6938
|
alignItems: "center",
|
|
6737
6939
|
gap: f * 0.4,
|
|
6738
|
-
overflow: "hidden"
|
|
6940
|
+
overflow: "hidden",
|
|
6941
|
+
letterSpacing: "0.06em",
|
|
6942
|
+
textTransform: "uppercase",
|
|
6943
|
+
borderTop: "1px solid rgba(255,255,255,0.08)"
|
|
6739
6944
|
},
|
|
6740
6945
|
children: [
|
|
6741
6946
|
cfg.sponsorImageUrl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
6742
6947
|
src: cfg.sponsorImageUrl,
|
|
6743
6948
|
alt: "sponsor",
|
|
6744
6949
|
style: {
|
|
6745
|
-
height: "".concat(f * 1.
|
|
6950
|
+
height: "".concat(f * 1.25, "px"),
|
|
6746
6951
|
objectFit: "contain",
|
|
6747
6952
|
flexShrink: 0
|
|
6748
6953
|
}
|
|
@@ -7656,8 +7861,13 @@ var OverlayRenderer = function OverlayRenderer(param) {
|
|
|
7656
7861
|
},
|
|
7657
7862
|
children: _to_consumable_array(fadeMap.values()).map(function(param) {
|
|
7658
7863
|
var overlay = param.overlay, visible = param.visible;
|
|
7659
|
-
var
|
|
7660
|
-
var
|
|
7864
|
+
var uniform = coordinateSpace && coordinateSpace.width > 0 && coordinateSpace.height > 0;
|
|
7865
|
+
var auth = uniform ? {
|
|
7866
|
+
width: coordinateSpace.width,
|
|
7867
|
+
height: coordinateSpace.height
|
|
7868
|
+
} : overlayAuthoringDimensions(overlay, dims.nativeWidth, dims.nativeHeight);
|
|
7869
|
+
var scaleX = dims.displayWidth / auth.width;
|
|
7870
|
+
var scaleY = dims.displayHeight / auth.height;
|
|
7661
7871
|
var left = overlay.x * scaleX;
|
|
7662
7872
|
var top = overlay.y * scaleY;
|
|
7663
7873
|
var width = overlay.width * scaleX;
|
|
@@ -7880,23 +8090,28 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7880
8090
|
}, [
|
|
7881
8091
|
swirlOverlayApiBaseUrl
|
|
7882
8092
|
]);
|
|
8093
|
+
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];
|
|
7883
8094
|
var displayOverlays = import_react2.default.useMemo(function() {
|
|
7884
8095
|
if (!swirlProjectId || !swirlShowcaseDemo) return overlays;
|
|
7885
8096
|
if (overlays.some(scrollerLooksLikeMarketsStock)) return overlays;
|
|
7886
|
-
|
|
7887
|
-
return o.type === "scroller";
|
|
7888
|
-
});
|
|
8097
|
+
if (overlays.some(function(o) {
|
|
8098
|
+
return o.visible && o.type === "scroller";
|
|
8099
|
+
})) return overlays;
|
|
8100
|
+
var cw = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.width;
|
|
8101
|
+
var ch = overlayCoordSpace === null || overlayCoordSpace === void 0 ? void 0 : overlayCoordSpace.height;
|
|
8102
|
+
var tickerOpts = cw && cw > 0 && ch && ch > 0 ? {
|
|
8103
|
+
coordinateWidth: cw,
|
|
8104
|
+
coordinateHeight: ch
|
|
8105
|
+
} : {};
|
|
7889
8106
|
return _to_consumable_array(overlays).concat([
|
|
7890
|
-
createDemoStockTickerOverlay(swirlProjectId,
|
|
7891
|
-
stackAboveNews: hasOtherScroller
|
|
7892
|
-
})
|
|
8107
|
+
createDemoStockTickerOverlay(swirlProjectId, tickerOpts)
|
|
7893
8108
|
]);
|
|
7894
8109
|
}, [
|
|
7895
8110
|
overlays,
|
|
7896
8111
|
swirlProjectId,
|
|
7897
|
-
swirlShowcaseDemo
|
|
8112
|
+
swirlShowcaseDemo,
|
|
8113
|
+
overlayCoordSpace
|
|
7898
8114
|
]);
|
|
7899
|
-
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];
|
|
7900
8115
|
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];
|
|
7901
8116
|
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];
|
|
7902
8117
|
var _import_react2_default_useState20 = _sliced_to_array(import_react2.default.useState(DEFAULT_PLAYER_ASPECT_RATIO), 2), playerAspectRatio = _import_react2_default_useState20[0], setPlayerAspectRatio = _import_react2_default_useState20[1];
|
|
@@ -8192,8 +8407,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8192
8407
|
var _playerRef_current;
|
|
8193
8408
|
if (!swirlProjectId) return;
|
|
8194
8409
|
var tryResolve = function tryResolve() {
|
|
8195
|
-
var
|
|
8196
|
-
var player = playerRef.current;
|
|
8410
|
+
var _ref, _ref1;
|
|
8197
8411
|
var fixed = swirlOverlayCoordinateSpace;
|
|
8198
8412
|
if (fixed && fixed.width > 0 && fixed.height > 0) {
|
|
8199
8413
|
setOverlayCoordSpace({
|
|
@@ -8202,26 +8416,29 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8202
8416
|
});
|
|
8203
8417
|
return true;
|
|
8204
8418
|
}
|
|
8419
|
+
var player = playerRef.current;
|
|
8205
8420
|
if (!player) return false;
|
|
8206
8421
|
var video2 = player.videoElement;
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8422
|
+
var vw = (_ref = video2 === null || video2 === void 0 ? void 0 : video2.videoWidth) !== null && _ref !== void 0 ? _ref : 0;
|
|
8423
|
+
var vh = (_ref1 = video2 === null || video2 === void 0 ? void 0 : video2.videoHeight) !== null && _ref1 !== void 0 ? _ref1 : 0;
|
|
8424
|
+
if (!vw || !vh) {
|
|
8425
|
+
var _player_getMaxHlsResolution;
|
|
8426
|
+
var maxRes = (_player_getMaxHlsResolution = player.getMaxHlsResolution) === null || _player_getMaxHlsResolution === void 0 ? void 0 : _player_getMaxHlsResolution.call(player);
|
|
8427
|
+
if (maxRes && maxRes.width > 0 && maxRes.height > 0) {
|
|
8428
|
+
vw = maxRes.width;
|
|
8429
|
+
vh = maxRes.height;
|
|
8430
|
+
} else {
|
|
8431
|
+
var _player_getMinHlsResolution;
|
|
8432
|
+
var minRes = (_player_getMinHlsResolution = player.getMinHlsResolution) === null || _player_getMinHlsResolution === void 0 ? void 0 : _player_getMinHlsResolution.call(player);
|
|
8433
|
+
if (minRes && minRes.width > 0 && minRes.height > 0) {
|
|
8434
|
+
vw = minRes.width;
|
|
8435
|
+
vh = minRes.height;
|
|
8436
|
+
}
|
|
8437
|
+
}
|
|
8223
8438
|
}
|
|
8224
|
-
return false;
|
|
8439
|
+
if (!vw || !vh) return false;
|
|
8440
|
+
setOverlayCoordSpace(inferSwirlOverlayCoordinateSpace(overlays, vw, vh));
|
|
8441
|
+
return true;
|
|
8225
8442
|
};
|
|
8226
8443
|
var attempts = 0;
|
|
8227
8444
|
var maxAttempts = 40;
|
|
@@ -8247,7 +8464,8 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8247
8464
|
}, [
|
|
8248
8465
|
swirlProjectId,
|
|
8249
8466
|
criticalPropsKey,
|
|
8250
|
-
swirlOverlayCoordinateSpace
|
|
8467
|
+
swirlOverlayCoordinateSpace,
|
|
8468
|
+
overlays
|
|
8251
8469
|
]);
|
|
8252
8470
|
(0, import_react2.useEffect)(function() {
|
|
8253
8471
|
if (!playerRef.current) return;
|
|
@@ -8678,7 +8896,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8678
8896
|
overlays: displayOverlays,
|
|
8679
8897
|
currentTime: currentTime,
|
|
8680
8898
|
videoRef: videoRef,
|
|
8681
|
-
coordinateSpace:
|
|
8899
|
+
coordinateSpace: swirlOverlayCoordinateSpace && swirlOverlayCoordinateSpace.width > 0 && swirlOverlayCoordinateSpace.height > 0 ? swirlOverlayCoordinateSpace : null,
|
|
8682
8900
|
showcaseMode: !!swirlShowcaseDemo
|
|
8683
8901
|
}),
|
|
8684
8902
|
(isLoading || isBuffering) && !hideLoadingIndicator && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
@@ -11281,6 +11499,8 @@ var StormcloudPlayer_default = StormcloudPlayer;
|
|
|
11281
11499
|
OVERLAY_API_BASE: OVERLAY_API_BASE,
|
|
11282
11500
|
SUPPORTS_DASH: SUPPORTS_DASH,
|
|
11283
11501
|
SUPPORTS_HLS: SUPPORTS_HLS,
|
|
11502
|
+
SWIRL_HD_AUTHORING_HEIGHT: SWIRL_HD_AUTHORING_HEIGHT,
|
|
11503
|
+
SWIRL_HD_AUTHORING_WIDTH: SWIRL_HD_AUTHORING_WIDTH,
|
|
11284
11504
|
StormcloudPlayer: StormcloudPlayer,
|
|
11285
11505
|
StormcloudVideoPlayer: StormcloudVideoPlayer,
|
|
11286
11506
|
StormcloudVideoPlayerComponent: StormcloudVideoPlayerComponent,
|
|
@@ -11293,6 +11513,7 @@ var StormcloudPlayer_default = StormcloudPlayer;
|
|
|
11293
11513
|
getBrowserConfigOverrides: getBrowserConfigOverrides,
|
|
11294
11514
|
getBrowserID: getBrowserID,
|
|
11295
11515
|
getClientInfo: getClientInfo,
|
|
11516
|
+
inferSwirlOverlayCoordinateSpace: inferSwirlOverlayCoordinateSpace,
|
|
11296
11517
|
initializePolyfills: initializePolyfills,
|
|
11297
11518
|
isMediaStream: isMediaStream,
|
|
11298
11519
|
isOverlayActive: isOverlayActive,
|
|
@@ -11301,6 +11522,7 @@ var StormcloudPlayer_default = StormcloudPlayer;
|
|
|
11301
11522
|
merge: merge,
|
|
11302
11523
|
normalizeSwirlOverlay: normalizeSwirlOverlay,
|
|
11303
11524
|
omit: omit,
|
|
11525
|
+
overlayAuthoringDimensions: overlayAuthoringDimensions,
|
|
11304
11526
|
parseQuery: parseQuery,
|
|
11305
11527
|
players: players,
|
|
11306
11528
|
randomString: randomString,
|
|
@@ -11311,6 +11533,7 @@ var StormcloudPlayer_default = StormcloudPlayer;
|
|
|
11311
11533
|
supportsFeature: supportsFeature,
|
|
11312
11534
|
supportsModernJS: supportsModernJS,
|
|
11313
11535
|
supportsWebKitPresentationMode: supportsWebKitPresentationMode,
|
|
11536
|
+
swirlProjectHasNabDemoMixedWithOther: swirlProjectHasNabDemoMixedWithOther,
|
|
11314
11537
|
timeStringToSeconds: timeStringToSeconds
|
|
11315
11538
|
});
|
|
11316
11539
|
//# sourceMappingURL=index.cjs.map
|