stormcloud-video-player 0.7.26 → 0.7.28
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 +266 -104
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +266 -104
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +16 -11
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -0
- package/lib/players/HlsPlayer.cjs +16 -11
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +16 -11
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/OverlayRenderer.cjs +131 -28
- package/lib/ui/OverlayRenderer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +266 -104
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -3414,6 +3414,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
_this.adLayer.cancelPreload(token);
|
|
3416
3416
|
} else {
|
|
3417
|
+
_this.video.style.transition = "none";
|
|
3418
|
+
_this.video.style.opacity = "0";
|
|
3419
|
+
_this.video.style.visibility = "hidden";
|
|
3417
3420
|
if (!_this.config.singlePipelineMode) {
|
|
3418
3421
|
_this.showPlaceholderLayer();
|
|
3419
3422
|
}
|
|
@@ -3440,6 +3443,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3440
3443
|
console.log("[StormcloudVideoPlayer] content_resume: skip pending bids, only", remainingNow1, "ms left");
|
|
3441
3444
|
}
|
|
3442
3445
|
} else {
|
|
3446
|
+
_this.video.style.transition = "none";
|
|
3447
|
+
_this.video.style.opacity = "0";
|
|
3448
|
+
_this.video.style.visibility = "hidden";
|
|
3443
3449
|
if (!_this.config.singlePipelineMode) {
|
|
3444
3450
|
_this.showPlaceholderLayer();
|
|
3445
3451
|
}
|
|
@@ -3469,17 +3475,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3469
3475
|
_this.showPlaceholderLayer();
|
|
3470
3476
|
_this.adLayer.showPlaceholder();
|
|
3471
3477
|
} else {
|
|
3472
|
-
_this.
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
if (Math.abs(_this.video.volume - breakVolume) > 0.01) {
|
|
3477
|
-
_this.video.volume = breakVolume;
|
|
3478
|
-
}
|
|
3479
|
-
if (_this.video.paused) {
|
|
3480
|
-
var _this_video_play;
|
|
3481
|
-
(_this_video_play = _this.video.play()) === null || _this_video_play === void 0 ? void 0 : _this_video_play.catch(function() {});
|
|
3482
|
-
}
|
|
3478
|
+
_this.video.style.transition = "none";
|
|
3479
|
+
_this.video.style.opacity = "0";
|
|
3480
|
+
_this.video.style.visibility = "hidden";
|
|
3481
|
+
_this.adLayer.showPlaceholder();
|
|
3483
3482
|
}
|
|
3484
3483
|
_this.continuousFetchingActive = true;
|
|
3485
3484
|
_this.startContinuousFetchLoop();
|
|
@@ -3691,6 +3690,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3691
3690
|
return this.showAds;
|
|
3692
3691
|
}
|
|
3693
3692
|
},
|
|
3693
|
+
{
|
|
3694
|
+
key: "isInAdBreak",
|
|
3695
|
+
value: function isInAdBreak() {
|
|
3696
|
+
return this.inAdBreak;
|
|
3697
|
+
}
|
|
3698
|
+
},
|
|
3694
3699
|
{
|
|
3695
3700
|
key: "initializeAdLayer",
|
|
3696
3701
|
value: function initializeAdLayer() {
|
|
@@ -5950,42 +5955,126 @@ function TextOverlay(param) {
|
|
|
5950
5955
|
children: text
|
|
5951
5956
|
});
|
|
5952
5957
|
}
|
|
5958
|
+
function parseRSSXml(xmlText, maxItems) {
|
|
5959
|
+
var parser = new DOMParser();
|
|
5960
|
+
var doc = parser.parseFromString(xmlText, "text/xml");
|
|
5961
|
+
if (doc.querySelector("parsererror")) throw new Error("Invalid RSS XML");
|
|
5962
|
+
return Array.from(doc.querySelectorAll("item")).map(function(item) {
|
|
5963
|
+
var _item_querySelector, _item_querySelector1, _item_querySelector2, _item_querySelector3, _item_querySelector4;
|
|
5964
|
+
return {
|
|
5965
|
+
title: (((_item_querySelector = item.querySelector("title")) === null || _item_querySelector === void 0 ? void 0 : _item_querySelector.textContent) || "").replace(/<[^>]*>/g, "").trim(),
|
|
5966
|
+
description: (((_item_querySelector1 = item.querySelector("description")) === null || _item_querySelector1 === void 0 ? void 0 : _item_querySelector1.textContent) || "").replace(/<[^>]*>/g, "").trim(),
|
|
5967
|
+
pubDate: ((_item_querySelector2 = item.querySelector("pubDate")) === null || _item_querySelector2 === void 0 ? void 0 : _item_querySelector2.textContent) || "",
|
|
5968
|
+
author: ((_item_querySelector3 = item.querySelector("author, dc\\:creator")) === null || _item_querySelector3 === void 0 ? void 0 : _item_querySelector3.textContent) || "",
|
|
5969
|
+
category: ((_item_querySelector4 = item.querySelector("category")) === null || _item_querySelector4 === void 0 ? void 0 : _item_querySelector4.textContent) || ""
|
|
5970
|
+
};
|
|
5971
|
+
}).filter(function(i) {
|
|
5972
|
+
return i.title;
|
|
5973
|
+
}).slice(0, maxItems);
|
|
5974
|
+
}
|
|
5953
5975
|
function fetchRSSItems(rssUrl, maxItems) {
|
|
5954
5976
|
return _async_to_generator(function() {
|
|
5955
|
-
var
|
|
5977
|
+
var encoded, resp2, data, unused, resp21, text2, unused1, resp, text;
|
|
5956
5978
|
return _ts_generator(this, function(_state) {
|
|
5957
5979
|
switch(_state.label){
|
|
5958
5980
|
case 0:
|
|
5981
|
+
encoded = encodeURIComponent(rssUrl);
|
|
5982
|
+
_state.label = 1;
|
|
5983
|
+
case 1:
|
|
5984
|
+
_state.trys.push([
|
|
5985
|
+
1,
|
|
5986
|
+
5,
|
|
5987
|
+
,
|
|
5988
|
+
6
|
|
5989
|
+
]);
|
|
5959
5990
|
return [
|
|
5960
5991
|
4,
|
|
5961
|
-
fetch("https://api.allorigins.win/get?url=".concat(
|
|
5992
|
+
fetch("https://api.allorigins.win/get?url=".concat(encoded))
|
|
5993
|
+
];
|
|
5994
|
+
case 2:
|
|
5995
|
+
resp2 = _state.sent();
|
|
5996
|
+
if (!resp2.ok) return [
|
|
5997
|
+
3,
|
|
5998
|
+
4
|
|
5962
5999
|
];
|
|
5963
|
-
case 1:
|
|
5964
|
-
resp = _state.sent();
|
|
5965
6000
|
return [
|
|
5966
6001
|
4,
|
|
5967
|
-
|
|
6002
|
+
resp2.json()
|
|
5968
6003
|
];
|
|
5969
|
-
case
|
|
6004
|
+
case 3:
|
|
5970
6005
|
data = _state.sent();
|
|
5971
|
-
if (
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
6006
|
+
if (data.contents) return [
|
|
6007
|
+
2,
|
|
6008
|
+
parseRSSXml(data.contents, maxItems)
|
|
6009
|
+
];
|
|
6010
|
+
_state.label = 4;
|
|
6011
|
+
case 4:
|
|
6012
|
+
return [
|
|
6013
|
+
3,
|
|
6014
|
+
6
|
|
6015
|
+
];
|
|
6016
|
+
case 5:
|
|
6017
|
+
unused = _state.sent();
|
|
6018
|
+
return [
|
|
6019
|
+
3,
|
|
6020
|
+
6
|
|
6021
|
+
];
|
|
6022
|
+
case 6:
|
|
6023
|
+
_state.trys.push([
|
|
6024
|
+
6,
|
|
6025
|
+
10,
|
|
6026
|
+
,
|
|
6027
|
+
11
|
|
6028
|
+
]);
|
|
5975
6029
|
return [
|
|
6030
|
+
4,
|
|
6031
|
+
fetch("https://corsproxy.io/?url=".concat(encoded))
|
|
6032
|
+
];
|
|
6033
|
+
case 7:
|
|
6034
|
+
resp21 = _state.sent();
|
|
6035
|
+
if (!resp21.ok) return [
|
|
6036
|
+
3,
|
|
6037
|
+
9
|
|
6038
|
+
];
|
|
6039
|
+
return [
|
|
6040
|
+
4,
|
|
6041
|
+
resp21.text()
|
|
6042
|
+
];
|
|
6043
|
+
case 8:
|
|
6044
|
+
text2 = _state.sent();
|
|
6045
|
+
if (text2) return [
|
|
5976
6046
|
2,
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
6047
|
+
parseRSSXml(text2, maxItems)
|
|
6048
|
+
];
|
|
6049
|
+
_state.label = 9;
|
|
6050
|
+
case 9:
|
|
6051
|
+
return [
|
|
6052
|
+
3,
|
|
6053
|
+
11
|
|
6054
|
+
];
|
|
6055
|
+
case 10:
|
|
6056
|
+
unused1 = _state.sent();
|
|
6057
|
+
return [
|
|
6058
|
+
3,
|
|
6059
|
+
11
|
|
6060
|
+
];
|
|
6061
|
+
case 11:
|
|
6062
|
+
return [
|
|
6063
|
+
4,
|
|
6064
|
+
fetch("https://thingproxy.freeboard.io/fetch/".concat(rssUrl))
|
|
6065
|
+
];
|
|
6066
|
+
case 12:
|
|
6067
|
+
resp = _state.sent();
|
|
6068
|
+
if (!resp.ok) throw new Error("RSS fetch failed: ".concat(resp.status));
|
|
6069
|
+
return [
|
|
6070
|
+
4,
|
|
6071
|
+
resp.text()
|
|
6072
|
+
];
|
|
6073
|
+
case 13:
|
|
6074
|
+
text = _state.sent();
|
|
6075
|
+
return [
|
|
6076
|
+
2,
|
|
6077
|
+
parseRSSXml(text, maxItems)
|
|
5989
6078
|
];
|
|
5990
6079
|
}
|
|
5991
6080
|
});
|
|
@@ -5997,18 +6086,28 @@ function ScrollerOverlay(param) {
|
|
|
5997
6086
|
var cfg = overlay.scroller_config;
|
|
5998
6087
|
var uid = (0, import_react.useId)().replace(/:/g, "");
|
|
5999
6088
|
var _ref13 = _sliced_to_array((0, import_react.useState)([]), 2), rssItems = _ref13[0], setRssItems = _ref13[1];
|
|
6000
|
-
var _ref14 = _sliced_to_array((0, import_react.useState)(
|
|
6089
|
+
var _ref14 = _sliced_to_array((0, import_react.useState)(true), 2), rssLoading = _ref14[0], setRssLoading = _ref14[1];
|
|
6090
|
+
var _ref15 = _sliced_to_array((0, import_react.useState)(false), 2), rssError = _ref15[0], setRssError = _ref15[1];
|
|
6001
6091
|
var rssUrl = (cfg === null || cfg === void 0 ? void 0 : cfg.rss_url) || "";
|
|
6002
6092
|
var maxItems = (_ref = cfg === null || cfg === void 0 ? void 0 : cfg.max_items) !== null && _ref !== void 0 ? _ref : 10;
|
|
6003
6093
|
var autoRefresh = (cfg === null || cfg === void 0 ? void 0 : cfg.auto_refresh) !== false;
|
|
6004
6094
|
var updateInterval = (_ref1 = cfg === null || cfg === void 0 ? void 0 : cfg.update_interval) !== null && _ref1 !== void 0 ? _ref1 : 5;
|
|
6005
6095
|
(0, import_react.useEffect)(function() {
|
|
6006
|
-
if (!rssUrl || (cfg === null || cfg === void 0 ? void 0 : cfg.use_custom_text) && (cfg === null || cfg === void 0 ? void 0 : cfg.custom_text))
|
|
6096
|
+
if (!rssUrl || (cfg === null || cfg === void 0 ? void 0 : cfg.use_custom_text) && (cfg === null || cfg === void 0 ? void 0 : cfg.custom_text)) {
|
|
6097
|
+
setRssLoading(false);
|
|
6098
|
+
return;
|
|
6099
|
+
}
|
|
6007
6100
|
var cancelled = false;
|
|
6008
6101
|
setRssLoading(true);
|
|
6102
|
+
setRssError(false);
|
|
6009
6103
|
fetchRSSItems(rssUrl, maxItems).then(function(items) {
|
|
6010
|
-
if (!cancelled)
|
|
6011
|
-
|
|
6104
|
+
if (!cancelled) {
|
|
6105
|
+
setRssItems(items);
|
|
6106
|
+
setRssError(false);
|
|
6107
|
+
}
|
|
6108
|
+
}).catch(function() {
|
|
6109
|
+
if (!cancelled) setRssError(true);
|
|
6110
|
+
}).finally(function() {
|
|
6012
6111
|
if (!cancelled) setRssLoading(false);
|
|
6013
6112
|
});
|
|
6014
6113
|
return function() {
|
|
@@ -6023,7 +6122,10 @@ function ScrollerOverlay(param) {
|
|
|
6023
6122
|
(0, import_react.useEffect)(function() {
|
|
6024
6123
|
if (!rssUrl || !autoRefresh || (cfg === null || cfg === void 0 ? void 0 : cfg.use_custom_text) && (cfg === null || cfg === void 0 ? void 0 : cfg.custom_text)) return;
|
|
6025
6124
|
var interval = setInterval(function() {
|
|
6026
|
-
fetchRSSItems(rssUrl, maxItems).then(
|
|
6125
|
+
fetchRSSItems(rssUrl, maxItems).then(function(items) {
|
|
6126
|
+
setRssItems(items);
|
|
6127
|
+
setRssError(false);
|
|
6128
|
+
}).catch(function() {});
|
|
6027
6129
|
}, updateInterval * 60 * 1e3);
|
|
6028
6130
|
return function() {
|
|
6029
6131
|
return clearInterval(interval);
|
|
@@ -6060,13 +6162,19 @@ function ScrollerOverlay(param) {
|
|
|
6060
6162
|
segments = [
|
|
6061
6163
|
"Loading feed\u2026"
|
|
6062
6164
|
];
|
|
6165
|
+
} else if (rssError) {
|
|
6166
|
+
segments = overlay.content ? [
|
|
6167
|
+
overlay.content
|
|
6168
|
+
] : [
|
|
6169
|
+
"RSS feed unavailable"
|
|
6170
|
+
];
|
|
6063
6171
|
} else if (overlay.content) {
|
|
6064
6172
|
segments = [
|
|
6065
6173
|
overlay.content
|
|
6066
6174
|
];
|
|
6067
6175
|
} else {
|
|
6068
6176
|
segments = rssUrl ? [
|
|
6069
|
-
"
|
|
6177
|
+
"Loading feed\u2026"
|
|
6070
6178
|
] : [
|
|
6071
6179
|
"RSS Ticker"
|
|
6072
6180
|
];
|
|
@@ -7493,6 +7601,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7493
7601
|
var wrapperRef = (0, import_react2.useRef)(null);
|
|
7494
7602
|
var _import_react2_default_useState = _sliced_to_array(import_react2.default.useState({
|
|
7495
7603
|
showAds: false,
|
|
7604
|
+
inAdBreak: false,
|
|
7496
7605
|
currentIndex: 0,
|
|
7497
7606
|
totalAds: 0,
|
|
7498
7607
|
remainingSeconds: 0
|
|
@@ -7853,20 +7962,23 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7853
7962
|
if (!playerRef.current) return;
|
|
7854
7963
|
var checkAdStatus = function checkAdStatus() {
|
|
7855
7964
|
if (playerRef.current) {
|
|
7856
|
-
var
|
|
7965
|
+
var _ref;
|
|
7966
|
+
var _videoRef_current_dataset, _videoRef_current, _playerRef_current_isInAdBreak, _playerRef_current;
|
|
7857
7967
|
var showAdsFromMethod = playerRef.current.isShowingAds();
|
|
7858
7968
|
var showAdsFromAttribute = ((_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : (_videoRef_current_dataset = _videoRef_current.dataset) === null || _videoRef_current_dataset === void 0 ? void 0 : _videoRef_current_dataset.stormcloudAdPlaying) === "true";
|
|
7859
7969
|
var showAds = showAdsFromMethod || showAdsFromAttribute;
|
|
7970
|
+
var inAdBreak = (_ref = (_playerRef_current_isInAdBreak = (_playerRef_current = playerRef.current).isInAdBreak) === null || _playerRef_current_isInAdBreak === void 0 ? void 0 : _playerRef_current_isInAdBreak.call(_playerRef_current)) !== null && _ref !== void 0 ? _ref : showAds;
|
|
7860
7971
|
var currentIndex = playerRef.current.getCurrentAdIndex();
|
|
7861
7972
|
var totalAds = playerRef.current.getTotalAdsInBreak();
|
|
7862
7973
|
var remainingSeconds = playerRef.current.getRemainingAdSeconds();
|
|
7863
7974
|
setAdStatus(function(prev) {
|
|
7864
|
-
if (prev.showAds !== showAds || prev.currentIndex !== currentIndex || prev.totalAds !== totalAds || prev.remainingSeconds !== remainingSeconds) {
|
|
7975
|
+
if (prev.showAds !== showAds || prev.inAdBreak !== inAdBreak || prev.currentIndex !== currentIndex || prev.totalAds !== totalAds || prev.remainingSeconds !== remainingSeconds) {
|
|
7865
7976
|
if (showAds && !prev.showAds) {
|
|
7866
7977
|
setShowCenterPlay(false);
|
|
7867
7978
|
}
|
|
7868
7979
|
return {
|
|
7869
7980
|
showAds: showAds,
|
|
7981
|
+
inAdBreak: inAdBreak,
|
|
7870
7982
|
currentIndex: currentIndex,
|
|
7871
7983
|
totalAds: totalAds,
|
|
7872
7984
|
remainingSeconds: remainingSeconds
|
|
@@ -8520,7 +8632,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8520
8632
|
})
|
|
8521
8633
|
]
|
|
8522
8634
|
}),
|
|
8523
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
8635
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8524
8636
|
className: "sc-ai-scroll",
|
|
8525
8637
|
style: {
|
|
8526
8638
|
padding: "12px",
|
|
@@ -8530,68 +8642,118 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8530
8642
|
display: "grid",
|
|
8531
8643
|
gap: "12px"
|
|
8532
8644
|
},
|
|
8533
|
-
children:
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
}
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8645
|
+
children: adStatus.inAdBreak ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
8646
|
+
style: {
|
|
8647
|
+
display: "flex",
|
|
8648
|
+
flexDirection: "column",
|
|
8649
|
+
alignItems: "center",
|
|
8650
|
+
justifyContent: "center",
|
|
8651
|
+
gap: "12px",
|
|
8652
|
+
padding: "24px 12px",
|
|
8653
|
+
borderRadius: "10px",
|
|
8654
|
+
border: "1px solid rgba(234, 179, 8, 0.5)",
|
|
8655
|
+
background: "linear-gradient(155deg, rgba(92, 64, 0, 0.45) 0%, rgba(17, 24, 39, 0.62) 100%)",
|
|
8656
|
+
boxShadow: "0 8px 24px rgba(234, 179, 8, 0.12)"
|
|
8657
|
+
},
|
|
8658
|
+
children: [
|
|
8659
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8660
|
+
style: {
|
|
8661
|
+
width: "36px",
|
|
8662
|
+
height: "36px",
|
|
8663
|
+
borderRadius: "50%",
|
|
8664
|
+
background: "rgba(234, 179, 8, 0.18)",
|
|
8665
|
+
border: "2px solid rgba(234, 179, 8, 0.7)",
|
|
8666
|
+
display: "flex",
|
|
8667
|
+
alignItems: "center",
|
|
8668
|
+
justifyContent: "center",
|
|
8669
|
+
fontSize: "16px"
|
|
8670
|
+
},
|
|
8671
|
+
children: "\uD83D\uDCFA"
|
|
8672
|
+
}),
|
|
8673
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8674
|
+
style: {
|
|
8675
|
+
fontSize: "13px",
|
|
8676
|
+
fontWeight: 700,
|
|
8677
|
+
color: "#fde68a",
|
|
8678
|
+
letterSpacing: "0.04em",
|
|
8679
|
+
textAlign: "center"
|
|
8680
|
+
},
|
|
8681
|
+
children: "Now Ad Playing"
|
|
8682
|
+
}),
|
|
8683
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8684
|
+
style: {
|
|
8685
|
+
fontSize: "11px",
|
|
8686
|
+
color: "rgba(255,255,255,0.55)",
|
|
8687
|
+
textAlign: "center",
|
|
8688
|
+
lineHeight: "1.5"
|
|
8689
|
+
},
|
|
8690
|
+
children: "AI context will resume after the ad break."
|
|
8691
|
+
})
|
|
8692
|
+
]
|
|
8693
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, {
|
|
8694
|
+
children: [
|
|
8695
|
+
aiLiveContext.error && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8696
|
+
style: {
|
|
8697
|
+
fontSize: "12px",
|
|
8698
|
+
color: "#fecaca",
|
|
8699
|
+
background: "rgba(220, 38, 38, 0.2)",
|
|
8700
|
+
border: "1px solid rgba(248, 113, 113, 0.5)",
|
|
8701
|
+
borderRadius: "10px",
|
|
8702
|
+
padding: "9px 10px"
|
|
8703
|
+
},
|
|
8704
|
+
children: aiLiveContext.error
|
|
8705
|
+
}),
|
|
8706
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
8707
|
+
style: {
|
|
8708
|
+
padding: "11px 12px",
|
|
8709
|
+
borderRadius: "10px",
|
|
8710
|
+
border: "1px solid rgba(236, 72, 153, 0.5)",
|
|
8711
|
+
background: "linear-gradient(155deg, rgba(88, 28, 135, 0.35) 0%, rgba(17, 24, 39, 0.62) 100%)",
|
|
8712
|
+
boxShadow: "0 8px 24px rgba(236, 72, 153, 0.12)"
|
|
8713
|
+
},
|
|
8714
|
+
children: [
|
|
8715
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
8716
|
+
style: {
|
|
8717
|
+
display: "flex",
|
|
8718
|
+
alignItems: "center",
|
|
8719
|
+
justifyContent: "space-between",
|
|
8720
|
+
gap: "8px",
|
|
8721
|
+
marginBottom: "7px"
|
|
8722
|
+
},
|
|
8723
|
+
children: [
|
|
8724
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8725
|
+
style: {
|
|
8726
|
+
fontSize: "11px",
|
|
8727
|
+
fontWeight: 800,
|
|
8728
|
+
textTransform: "uppercase",
|
|
8729
|
+
letterSpacing: "0.1em",
|
|
8730
|
+
color: "#f9a8d4"
|
|
8731
|
+
},
|
|
8732
|
+
children: "AI Context"
|
|
8733
|
+
}),
|
|
8734
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8735
|
+
style: {
|
|
8736
|
+
fontSize: "10px",
|
|
8737
|
+
color: "rgba(255,255,255,0.72)",
|
|
8738
|
+
fontFamily: "'SF Mono', 'Cascadia Code', monospace"
|
|
8739
|
+
},
|
|
8740
|
+
children: aiLiveContext.context ? formatAiRelativeTime(aiLiveContext.context.updated_at) : "--"
|
|
8741
|
+
})
|
|
8742
|
+
]
|
|
8743
|
+
}),
|
|
8744
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8745
|
+
style: {
|
|
8746
|
+
fontSize: "13px",
|
|
8747
|
+
lineHeight: "1.58",
|
|
8748
|
+
color: "rgba(255,255,255,0.95)",
|
|
8749
|
+
whiteSpace: "pre-wrap"
|
|
8750
|
+
},
|
|
8751
|
+
children: (_ref = (_aiLiveContext_context = aiLiveContext.context) === null || _aiLiveContext_context === void 0 ? void 0 : _aiLiveContext_context.context) !== null && _ref !== void 0 ? _ref : aiLiveContext.isLoading ? "Analyzing live stream..." : "Waiting for AI context response."
|
|
8752
|
+
})
|
|
8753
|
+
]
|
|
8754
|
+
})
|
|
8755
|
+
]
|
|
8756
|
+
})
|
|
8595
8757
|
})
|
|
8596
8758
|
]
|
|
8597
8759
|
}),
|