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
|
@@ -3236,6 +3236,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3236
3236
|
}
|
|
3237
3237
|
_this.adLayer.cancelPreload(token);
|
|
3238
3238
|
} else {
|
|
3239
|
+
_this.video.style.transition = "none";
|
|
3240
|
+
_this.video.style.opacity = "0";
|
|
3241
|
+
_this.video.style.visibility = "hidden";
|
|
3239
3242
|
if (!_this.config.singlePipelineMode) {
|
|
3240
3243
|
_this.showPlaceholderLayer();
|
|
3241
3244
|
}
|
|
@@ -3262,6 +3265,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3262
3265
|
console.log("[StormcloudVideoPlayer] content_resume: skip pending bids, only", remainingNow1, "ms left");
|
|
3263
3266
|
}
|
|
3264
3267
|
} else {
|
|
3268
|
+
_this.video.style.transition = "none";
|
|
3269
|
+
_this.video.style.opacity = "0";
|
|
3270
|
+
_this.video.style.visibility = "hidden";
|
|
3265
3271
|
if (!_this.config.singlePipelineMode) {
|
|
3266
3272
|
_this.showPlaceholderLayer();
|
|
3267
3273
|
}
|
|
@@ -3291,17 +3297,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3291
3297
|
_this.showPlaceholderLayer();
|
|
3292
3298
|
_this.adLayer.showPlaceholder();
|
|
3293
3299
|
} else {
|
|
3294
|
-
_this.
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
if (Math.abs(_this.video.volume - breakVolume) > 0.01) {
|
|
3299
|
-
_this.video.volume = breakVolume;
|
|
3300
|
-
}
|
|
3301
|
-
if (_this.video.paused) {
|
|
3302
|
-
var _this_video_play;
|
|
3303
|
-
(_this_video_play = _this.video.play()) === null || _this_video_play === void 0 ? void 0 : _this_video_play.catch(function() {});
|
|
3304
|
-
}
|
|
3300
|
+
_this.video.style.transition = "none";
|
|
3301
|
+
_this.video.style.opacity = "0";
|
|
3302
|
+
_this.video.style.visibility = "hidden";
|
|
3303
|
+
_this.adLayer.showPlaceholder();
|
|
3305
3304
|
}
|
|
3306
3305
|
_this.continuousFetchingActive = true;
|
|
3307
3306
|
_this.startContinuousFetchLoop();
|
|
@@ -3513,6 +3512,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3513
3512
|
return this.showAds;
|
|
3514
3513
|
}
|
|
3515
3514
|
},
|
|
3515
|
+
{
|
|
3516
|
+
key: "isInAdBreak",
|
|
3517
|
+
value: function isInAdBreak() {
|
|
3518
|
+
return this.inAdBreak;
|
|
3519
|
+
}
|
|
3520
|
+
},
|
|
3516
3521
|
{
|
|
3517
3522
|
key: "initializeAdLayer",
|
|
3518
3523
|
value: function initializeAdLayer() {
|
|
@@ -5772,42 +5777,126 @@ function TextOverlay(param) {
|
|
|
5772
5777
|
children: text
|
|
5773
5778
|
});
|
|
5774
5779
|
}
|
|
5780
|
+
function parseRSSXml(xmlText, maxItems) {
|
|
5781
|
+
var parser = new DOMParser();
|
|
5782
|
+
var doc = parser.parseFromString(xmlText, "text/xml");
|
|
5783
|
+
if (doc.querySelector("parsererror")) throw new Error("Invalid RSS XML");
|
|
5784
|
+
return Array.from(doc.querySelectorAll("item")).map(function(item) {
|
|
5785
|
+
var _item_querySelector, _item_querySelector1, _item_querySelector2, _item_querySelector3, _item_querySelector4;
|
|
5786
|
+
return {
|
|
5787
|
+
title: (((_item_querySelector = item.querySelector("title")) === null || _item_querySelector === void 0 ? void 0 : _item_querySelector.textContent) || "").replace(/<[^>]*>/g, "").trim(),
|
|
5788
|
+
description: (((_item_querySelector1 = item.querySelector("description")) === null || _item_querySelector1 === void 0 ? void 0 : _item_querySelector1.textContent) || "").replace(/<[^>]*>/g, "").trim(),
|
|
5789
|
+
pubDate: ((_item_querySelector2 = item.querySelector("pubDate")) === null || _item_querySelector2 === void 0 ? void 0 : _item_querySelector2.textContent) || "",
|
|
5790
|
+
author: ((_item_querySelector3 = item.querySelector("author, dc\\:creator")) === null || _item_querySelector3 === void 0 ? void 0 : _item_querySelector3.textContent) || "",
|
|
5791
|
+
category: ((_item_querySelector4 = item.querySelector("category")) === null || _item_querySelector4 === void 0 ? void 0 : _item_querySelector4.textContent) || ""
|
|
5792
|
+
};
|
|
5793
|
+
}).filter(function(i) {
|
|
5794
|
+
return i.title;
|
|
5795
|
+
}).slice(0, maxItems);
|
|
5796
|
+
}
|
|
5775
5797
|
function fetchRSSItems(rssUrl, maxItems) {
|
|
5776
5798
|
return _async_to_generator(function() {
|
|
5777
|
-
var
|
|
5799
|
+
var encoded, resp2, data, unused, resp21, text2, unused1, resp, text;
|
|
5778
5800
|
return _ts_generator(this, function(_state) {
|
|
5779
5801
|
switch(_state.label){
|
|
5780
5802
|
case 0:
|
|
5803
|
+
encoded = encodeURIComponent(rssUrl);
|
|
5804
|
+
_state.label = 1;
|
|
5805
|
+
case 1:
|
|
5806
|
+
_state.trys.push([
|
|
5807
|
+
1,
|
|
5808
|
+
5,
|
|
5809
|
+
,
|
|
5810
|
+
6
|
|
5811
|
+
]);
|
|
5781
5812
|
return [
|
|
5782
5813
|
4,
|
|
5783
|
-
fetch("https://api.allorigins.win/get?url=".concat(
|
|
5814
|
+
fetch("https://api.allorigins.win/get?url=".concat(encoded))
|
|
5815
|
+
];
|
|
5816
|
+
case 2:
|
|
5817
|
+
resp2 = _state.sent();
|
|
5818
|
+
if (!resp2.ok) return [
|
|
5819
|
+
3,
|
|
5820
|
+
4
|
|
5784
5821
|
];
|
|
5785
|
-
case 1:
|
|
5786
|
-
resp = _state.sent();
|
|
5787
5822
|
return [
|
|
5788
5823
|
4,
|
|
5789
|
-
|
|
5824
|
+
resp2.json()
|
|
5790
5825
|
];
|
|
5791
|
-
case
|
|
5826
|
+
case 3:
|
|
5792
5827
|
data = _state.sent();
|
|
5793
|
-
if (
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5828
|
+
if (data.contents) return [
|
|
5829
|
+
2,
|
|
5830
|
+
parseRSSXml(data.contents, maxItems)
|
|
5831
|
+
];
|
|
5832
|
+
_state.label = 4;
|
|
5833
|
+
case 4:
|
|
5834
|
+
return [
|
|
5835
|
+
3,
|
|
5836
|
+
6
|
|
5837
|
+
];
|
|
5838
|
+
case 5:
|
|
5839
|
+
unused = _state.sent();
|
|
5840
|
+
return [
|
|
5841
|
+
3,
|
|
5842
|
+
6
|
|
5843
|
+
];
|
|
5844
|
+
case 6:
|
|
5845
|
+
_state.trys.push([
|
|
5846
|
+
6,
|
|
5847
|
+
10,
|
|
5848
|
+
,
|
|
5849
|
+
11
|
|
5850
|
+
]);
|
|
5797
5851
|
return [
|
|
5852
|
+
4,
|
|
5853
|
+
fetch("https://corsproxy.io/?url=".concat(encoded))
|
|
5854
|
+
];
|
|
5855
|
+
case 7:
|
|
5856
|
+
resp21 = _state.sent();
|
|
5857
|
+
if (!resp21.ok) return [
|
|
5858
|
+
3,
|
|
5859
|
+
9
|
|
5860
|
+
];
|
|
5861
|
+
return [
|
|
5862
|
+
4,
|
|
5863
|
+
resp21.text()
|
|
5864
|
+
];
|
|
5865
|
+
case 8:
|
|
5866
|
+
text2 = _state.sent();
|
|
5867
|
+
if (text2) return [
|
|
5798
5868
|
2,
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5869
|
+
parseRSSXml(text2, maxItems)
|
|
5870
|
+
];
|
|
5871
|
+
_state.label = 9;
|
|
5872
|
+
case 9:
|
|
5873
|
+
return [
|
|
5874
|
+
3,
|
|
5875
|
+
11
|
|
5876
|
+
];
|
|
5877
|
+
case 10:
|
|
5878
|
+
unused1 = _state.sent();
|
|
5879
|
+
return [
|
|
5880
|
+
3,
|
|
5881
|
+
11
|
|
5882
|
+
];
|
|
5883
|
+
case 11:
|
|
5884
|
+
return [
|
|
5885
|
+
4,
|
|
5886
|
+
fetch("https://thingproxy.freeboard.io/fetch/".concat(rssUrl))
|
|
5887
|
+
];
|
|
5888
|
+
case 12:
|
|
5889
|
+
resp = _state.sent();
|
|
5890
|
+
if (!resp.ok) throw new Error("RSS fetch failed: ".concat(resp.status));
|
|
5891
|
+
return [
|
|
5892
|
+
4,
|
|
5893
|
+
resp.text()
|
|
5894
|
+
];
|
|
5895
|
+
case 13:
|
|
5896
|
+
text = _state.sent();
|
|
5897
|
+
return [
|
|
5898
|
+
2,
|
|
5899
|
+
parseRSSXml(text, maxItems)
|
|
5811
5900
|
];
|
|
5812
5901
|
}
|
|
5813
5902
|
});
|
|
@@ -5819,18 +5908,28 @@ function ScrollerOverlay(param) {
|
|
|
5819
5908
|
var cfg = overlay.scroller_config;
|
|
5820
5909
|
var uid = (0, import_react.useId)().replace(/:/g, "");
|
|
5821
5910
|
var _ref13 = _sliced_to_array((0, import_react.useState)([]), 2), rssItems = _ref13[0], setRssItems = _ref13[1];
|
|
5822
|
-
var _ref14 = _sliced_to_array((0, import_react.useState)(
|
|
5911
|
+
var _ref14 = _sliced_to_array((0, import_react.useState)(true), 2), rssLoading = _ref14[0], setRssLoading = _ref14[1];
|
|
5912
|
+
var _ref15 = _sliced_to_array((0, import_react.useState)(false), 2), rssError = _ref15[0], setRssError = _ref15[1];
|
|
5823
5913
|
var rssUrl = (cfg === null || cfg === void 0 ? void 0 : cfg.rss_url) || "";
|
|
5824
5914
|
var maxItems = (_ref = cfg === null || cfg === void 0 ? void 0 : cfg.max_items) !== null && _ref !== void 0 ? _ref : 10;
|
|
5825
5915
|
var autoRefresh = (cfg === null || cfg === void 0 ? void 0 : cfg.auto_refresh) !== false;
|
|
5826
5916
|
var updateInterval = (_ref1 = cfg === null || cfg === void 0 ? void 0 : cfg.update_interval) !== null && _ref1 !== void 0 ? _ref1 : 5;
|
|
5827
5917
|
(0, import_react.useEffect)(function() {
|
|
5828
|
-
if (!rssUrl || (cfg === null || cfg === void 0 ? void 0 : cfg.use_custom_text) && (cfg === null || cfg === void 0 ? void 0 : cfg.custom_text))
|
|
5918
|
+
if (!rssUrl || (cfg === null || cfg === void 0 ? void 0 : cfg.use_custom_text) && (cfg === null || cfg === void 0 ? void 0 : cfg.custom_text)) {
|
|
5919
|
+
setRssLoading(false);
|
|
5920
|
+
return;
|
|
5921
|
+
}
|
|
5829
5922
|
var cancelled = false;
|
|
5830
5923
|
setRssLoading(true);
|
|
5924
|
+
setRssError(false);
|
|
5831
5925
|
fetchRSSItems(rssUrl, maxItems).then(function(items) {
|
|
5832
|
-
if (!cancelled)
|
|
5833
|
-
|
|
5926
|
+
if (!cancelled) {
|
|
5927
|
+
setRssItems(items);
|
|
5928
|
+
setRssError(false);
|
|
5929
|
+
}
|
|
5930
|
+
}).catch(function() {
|
|
5931
|
+
if (!cancelled) setRssError(true);
|
|
5932
|
+
}).finally(function() {
|
|
5834
5933
|
if (!cancelled) setRssLoading(false);
|
|
5835
5934
|
});
|
|
5836
5935
|
return function() {
|
|
@@ -5845,7 +5944,10 @@ function ScrollerOverlay(param) {
|
|
|
5845
5944
|
(0, import_react.useEffect)(function() {
|
|
5846
5945
|
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;
|
|
5847
5946
|
var interval = setInterval(function() {
|
|
5848
|
-
fetchRSSItems(rssUrl, maxItems).then(
|
|
5947
|
+
fetchRSSItems(rssUrl, maxItems).then(function(items) {
|
|
5948
|
+
setRssItems(items);
|
|
5949
|
+
setRssError(false);
|
|
5950
|
+
}).catch(function() {});
|
|
5849
5951
|
}, updateInterval * 60 * 1e3);
|
|
5850
5952
|
return function() {
|
|
5851
5953
|
return clearInterval(interval);
|
|
@@ -5882,13 +5984,19 @@ function ScrollerOverlay(param) {
|
|
|
5882
5984
|
segments = [
|
|
5883
5985
|
"Loading feed\u2026"
|
|
5884
5986
|
];
|
|
5987
|
+
} else if (rssError) {
|
|
5988
|
+
segments = overlay.content ? [
|
|
5989
|
+
overlay.content
|
|
5990
|
+
] : [
|
|
5991
|
+
"RSS feed unavailable"
|
|
5992
|
+
];
|
|
5885
5993
|
} else if (overlay.content) {
|
|
5886
5994
|
segments = [
|
|
5887
5995
|
overlay.content
|
|
5888
5996
|
];
|
|
5889
5997
|
} else {
|
|
5890
5998
|
segments = rssUrl ? [
|
|
5891
|
-
"
|
|
5999
|
+
"Loading feed\u2026"
|
|
5892
6000
|
] : [
|
|
5893
6001
|
"RSS Ticker"
|
|
5894
6002
|
];
|
|
@@ -7315,6 +7423,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7315
7423
|
var wrapperRef = (0, import_react2.useRef)(null);
|
|
7316
7424
|
var _import_react2_default_useState = _sliced_to_array(import_react2.default.useState({
|
|
7317
7425
|
showAds: false,
|
|
7426
|
+
inAdBreak: false,
|
|
7318
7427
|
currentIndex: 0,
|
|
7319
7428
|
totalAds: 0,
|
|
7320
7429
|
remainingSeconds: 0
|
|
@@ -7675,20 +7784,23 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7675
7784
|
if (!playerRef.current) return;
|
|
7676
7785
|
var checkAdStatus = function checkAdStatus() {
|
|
7677
7786
|
if (playerRef.current) {
|
|
7678
|
-
var
|
|
7787
|
+
var _ref;
|
|
7788
|
+
var _videoRef_current_dataset, _videoRef_current, _playerRef_current_isInAdBreak, _playerRef_current;
|
|
7679
7789
|
var showAdsFromMethod = playerRef.current.isShowingAds();
|
|
7680
7790
|
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";
|
|
7681
7791
|
var showAds = showAdsFromMethod || showAdsFromAttribute;
|
|
7792
|
+
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;
|
|
7682
7793
|
var currentIndex = playerRef.current.getCurrentAdIndex();
|
|
7683
7794
|
var totalAds = playerRef.current.getTotalAdsInBreak();
|
|
7684
7795
|
var remainingSeconds = playerRef.current.getRemainingAdSeconds();
|
|
7685
7796
|
setAdStatus(function(prev) {
|
|
7686
|
-
if (prev.showAds !== showAds || prev.currentIndex !== currentIndex || prev.totalAds !== totalAds || prev.remainingSeconds !== remainingSeconds) {
|
|
7797
|
+
if (prev.showAds !== showAds || prev.inAdBreak !== inAdBreak || prev.currentIndex !== currentIndex || prev.totalAds !== totalAds || prev.remainingSeconds !== remainingSeconds) {
|
|
7687
7798
|
if (showAds && !prev.showAds) {
|
|
7688
7799
|
setShowCenterPlay(false);
|
|
7689
7800
|
}
|
|
7690
7801
|
return {
|
|
7691
7802
|
showAds: showAds,
|
|
7803
|
+
inAdBreak: inAdBreak,
|
|
7692
7804
|
currentIndex: currentIndex,
|
|
7693
7805
|
totalAds: totalAds,
|
|
7694
7806
|
remainingSeconds: remainingSeconds
|
|
@@ -8342,7 +8454,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8342
8454
|
})
|
|
8343
8455
|
]
|
|
8344
8456
|
}),
|
|
8345
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
8457
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8346
8458
|
className: "sc-ai-scroll",
|
|
8347
8459
|
style: {
|
|
8348
8460
|
padding: "12px",
|
|
@@ -8352,68 +8464,118 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
8352
8464
|
display: "grid",
|
|
8353
8465
|
gap: "12px"
|
|
8354
8466
|
},
|
|
8355
|
-
children:
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
}
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8467
|
+
children: adStatus.inAdBreak ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
8468
|
+
style: {
|
|
8469
|
+
display: "flex",
|
|
8470
|
+
flexDirection: "column",
|
|
8471
|
+
alignItems: "center",
|
|
8472
|
+
justifyContent: "center",
|
|
8473
|
+
gap: "12px",
|
|
8474
|
+
padding: "24px 12px",
|
|
8475
|
+
borderRadius: "10px",
|
|
8476
|
+
border: "1px solid rgba(234, 179, 8, 0.5)",
|
|
8477
|
+
background: "linear-gradient(155deg, rgba(92, 64, 0, 0.45) 0%, rgba(17, 24, 39, 0.62) 100%)",
|
|
8478
|
+
boxShadow: "0 8px 24px rgba(234, 179, 8, 0.12)"
|
|
8479
|
+
},
|
|
8480
|
+
children: [
|
|
8481
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8482
|
+
style: {
|
|
8483
|
+
width: "36px",
|
|
8484
|
+
height: "36px",
|
|
8485
|
+
borderRadius: "50%",
|
|
8486
|
+
background: "rgba(234, 179, 8, 0.18)",
|
|
8487
|
+
border: "2px solid rgba(234, 179, 8, 0.7)",
|
|
8488
|
+
display: "flex",
|
|
8489
|
+
alignItems: "center",
|
|
8490
|
+
justifyContent: "center",
|
|
8491
|
+
fontSize: "16px"
|
|
8492
|
+
},
|
|
8493
|
+
children: "\uD83D\uDCFA"
|
|
8494
|
+
}),
|
|
8495
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8496
|
+
style: {
|
|
8497
|
+
fontSize: "13px",
|
|
8498
|
+
fontWeight: 700,
|
|
8499
|
+
color: "#fde68a",
|
|
8500
|
+
letterSpacing: "0.04em",
|
|
8501
|
+
textAlign: "center"
|
|
8502
|
+
},
|
|
8503
|
+
children: "Now Ad Playing"
|
|
8504
|
+
}),
|
|
8505
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8506
|
+
style: {
|
|
8507
|
+
fontSize: "11px",
|
|
8508
|
+
color: "rgba(255,255,255,0.55)",
|
|
8509
|
+
textAlign: "center",
|
|
8510
|
+
lineHeight: "1.5"
|
|
8511
|
+
},
|
|
8512
|
+
children: "AI context will resume after the ad break."
|
|
8513
|
+
})
|
|
8514
|
+
]
|
|
8515
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, {
|
|
8516
|
+
children: [
|
|
8517
|
+
aiLiveContext.error && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8518
|
+
style: {
|
|
8519
|
+
fontSize: "12px",
|
|
8520
|
+
color: "#fecaca",
|
|
8521
|
+
background: "rgba(220, 38, 38, 0.2)",
|
|
8522
|
+
border: "1px solid rgba(248, 113, 113, 0.5)",
|
|
8523
|
+
borderRadius: "10px",
|
|
8524
|
+
padding: "9px 10px"
|
|
8525
|
+
},
|
|
8526
|
+
children: aiLiveContext.error
|
|
8527
|
+
}),
|
|
8528
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
8529
|
+
style: {
|
|
8530
|
+
padding: "11px 12px",
|
|
8531
|
+
borderRadius: "10px",
|
|
8532
|
+
border: "1px solid rgba(236, 72, 153, 0.5)",
|
|
8533
|
+
background: "linear-gradient(155deg, rgba(88, 28, 135, 0.35) 0%, rgba(17, 24, 39, 0.62) 100%)",
|
|
8534
|
+
boxShadow: "0 8px 24px rgba(236, 72, 153, 0.12)"
|
|
8535
|
+
},
|
|
8536
|
+
children: [
|
|
8537
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", {
|
|
8538
|
+
style: {
|
|
8539
|
+
display: "flex",
|
|
8540
|
+
alignItems: "center",
|
|
8541
|
+
justifyContent: "space-between",
|
|
8542
|
+
gap: "8px",
|
|
8543
|
+
marginBottom: "7px"
|
|
8544
|
+
},
|
|
8545
|
+
children: [
|
|
8546
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8547
|
+
style: {
|
|
8548
|
+
fontSize: "11px",
|
|
8549
|
+
fontWeight: 800,
|
|
8550
|
+
textTransform: "uppercase",
|
|
8551
|
+
letterSpacing: "0.1em",
|
|
8552
|
+
color: "#f9a8d4"
|
|
8553
|
+
},
|
|
8554
|
+
children: "AI Context"
|
|
8555
|
+
}),
|
|
8556
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8557
|
+
style: {
|
|
8558
|
+
fontSize: "10px",
|
|
8559
|
+
color: "rgba(255,255,255,0.72)",
|
|
8560
|
+
fontFamily: "'SF Mono', 'Cascadia Code', monospace"
|
|
8561
|
+
},
|
|
8562
|
+
children: aiLiveContext.context ? formatAiRelativeTime(aiLiveContext.context.updated_at) : "--"
|
|
8563
|
+
})
|
|
8564
|
+
]
|
|
8565
|
+
}),
|
|
8566
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
8567
|
+
style: {
|
|
8568
|
+
fontSize: "13px",
|
|
8569
|
+
lineHeight: "1.58",
|
|
8570
|
+
color: "rgba(255,255,255,0.95)",
|
|
8571
|
+
whiteSpace: "pre-wrap"
|
|
8572
|
+
},
|
|
8573
|
+
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."
|
|
8574
|
+
})
|
|
8575
|
+
]
|
|
8576
|
+
})
|
|
8577
|
+
]
|
|
8578
|
+
})
|
|
8417
8579
|
})
|
|
8418
8580
|
]
|
|
8419
8581
|
}),
|