stormcloud-video-player 0.7.18 → 0.7.20
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.cjs
CHANGED
|
@@ -7640,14 +7640,11 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7640
7640
|
}
|
|
7641
7641
|
setShowSpeedMenu(false);
|
|
7642
7642
|
};
|
|
7643
|
-
var isHlsStream = (src === null || src === void 0 ? void 0 : src.toLowerCase().includes(".m3u8")) || (src === null || src === void 0 ? void 0 : src.toLowerCase().includes("/hls/"));
|
|
7644
|
-
var shouldShowEnhancedControls = showCustomControls && (isHlsStream ? allowNativeHls : true);
|
|
7645
7643
|
var analyzerPanelWidth = Math.min(420, Math.max(320, viewportWidth * 0.41));
|
|
7646
7644
|
var analyzerPanelHeight = isPortrait ? "52vh" : "420px";
|
|
7647
7645
|
var analyzerPanelMaxHeight = "60vh";
|
|
7648
7646
|
var panelGap = Math.max(8, 12 * responsiveScale);
|
|
7649
7647
|
var shouldStackPanels = isPortrait || viewportWidth < 980;
|
|
7650
|
-
var debugPanelBottomOffset = shouldShowEnhancedControls ? Math.max(74, 92 * responsiveScale) : Math.max(52, 58 * responsiveScale);
|
|
7651
7648
|
var panelBaseRight = PANEL_BASE_RIGHT_OFFSET * responsiveScale;
|
|
7652
7649
|
var debugPanelRightOffset = showAiPanel && !shouldStackPanels ? panelBaseRight + analyzerPanelWidth + panelGap : panelBaseRight;
|
|
7653
7650
|
(0, import_react2.useEffect)(function() {
|
|
@@ -7670,6 +7667,9 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
7670
7667
|
adcisionChannelId
|
|
7671
7668
|
]);
|
|
7672
7669
|
var effectiveSrc = adcisionChannelId ? adcisionSrc : src;
|
|
7670
|
+
var isHlsStream = (effectiveSrc === null || effectiveSrc === void 0 ? void 0 : effectiveSrc.toLowerCase().includes(".m3u8")) || (effectiveSrc === null || effectiveSrc === void 0 ? void 0 : effectiveSrc.toLowerCase().includes("/hls/"));
|
|
7671
|
+
var shouldShowEnhancedControls = showCustomControls && (isHlsStream ? allowNativeHls : true);
|
|
7672
|
+
var debugPanelBottomOffset = shouldShowEnhancedControls ? Math.max(74, 92 * responsiveScale) : Math.max(52, 58 * responsiveScale);
|
|
7673
7673
|
var criticalPropsKey = (0, import_react2.useMemo)(function() {
|
|
7674
7674
|
var baseParts = CRITICAL_PROPS.map(function(prop) {
|
|
7675
7675
|
return prop === "src" ? "src:".concat(effectiveSrc) : "".concat(prop, ":").concat(props[prop]);
|
|
@@ -9050,7 +9050,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
9050
9050
|
size: Math.max(14, 18 * responsiveScale)
|
|
9051
9051
|
})
|
|
9052
9052
|
}),
|
|
9053
|
-
swirlProjectId && (showAiContextControl !== null && showAiContextControl !== void 0 ? showAiContextControl : true) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
|
|
9053
|
+
(swirlProjectId || adcisionChannelId) && (showAiContextControl !== null && showAiContextControl !== void 0 ? showAiContextControl : true) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
|
|
9054
9054
|
className: "sc-ctrl-btn",
|
|
9055
9055
|
onClick: function onClick() {
|
|
9056
9056
|
setShowAiPanel(function(prev) {
|
|
@@ -9072,7 +9072,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
9072
9072
|
title: showAiPanel ? "Hide AI context" : "Show AI context",
|
|
9073
9073
|
children: "AI"
|
|
9074
9074
|
}),
|
|
9075
|
-
|
|
9075
|
+
(showDebugControl !== null && showDebugControl !== void 0 ? showDebugControl : true) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
|
|
9076
9076
|
className: "sc-ctrl-btn",
|
|
9077
9077
|
onClick: function onClick() {
|
|
9078
9078
|
setShowDebugPanel(function(prev) {
|
|
@@ -9389,7 +9389,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
9389
9389
|
size: Math.max(14, 18 * responsiveScale)
|
|
9390
9390
|
})
|
|
9391
9391
|
}),
|
|
9392
|
-
swirlProjectId && (showAiContextControl !== null && showAiContextControl !== void 0 ? showAiContextControl : true) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
|
|
9392
|
+
(swirlProjectId || adcisionChannelId) && (showAiContextControl !== null && showAiContextControl !== void 0 ? showAiContextControl : true) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
|
|
9393
9393
|
className: "sc-ctrl-btn",
|
|
9394
9394
|
onClick: function onClick() {
|
|
9395
9395
|
setShowAiPanel(function(prev) {
|
|
@@ -9411,7 +9411,7 @@ var StormcloudVideoPlayerComponent = import_react2.default.memo(function(props)
|
|
|
9411
9411
|
title: showAiPanel ? "Hide AI context" : "Show AI context",
|
|
9412
9412
|
children: "AI"
|
|
9413
9413
|
}),
|
|
9414
|
-
|
|
9414
|
+
(showDebugControl !== null && showDebugControl !== void 0 ? showDebugControl : true) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", {
|
|
9415
9415
|
className: "sc-ctrl-btn",
|
|
9416
9416
|
onClick: function onClick() {
|
|
9417
9417
|
setShowDebugPanel(function(prev) {
|