stormcloud-video-player 0.3.54 → 0.3.55
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 +806 -777
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +32 -1
- package/lib/index.d.ts +32 -1
- package/lib/index.js +796 -779
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +265 -3
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +2 -1
- package/lib/players/HlsPlayer.cjs +265 -3
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +265 -3
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/sdk/ima.d.cts +1 -1
- package/lib/{types-DYelrVG6.d.cts → types-C23mJ_hh.d.cts} +15 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +794 -777
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/tracking.cjs +264 -3
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/tracking.d.cts +12 -2
- package/package.json +1 -1
|
@@ -2647,9 +2647,6 @@ function sendInitialTracking(licenseKey) {
|
|
|
2647
2647
|
headers = {
|
|
2648
2648
|
"Content-Type": "application/json"
|
|
2649
2649
|
};
|
|
2650
|
-
if (licenseKey) {
|
|
2651
|
-
headers["Authorization"] = "Bearer ".concat(licenseKey);
|
|
2652
|
-
}
|
|
2653
2650
|
return [
|
|
2654
2651
|
4,
|
|
2655
2652
|
fetch("https://adstorm.co/api-adstorm-dev/adstorm/player-tracking/track", {
|
|
@@ -2755,6 +2752,234 @@ function sendHeartbeat(licenseKey) {
|
|
|
2755
2752
|
});
|
|
2756
2753
|
})();
|
|
2757
2754
|
}
|
|
2755
|
+
var TRACK_API_URL = "https://adstorm.co/api-adstorm-dev/adstorm/player-tracking/track";
|
|
2756
|
+
function mapToAdTrackingSource(source, adPlayerType) {
|
|
2757
|
+
if (source === "prebid" || source === "ima" || source === "hls") {
|
|
2758
|
+
return source;
|
|
2759
|
+
}
|
|
2760
|
+
if (source === "preload" || source === "ssp") {
|
|
2761
|
+
return source === "ssp" ? "prebid" : "ima";
|
|
2762
|
+
}
|
|
2763
|
+
return adPlayerType === "hls" ? "hls" : "ima";
|
|
2764
|
+
}
|
|
2765
|
+
function postAdTracking(licenseKey, body) {
|
|
2766
|
+
return _async_to_generator(function() {
|
|
2767
|
+
var headers, response;
|
|
2768
|
+
return _ts_generator(this, function(_state) {
|
|
2769
|
+
switch(_state.label){
|
|
2770
|
+
case 0:
|
|
2771
|
+
headers = {
|
|
2772
|
+
"Content-Type": "application/json"
|
|
2773
|
+
};
|
|
2774
|
+
if (licenseKey) {
|
|
2775
|
+
headers["Authorization"] = "Bearer ".concat(licenseKey);
|
|
2776
|
+
}
|
|
2777
|
+
return [
|
|
2778
|
+
4,
|
|
2779
|
+
fetch(TRACK_API_URL, {
|
|
2780
|
+
method: "POST",
|
|
2781
|
+
headers: headers,
|
|
2782
|
+
body: JSON.stringify(body)
|
|
2783
|
+
})
|
|
2784
|
+
];
|
|
2785
|
+
case 1:
|
|
2786
|
+
response = _state.sent();
|
|
2787
|
+
if (!response.ok) {
|
|
2788
|
+
throw new Error("HTTP error! status: ".concat(response.status));
|
|
2789
|
+
}
|
|
2790
|
+
return [
|
|
2791
|
+
4,
|
|
2792
|
+
response.json()
|
|
2793
|
+
];
|
|
2794
|
+
case 2:
|
|
2795
|
+
_state.sent();
|
|
2796
|
+
return [
|
|
2797
|
+
2
|
|
2798
|
+
];
|
|
2799
|
+
}
|
|
2800
|
+
});
|
|
2801
|
+
})();
|
|
2802
|
+
}
|
|
2803
|
+
function sendAdDetectTracking(licenseKey, payload) {
|
|
2804
|
+
return _async_to_generator(function() {
|
|
2805
|
+
var _payload_source, _payload_timestamp, clientInfo, browserId, adDetectInfo, body, error;
|
|
2806
|
+
return _ts_generator(this, function(_state) {
|
|
2807
|
+
switch(_state.label){
|
|
2808
|
+
case 0:
|
|
2809
|
+
_state.trys.push([
|
|
2810
|
+
0,
|
|
2811
|
+
3,
|
|
2812
|
+
,
|
|
2813
|
+
4
|
|
2814
|
+
]);
|
|
2815
|
+
clientInfo = getClientInfo();
|
|
2816
|
+
return [
|
|
2817
|
+
4,
|
|
2818
|
+
getBrowserID(clientInfo)
|
|
2819
|
+
];
|
|
2820
|
+
case 1:
|
|
2821
|
+
browserId = _state.sent();
|
|
2822
|
+
adDetectInfo = _object_spread({
|
|
2823
|
+
source: (_payload_source = payload.source) !== null && _payload_source !== void 0 ? _payload_source : "scte35",
|
|
2824
|
+
timestamp: (_payload_timestamp = payload.timestamp) !== null && _payload_timestamp !== void 0 ? _payload_timestamp : /* @__PURE__ */ new Date().toISOString()
|
|
2825
|
+
}, payload.durationSeconds != null && {
|
|
2826
|
+
durationSeconds: payload.durationSeconds
|
|
2827
|
+
}, payload.ptsSeconds != null && {
|
|
2828
|
+
ptsSeconds: payload.ptsSeconds
|
|
2829
|
+
}, payload.detectedAtFragmentSn != null && {
|
|
2830
|
+
detectedAtFragmentSn: payload.detectedAtFragmentSn
|
|
2831
|
+
});
|
|
2832
|
+
body = _object_spread_props(_object_spread({
|
|
2833
|
+
browserId: browserId
|
|
2834
|
+
}, clientInfo, licenseKey && {
|
|
2835
|
+
licenseKey: licenseKey
|
|
2836
|
+
}), {
|
|
2837
|
+
adDetectInfo: adDetectInfo
|
|
2838
|
+
});
|
|
2839
|
+
return [
|
|
2840
|
+
4,
|
|
2841
|
+
postAdTracking(licenseKey, body)
|
|
2842
|
+
];
|
|
2843
|
+
case 2:
|
|
2844
|
+
_state.sent();
|
|
2845
|
+
return [
|
|
2846
|
+
3,
|
|
2847
|
+
4
|
|
2848
|
+
];
|
|
2849
|
+
case 3:
|
|
2850
|
+
error = _state.sent();
|
|
2851
|
+
console.error("[StormcloudVideoPlayer] Error sending ad-detect tracking:", error);
|
|
2852
|
+
return [
|
|
2853
|
+
3,
|
|
2854
|
+
4
|
|
2855
|
+
];
|
|
2856
|
+
case 4:
|
|
2857
|
+
return [
|
|
2858
|
+
2
|
|
2859
|
+
];
|
|
2860
|
+
}
|
|
2861
|
+
});
|
|
2862
|
+
})();
|
|
2863
|
+
}
|
|
2864
|
+
function sendAdLoadedTracking(licenseKey, payload, adPlayerType) {
|
|
2865
|
+
return _async_to_generator(function() {
|
|
2866
|
+
var clientInfo, browserId, source, adLoadedInfo, body, error;
|
|
2867
|
+
return _ts_generator(this, function(_state) {
|
|
2868
|
+
switch(_state.label){
|
|
2869
|
+
case 0:
|
|
2870
|
+
_state.trys.push([
|
|
2871
|
+
0,
|
|
2872
|
+
3,
|
|
2873
|
+
,
|
|
2874
|
+
4
|
|
2875
|
+
]);
|
|
2876
|
+
clientInfo = getClientInfo();
|
|
2877
|
+
return [
|
|
2878
|
+
4,
|
|
2879
|
+
getBrowserID(clientInfo)
|
|
2880
|
+
];
|
|
2881
|
+
case 1:
|
|
2882
|
+
browserId = _state.sent();
|
|
2883
|
+
source = mapToAdTrackingSource(payload.source, adPlayerType);
|
|
2884
|
+
adLoadedInfo = _object_spread({
|
|
2885
|
+
source: source,
|
|
2886
|
+
timestamp: /* @__PURE__ */ new Date().toISOString()
|
|
2887
|
+
}, payload.vastUrl != null && {
|
|
2888
|
+
vastUrl: payload.vastUrl
|
|
2889
|
+
}, payload.durationSeconds != null && {
|
|
2890
|
+
durationSeconds: payload.durationSeconds
|
|
2891
|
+
});
|
|
2892
|
+
body = _object_spread_props(_object_spread({
|
|
2893
|
+
browserId: browserId
|
|
2894
|
+
}, clientInfo, licenseKey && {
|
|
2895
|
+
licenseKey: licenseKey
|
|
2896
|
+
}), {
|
|
2897
|
+
adLoadedInfo: adLoadedInfo
|
|
2898
|
+
});
|
|
2899
|
+
return [
|
|
2900
|
+
4,
|
|
2901
|
+
postAdTracking(licenseKey, body)
|
|
2902
|
+
];
|
|
2903
|
+
case 2:
|
|
2904
|
+
_state.sent();
|
|
2905
|
+
return [
|
|
2906
|
+
3,
|
|
2907
|
+
4
|
|
2908
|
+
];
|
|
2909
|
+
case 3:
|
|
2910
|
+
error = _state.sent();
|
|
2911
|
+
console.error("[StormcloudVideoPlayer] Error sending ad-loaded tracking:", error);
|
|
2912
|
+
return [
|
|
2913
|
+
3,
|
|
2914
|
+
4
|
|
2915
|
+
];
|
|
2916
|
+
case 4:
|
|
2917
|
+
return [
|
|
2918
|
+
2
|
|
2919
|
+
];
|
|
2920
|
+
}
|
|
2921
|
+
});
|
|
2922
|
+
})();
|
|
2923
|
+
}
|
|
2924
|
+
function sendAdImpressionTracking(licenseKey, payload, adPlayerType) {
|
|
2925
|
+
return _async_to_generator(function() {
|
|
2926
|
+
var clientInfo, browserId, source, adImpressionInfo, body, error;
|
|
2927
|
+
return _ts_generator(this, function(_state) {
|
|
2928
|
+
switch(_state.label){
|
|
2929
|
+
case 0:
|
|
2930
|
+
_state.trys.push([
|
|
2931
|
+
0,
|
|
2932
|
+
3,
|
|
2933
|
+
,
|
|
2934
|
+
4
|
|
2935
|
+
]);
|
|
2936
|
+
clientInfo = getClientInfo();
|
|
2937
|
+
return [
|
|
2938
|
+
4,
|
|
2939
|
+
getBrowserID(clientInfo)
|
|
2940
|
+
];
|
|
2941
|
+
case 1:
|
|
2942
|
+
browserId = _state.sent();
|
|
2943
|
+
source = mapToAdTrackingSource(payload.source, adPlayerType);
|
|
2944
|
+
adImpressionInfo = _object_spread({
|
|
2945
|
+
source: source,
|
|
2946
|
+
adIndex: payload.adIndex,
|
|
2947
|
+
timestamp: /* @__PURE__ */ new Date().toISOString()
|
|
2948
|
+
}, payload.durationSeconds != null && {
|
|
2949
|
+
durationSeconds: payload.durationSeconds
|
|
2950
|
+
});
|
|
2951
|
+
body = _object_spread_props(_object_spread({
|
|
2952
|
+
browserId: browserId
|
|
2953
|
+
}, clientInfo, licenseKey && {
|
|
2954
|
+
licenseKey: licenseKey
|
|
2955
|
+
}), {
|
|
2956
|
+
adImpressionInfo: adImpressionInfo
|
|
2957
|
+
});
|
|
2958
|
+
return [
|
|
2959
|
+
4,
|
|
2960
|
+
postAdTracking(licenseKey, body)
|
|
2961
|
+
];
|
|
2962
|
+
case 2:
|
|
2963
|
+
_state.sent();
|
|
2964
|
+
return [
|
|
2965
|
+
3,
|
|
2966
|
+
4
|
|
2967
|
+
];
|
|
2968
|
+
case 3:
|
|
2969
|
+
error = _state.sent();
|
|
2970
|
+
console.error("[StormcloudVideoPlayer] Error sending ad-impression tracking:", error);
|
|
2971
|
+
return [
|
|
2972
|
+
3,
|
|
2973
|
+
4
|
|
2974
|
+
];
|
|
2975
|
+
case 4:
|
|
2976
|
+
return [
|
|
2977
|
+
2
|
|
2978
|
+
];
|
|
2979
|
+
}
|
|
2980
|
+
});
|
|
2981
|
+
})();
|
|
2982
|
+
}
|
|
2758
2983
|
// src/utils/polyfills.ts
|
|
2759
2984
|
function polyfillURLSearchParams() {
|
|
2760
2985
|
if (typeof URLSearchParams !== "undefined") {
|
|
@@ -3055,6 +3280,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3055
3280
|
this.maxPreloadPoolSize = 2;
|
|
3056
3281
|
this.preloadPoolActive = false;
|
|
3057
3282
|
this.preloadPoolLoopRunning = false;
|
|
3283
|
+
this.adDetectSentForCurrentBreak = false;
|
|
3058
3284
|
this.continuousFetchLoopRunning = false;
|
|
3059
3285
|
initializePolyfills();
|
|
3060
3286
|
var browserOverrides = getBrowserConfigOverrides();
|
|
@@ -3524,6 +3750,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3524
3750
|
value: function attachImaEventListeners() {
|
|
3525
3751
|
var _this = this;
|
|
3526
3752
|
this.ima.on("all_ads_completed", function() {
|
|
3753
|
+
sendAdImpressionTracking(_this.config.licenseKey, {
|
|
3754
|
+
adIndex: _this.currentAdIndex
|
|
3755
|
+
}, _this.config.adPlayerType).catch(function() {});
|
|
3527
3756
|
var remaining = _this.getRemainingAdMs();
|
|
3528
3757
|
_this.consecutiveFailures = 0;
|
|
3529
3758
|
if (_this.config.debugAdTiming) {
|
|
@@ -3586,6 +3815,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3586
3815
|
}
|
|
3587
3816
|
});
|
|
3588
3817
|
this.ima.on("content_resume", function() {
|
|
3818
|
+
sendAdImpressionTracking(_this.config.licenseKey, {
|
|
3819
|
+
adIndex: _this.currentAdIndex
|
|
3820
|
+
}, _this.config.adPlayerType).catch(function() {});
|
|
3589
3821
|
if (!_this.video.muted) {
|
|
3590
3822
|
_this.video.muted = true;
|
|
3591
3823
|
_this.video.volume = 0;
|
|
@@ -3969,6 +4201,13 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3969
4201
|
}
|
|
3970
4202
|
return;
|
|
3971
4203
|
}
|
|
4204
|
+
if (!this.adDetectSentForCurrentBreak) {
|
|
4205
|
+
this.adDetectSentForCurrentBreak = true;
|
|
4206
|
+
var detectPayload = {};
|
|
4207
|
+
if (marker.durationSeconds != null) detectPayload.durationSeconds = marker.durationSeconds;
|
|
4208
|
+
if (marker.ptsSeconds != null) detectPayload.ptsSeconds = marker.ptsSeconds;
|
|
4209
|
+
sendAdDetectTracking(this.config.licenseKey, detectPayload).catch(function() {});
|
|
4210
|
+
}
|
|
3972
4211
|
var hasPrefetchedAds = this.pendingAdBreak && this.pendingAdBreak.vastUrls.length > 0;
|
|
3973
4212
|
this.inAdBreak = true;
|
|
3974
4213
|
var durationMs = marker.durationSeconds != null ? marker.durationSeconds * 1e3 : ((_this_pendingAdBreak = this.pendingAdBreak) === null || _this_pendingAdBreak === void 0 ? void 0 : _this_pendingAdBreak.marker.durationSeconds) != null ? this.pendingAdBreak.marker.durationSeconds * 1e3 : void 0;
|
|
@@ -4526,6 +4765,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4526
4765
|
isFetching: false,
|
|
4527
4766
|
fetchStartTime: Date.now()
|
|
4528
4767
|
});
|
|
4768
|
+
this.adDetectSentForCurrentBreak = true;
|
|
4769
|
+
var detectPayload = {};
|
|
4770
|
+
if (marker.durationSeconds != null) detectPayload.durationSeconds = marker.durationSeconds;
|
|
4771
|
+
if (marker.ptsSeconds != null) detectPayload.ptsSeconds = marker.ptsSeconds;
|
|
4772
|
+
if (fragmentSn !== void 0) detectPayload.detectedAtFragmentSn = fragmentSn;
|
|
4773
|
+
sendAdDetectTracking(this.config.licenseKey, detectPayload).catch(function() {});
|
|
4529
4774
|
if (this.config.debugAdTiming) {
|
|
4530
4775
|
console.log("[PREFETCH] \uD83D\uDD04 Starting ad prefetch for upcoming ad break");
|
|
4531
4776
|
console.log("[PREFETCH] \uD83D\uDCCB Pre-generated ".concat(generatedUrls.length, " VAST URLs"));
|
|
@@ -5001,6 +5246,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5001
5246
|
firstAdUrl = preloaded.vastUrl;
|
|
5002
5247
|
preloadedController = preloaded.imaController;
|
|
5003
5248
|
usePreloadedAd = true;
|
|
5249
|
+
sendAdLoadedTracking(this.config.licenseKey, {
|
|
5250
|
+
source: "preload",
|
|
5251
|
+
vastUrl: firstAdUrl
|
|
5252
|
+
}, this.config.adPlayerType).catch(function() {});
|
|
5004
5253
|
if (this.config.debugAdTiming) {
|
|
5005
5254
|
console.log("[CONTINUOUS-FETCH] \uD83D\uDE80 Using preloaded ad from pool (preloaded in advance, ready immediately!)");
|
|
5006
5255
|
console.log("[CONTINUOUS-FETCH] Pool still has ".concat(this.preloadPool.length, " preloaded ads ready"));
|
|
@@ -5090,6 +5339,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5090
5339
|
];
|
|
5091
5340
|
case 5:
|
|
5092
5341
|
_state.sent();
|
|
5342
|
+
sendAdLoadedTracking(this.config.licenseKey, {
|
|
5343
|
+
source: "ssp",
|
|
5344
|
+
vastUrl: firstAdUrl
|
|
5345
|
+
}, this.config.adPlayerType).catch(function() {});
|
|
5093
5346
|
if (this.config.debugAdTiming) {
|
|
5094
5347
|
console.log("[CONTINUOUS-FETCH] \u2705 First ad request successful, starting playback");
|
|
5095
5348
|
}
|
|
@@ -5486,6 +5739,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5486
5739
|
if (this.config.debugAdTiming) {
|
|
5487
5740
|
console.log("[CONTINUOUS-FETCH] \uD83C\uDFAF Using preloaded ad from pool (".concat(this.preloadPool.length, " remaining in pool)"));
|
|
5488
5741
|
}
|
|
5742
|
+
sendAdLoadedTracking(this.config.licenseKey, {
|
|
5743
|
+
source: "preload",
|
|
5744
|
+
vastUrl: preloaded.vastUrl
|
|
5745
|
+
}, this.config.adPlayerType).catch(function() {});
|
|
5489
5746
|
_state.label = 1;
|
|
5490
5747
|
case 1:
|
|
5491
5748
|
_state.trys.push([
|
|
@@ -6190,6 +6447,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
6190
6447
|
];
|
|
6191
6448
|
case 3:
|
|
6192
6449
|
_state.sent();
|
|
6450
|
+
sendAdLoadedTracking(this.config.licenseKey, {
|
|
6451
|
+
source: "ssp",
|
|
6452
|
+
vastUrl: vastTagUrl
|
|
6453
|
+
}, this.config.adPlayerType).catch(function() {});
|
|
6193
6454
|
this.clearAdRequestWatchdog();
|
|
6194
6455
|
if (this.activeAdRequestToken !== requestToken) {
|
|
6195
6456
|
return [
|
|
@@ -6404,6 +6665,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
6404
6665
|
}
|
|
6405
6666
|
this.adRequestQueue = [];
|
|
6406
6667
|
this.inAdBreak = false;
|
|
6668
|
+
this.adDetectSentForCurrentBreak = false;
|
|
6407
6669
|
this.expectedAdBreakDurationMs = void 0;
|
|
6408
6670
|
this.currentAdBreakStartWallClockMs = void 0;
|
|
6409
6671
|
this.clearAdStartTimer();
|
|
@@ -6843,6 +7105,7 @@ var CRITICAL_PROPS = [
|
|
|
6843
7105
|
"driftToleranceMs",
|
|
6844
7106
|
"vastMode"
|
|
6845
7107
|
];
|
|
7108
|
+
var CONTROLS_HIDE_DELAY = 3e3;
|
|
6846
7109
|
var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
6847
7110
|
var src = props.src, autoplay = props.autoplay, muted = props.muted, lowLatencyMode = props.lowLatencyMode, allowNativeHls = props.allowNativeHls, driftToleranceMs = props.driftToleranceMs, immediateManifestAds = props.immediateManifestAds, debugAdTiming = props.debugAdTiming, showCustomControls = props.showCustomControls, hideLoadingIndicator = props.hideLoadingIndicator, onVolumeToggle = props.onVolumeToggle, onFullscreenToggle = props.onFullscreenToggle, onControlClick = props.onControlClick, onReady = props.onReady, wrapperClassName = props.wrapperClassName, wrapperStyle = props.wrapperStyle, className = props.className, style = props.style, controls = props.controls, playsInline = props.playsInline, preload = props.preload, poster = props.poster, children = props.children, licenseKey = props.licenseKey, vastMode = props.vastMode, vastTagUrl = props.vastTagUrl, adPlayerType = props.adPlayerType, minSegmentsBeforePlay = props.minSegmentsBeforePlay, restVideoAttrs = _object_without_properties(props, [
|
|
6848
7111
|
"src",
|
|
@@ -6877,6 +7140,8 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
6877
7140
|
var videoRef = (0, import_react.useRef)(null);
|
|
6878
7141
|
var playerRef = (0, import_react.useRef)(null);
|
|
6879
7142
|
var bufferingTimeoutRef = (0, import_react.useRef)(null);
|
|
7143
|
+
var controlsTimerRef = (0, import_react.useRef)(null);
|
|
7144
|
+
var wrapperRef = (0, import_react.useRef)(null);
|
|
6880
7145
|
var _import_react_default_useState = _sliced_to_array(import_react.default.useState({
|
|
6881
7146
|
showAds: false,
|
|
6882
7147
|
currentIndex: 0,
|
|
@@ -6896,8 +7161,9 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
6896
7161
|
var _import_react_default_useState12 = _sliced_to_array(import_react.default.useState(false), 2), isBuffering = _import_react_default_useState12[0], setIsBuffering = _import_react_default_useState12[1];
|
|
6897
7162
|
var _import_react_default_useState13 = _sliced_to_array(import_react.default.useState(false), 2), showCenterPlay = _import_react_default_useState13[0], setShowCenterPlay = _import_react_default_useState13[1];
|
|
6898
7163
|
var _import_react_default_useState14 = _sliced_to_array(import_react.default.useState(false), 2), showLicenseWarning = _import_react_default_useState14[0], setShowLicenseWarning = _import_react_default_useState14[1];
|
|
6899
|
-
var _import_react_default_useState15 = _sliced_to_array(import_react.default.useState(
|
|
6900
|
-
var _import_react_default_useState16 = _sliced_to_array(import_react.default.useState(typeof window !== "undefined" ? window.
|
|
7164
|
+
var _import_react_default_useState15 = _sliced_to_array(import_react.default.useState(true), 2), controlsVisible = _import_react_default_useState15[0], setControlsVisible = _import_react_default_useState15[1];
|
|
7165
|
+
var _import_react_default_useState16 = _sliced_to_array(import_react.default.useState(typeof window !== "undefined" ? window.innerWidth : 1920), 2), viewportWidth = _import_react_default_useState16[0], setViewportWidth = _import_react_default_useState16[1];
|
|
7166
|
+
var _import_react_default_useState17 = _sliced_to_array(import_react.default.useState(typeof window !== "undefined" ? window.innerHeight > window.innerWidth : false), 2), isPortrait = _import_react_default_useState17[0], setIsPortrait = _import_react_default_useState17[1];
|
|
6901
7167
|
var getResponsiveScale = function getResponsiveScale() {
|
|
6902
7168
|
if (viewportWidth < 480) return 0.7;
|
|
6903
7169
|
if (viewportWidth < 768) return 0.8;
|
|
@@ -6905,6 +7171,33 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
6905
7171
|
return 1;
|
|
6906
7172
|
};
|
|
6907
7173
|
var responsiveScale = getResponsiveScale();
|
|
7174
|
+
var resetControlsTimer = (0, import_react.useCallback)(function() {
|
|
7175
|
+
if (controlsTimerRef.current) {
|
|
7176
|
+
clearTimeout(controlsTimerRef.current);
|
|
7177
|
+
}
|
|
7178
|
+
setControlsVisible(true);
|
|
7179
|
+
controlsTimerRef.current = window.setTimeout(function() {
|
|
7180
|
+
if (!showVolumeSlider && !showSpeedMenu) {
|
|
7181
|
+
setControlsVisible(false);
|
|
7182
|
+
}
|
|
7183
|
+
}, CONTROLS_HIDE_DELAY);
|
|
7184
|
+
}, [
|
|
7185
|
+
showVolumeSlider,
|
|
7186
|
+
showSpeedMenu
|
|
7187
|
+
]);
|
|
7188
|
+
var handleWrapperMouseMove = (0, import_react.useCallback)(function() {
|
|
7189
|
+
resetControlsTimer();
|
|
7190
|
+
}, [
|
|
7191
|
+
resetControlsTimer
|
|
7192
|
+
]);
|
|
7193
|
+
var handleWrapperMouseLeave = (0, import_react.useCallback)(function() {
|
|
7194
|
+
if (!showVolumeSlider && !showSpeedMenu) {
|
|
7195
|
+
setControlsVisible(false);
|
|
7196
|
+
}
|
|
7197
|
+
}, [
|
|
7198
|
+
showVolumeSlider,
|
|
7199
|
+
showSpeedMenu
|
|
7200
|
+
]);
|
|
6908
7201
|
var formatTime = function formatTime(seconds) {
|
|
6909
7202
|
if (!isFinite(seconds)) return "0:00:00";
|
|
6910
7203
|
var hours = Math.floor(seconds / 3600);
|
|
@@ -6930,6 +7223,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
6930
7223
|
setShowCenterPlay(true);
|
|
6931
7224
|
}
|
|
6932
7225
|
}
|
|
7226
|
+
resetControlsTimer();
|
|
6933
7227
|
};
|
|
6934
7228
|
var handleCenterPlayClick = function handleCenterPlayClick() {
|
|
6935
7229
|
if (videoRef.current && videoRef.current.paused) {
|
|
@@ -6955,6 +7249,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
6955
7249
|
videoRef.current.currentTime = newTime;
|
|
6956
7250
|
}
|
|
6957
7251
|
}
|
|
7252
|
+
resetControlsTimer();
|
|
6958
7253
|
};
|
|
6959
7254
|
var handleVolumeChange = function handleVolumeChange(newVolume) {
|
|
6960
7255
|
if (playerRef.current && isFinite(newVolume)) {
|
|
@@ -7110,7 +7405,6 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7110
7405
|
(0, import_react.useEffect)(function() {
|
|
7111
7406
|
if (!playerRef.current || !videoRef.current) return;
|
|
7112
7407
|
var updateStates = function updateStates() {
|
|
7113
|
-
var _videoRef_current;
|
|
7114
7408
|
if (playerRef.current && videoRef.current) {
|
|
7115
7409
|
setIsMuted(playerRef.current.isMuted());
|
|
7116
7410
|
setIsPlaying(!videoRef.current.paused);
|
|
@@ -7123,12 +7417,11 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7123
7417
|
var rateValue = videoRef.current.playbackRate;
|
|
7124
7418
|
setPlaybackRate(isFinite(rateValue) && rateValue > 0 ? rateValue : 1);
|
|
7125
7419
|
}
|
|
7126
|
-
setIsFullscreen(document.fullscreenElement ===
|
|
7420
|
+
setIsFullscreen(document.fullscreenElement === wrapperRef.current);
|
|
7127
7421
|
};
|
|
7128
7422
|
var interval = setInterval(updateStates, 200);
|
|
7129
7423
|
var handleFullscreenChange = function handleFullscreenChange() {
|
|
7130
|
-
|
|
7131
|
-
setIsFullscreen(document.fullscreenElement === ((_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.parentElement));
|
|
7424
|
+
setIsFullscreen(document.fullscreenElement === wrapperRef.current);
|
|
7132
7425
|
};
|
|
7133
7426
|
document.addEventListener("fullscreenchange", handleFullscreenChange);
|
|
7134
7427
|
return function() {
|
|
@@ -7256,13 +7549,25 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7256
7549
|
}, [
|
|
7257
7550
|
debugAdTiming
|
|
7258
7551
|
]);
|
|
7552
|
+
(0, import_react.useEffect)(function() {
|
|
7553
|
+
return function() {
|
|
7554
|
+
if (controlsTimerRef.current) {
|
|
7555
|
+
clearTimeout(controlsTimerRef.current);
|
|
7556
|
+
}
|
|
7557
|
+
};
|
|
7558
|
+
}, []);
|
|
7559
|
+
var progressPercent = duration > 0 ? currentTime / duration * 100 : 0;
|
|
7560
|
+
var VolumeIcon = isMuted || volume === 0 ? import_fa.FaVolumeMute : volume < 0.5 ? import_fa.FaVolumeDown : import_fa.FaVolumeUp;
|
|
7259
7561
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
7260
7562
|
children: [
|
|
7261
7563
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
|
|
7262
|
-
children: "\n @keyframes spin {\n from {
|
|
7564
|
+
children: "\n @keyframes sc-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n @keyframes sc-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.6; }\n }\n @keyframes sc-fade-in {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: translateY(0); }\n }\n .sc-wrapper:fullscreen,\n .sc-wrapper:has(*:fullscreen) {\n border-radius: 0 !important;\n box-shadow: none !important;\n width: 100vw !important;\n height: 100vh !important;\n max-width: 100vw !important;\n max-height: 100vh !important;\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n z-index: 999999 !important;\n background: #000 !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n }\n .sc-ctrl-btn {\n background: none;\n border: none;\n color: #fff;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n padding: 8px;\n transition: background 0.15s ease, opacity 0.15s ease;\n opacity: 0.9;\n }\n .sc-ctrl-btn:hover {\n opacity: 1;\n background: rgba(255, 255, 255, 0.1);\n }\n .sc-ctrl-btn:active {\n opacity: 0.7;\n }\n .sc-controls-bar {\n transition: opacity 0.35s ease, transform 0.35s ease;\n }\n .sc-progress-track:hover .sc-progress-thumb {\n transform: translate(-50%, -50%) scale(1) !important;\n }\n .sc-loading-hidden .sc-loading-indicator {\n display: none !important;\n }\n "
|
|
7263
7565
|
}),
|
|
7264
7566
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7265
|
-
|
|
7567
|
+
ref: wrapperRef,
|
|
7568
|
+
className: "sc-wrapper ".concat(wrapperClassName || ""),
|
|
7569
|
+
onMouseMove: handleWrapperMouseMove,
|
|
7570
|
+
onMouseLeave: handleWrapperMouseLeave,
|
|
7266
7571
|
style: _object_spread({
|
|
7267
7572
|
display: "flex",
|
|
7268
7573
|
alignItems: "center",
|
|
@@ -7277,7 +7582,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7277
7582
|
maxWidth: isFullscreen ? "100vw" : "100%",
|
|
7278
7583
|
maxHeight: isFullscreen ? "100vh" : "none",
|
|
7279
7584
|
zIndex: isFullscreen ? 999999 : void 0,
|
|
7280
|
-
backgroundColor:
|
|
7585
|
+
backgroundColor: "#000",
|
|
7281
7586
|
borderRadius: isFullscreen ? 0 : void 0,
|
|
7282
7587
|
boxShadow: isFullscreen ? "none" : void 0
|
|
7283
7588
|
}, wrapperStyle),
|
|
@@ -7303,16 +7608,16 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7303
7608
|
children: children
|
|
7304
7609
|
})),
|
|
7305
7610
|
(isLoading || isBuffering) && !hideLoadingIndicator && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaSpinner, {
|
|
7306
|
-
className: "
|
|
7307
|
-
size:
|
|
7308
|
-
color: "
|
|
7611
|
+
className: "sc-loading-indicator",
|
|
7612
|
+
size: 40,
|
|
7613
|
+
color: "rgba(255, 255, 255, 0.85)",
|
|
7309
7614
|
style: {
|
|
7310
7615
|
position: "absolute",
|
|
7311
|
-
top: "calc(50% -
|
|
7312
|
-
left: "calc(50% -
|
|
7616
|
+
top: "calc(50% - 20px)",
|
|
7617
|
+
left: "calc(50% - 20px)",
|
|
7313
7618
|
zIndex: 20,
|
|
7314
|
-
animation: "spin
|
|
7315
|
-
filter: "drop-shadow(0
|
|
7619
|
+
animation: "sc-spin 0.9s linear infinite",
|
|
7620
|
+
filter: "drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6))"
|
|
7316
7621
|
}
|
|
7317
7622
|
}),
|
|
7318
7623
|
showLicenseWarning && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -7322,13 +7627,13 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7322
7627
|
left: "50%",
|
|
7323
7628
|
transform: "translate(-50%, -50%)",
|
|
7324
7629
|
zIndex: 25,
|
|
7325
|
-
background: "
|
|
7630
|
+
background: "rgba(220, 38, 38, 0.92)",
|
|
7631
|
+
backdropFilter: "blur(24px)",
|
|
7326
7632
|
color: "white",
|
|
7327
|
-
padding: "
|
|
7328
|
-
borderRadius: "
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
boxShadow: "0 20px 60px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.2)",
|
|
7633
|
+
padding: "28px 36px",
|
|
7634
|
+
borderRadius: "14px",
|
|
7635
|
+
border: "1px solid rgba(255, 255, 255, 0.15)",
|
|
7636
|
+
boxShadow: "0 24px 64px rgba(0, 0, 0, 0.5)",
|
|
7332
7637
|
textAlign: "center",
|
|
7333
7638
|
maxWidth: "400px",
|
|
7334
7639
|
margin: "0 16px"
|
|
@@ -7336,20 +7641,18 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7336
7641
|
children: [
|
|
7337
7642
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7338
7643
|
style: {
|
|
7339
|
-
fontSize: "
|
|
7340
|
-
fontWeight: "
|
|
7341
|
-
marginBottom: "
|
|
7342
|
-
|
|
7343
|
-
textShadow: "0 2px 4px rgba(0, 0, 0, 0.5)"
|
|
7644
|
+
fontSize: "18px",
|
|
7645
|
+
fontWeight: "700",
|
|
7646
|
+
marginBottom: "10px",
|
|
7647
|
+
letterSpacing: "-0.02em"
|
|
7344
7648
|
},
|
|
7345
7649
|
children: "License Key Required"
|
|
7346
7650
|
}),
|
|
7347
7651
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7348
7652
|
style: {
|
|
7349
|
-
fontSize: "
|
|
7350
|
-
lineHeight: "1.
|
|
7351
|
-
color: "rgba(255, 255, 255, 0.
|
|
7352
|
-
textShadow: "0 1px 2px rgba(0, 0, 0, 0.3)"
|
|
7653
|
+
fontSize: "13px",
|
|
7654
|
+
lineHeight: "1.6",
|
|
7655
|
+
color: "rgba(255, 255, 255, 0.85)"
|
|
7353
7656
|
},
|
|
7354
7657
|
children: [
|
|
7355
7658
|
"Please provide a valid license key to use the Stormcloud Video Player.",
|
|
@@ -7368,573 +7671,419 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7368
7671
|
transform: "translate(-50%, -50%)",
|
|
7369
7672
|
zIndex: 15,
|
|
7370
7673
|
cursor: "pointer",
|
|
7371
|
-
background: "
|
|
7674
|
+
background: "rgba(0, 0, 0, 0.55)",
|
|
7675
|
+
backdropFilter: "blur(8px)",
|
|
7372
7676
|
borderRadius: "50%",
|
|
7373
|
-
width: "
|
|
7374
|
-
height: "
|
|
7677
|
+
width: "".concat(92 * responsiveScale, "px"),
|
|
7678
|
+
height: "".concat(92 * responsiveScale, "px"),
|
|
7375
7679
|
display: "flex",
|
|
7376
7680
|
alignItems: "center",
|
|
7377
7681
|
justifyContent: "center",
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
boxShadow: "0 12px 40px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.3)",
|
|
7381
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
7682
|
+
transition: "background 0.2s ease, transform 0.2s ease",
|
|
7683
|
+
animation: "sc-fade-in 0.2s ease"
|
|
7382
7684
|
},
|
|
7383
7685
|
onMouseEnter: function onMouseEnter(e) {
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(40, 40, 40, 0.9) 100%)";
|
|
7387
|
-
target.style.boxShadow = "0 16px 48px rgba(0, 0, 0, 0.9), inset 0 2px 0 rgba(255, 255, 255, 0.4)";
|
|
7388
|
-
target.style.borderColor = "rgba(255, 255, 255, 0.9)";
|
|
7686
|
+
e.currentTarget.style.background = "rgba(0, 0, 0, 0.72)";
|
|
7687
|
+
e.currentTarget.style.transform = "translate(-50%, -50%) scale(1.06)";
|
|
7389
7688
|
},
|
|
7390
7689
|
onMouseLeave: function onMouseLeave(e) {
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.8) 100%)";
|
|
7394
|
-
target.style.boxShadow = "0 12px 40px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.3)";
|
|
7395
|
-
target.style.borderColor = "rgba(255, 255, 255, 0.8)";
|
|
7690
|
+
e.currentTarget.style.background = "rgba(0, 0, 0, 0.55)";
|
|
7691
|
+
e.currentTarget.style.transform = "translate(-50%, -50%) scale(1)";
|
|
7396
7692
|
},
|
|
7397
7693
|
title: "Play",
|
|
7398
7694
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaPlay, {
|
|
7399
|
-
size:
|
|
7695
|
+
size: Math.max(24, 32 * responsiveScale),
|
|
7400
7696
|
color: "white",
|
|
7401
7697
|
style: {
|
|
7402
|
-
marginLeft: "
|
|
7403
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))"
|
|
7698
|
+
marginLeft: "4px"
|
|
7404
7699
|
}
|
|
7405
7700
|
})
|
|
7406
7701
|
}),
|
|
7407
|
-
shouldShowEnhancedControls && !showLicenseWarning ? /* @__PURE__ */ (0, import_jsx_runtime.
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7702
|
+
shouldShowEnhancedControls && !showLicenseWarning ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7703
|
+
className: "sc-controls-bar",
|
|
7704
|
+
style: {
|
|
7705
|
+
position: "absolute",
|
|
7706
|
+
bottom: 0,
|
|
7707
|
+
left: 0,
|
|
7708
|
+
right: 0,
|
|
7709
|
+
background: "linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%)",
|
|
7710
|
+
padding: "".concat(20 * responsiveScale, "px ").concat(12 * responsiveScale, "px ").concat(8 * responsiveScale, "px"),
|
|
7711
|
+
zIndex: 10,
|
|
7712
|
+
opacity: controlsVisible || adStatus.showAds ? 1 : 0,
|
|
7713
|
+
transform: controlsVisible || adStatus.showAds ? "translateY(0)" : "translateY(6px)",
|
|
7714
|
+
pointerEvents: controlsVisible || adStatus.showAds ? "auto" : "none"
|
|
7715
|
+
},
|
|
7716
|
+
children: [
|
|
7717
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7718
|
+
className: "sc-progress-track",
|
|
7719
|
+
style: {
|
|
7720
|
+
width: "100%",
|
|
7721
|
+
height: "3px",
|
|
7722
|
+
background: "rgba(255, 255, 255, 0.2)",
|
|
7723
|
+
borderRadius: "1.5px",
|
|
7724
|
+
marginBottom: "".concat(8 * responsiveScale, "px"),
|
|
7725
|
+
cursor: "pointer",
|
|
7726
|
+
position: "relative",
|
|
7727
|
+
transition: "height 0.1s ease"
|
|
7728
|
+
},
|
|
7729
|
+
onClick: handleTimelineSeek,
|
|
7730
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
7731
|
+
e.currentTarget.style.height = "5px";
|
|
7732
|
+
},
|
|
7733
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
7734
|
+
e.currentTarget.style.height = "3px";
|
|
7735
|
+
},
|
|
7736
|
+
children: [
|
|
7737
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7738
|
+
style: {
|
|
7739
|
+
position: "absolute",
|
|
7740
|
+
top: 0,
|
|
7741
|
+
left: 0,
|
|
7742
|
+
bottom: 0,
|
|
7743
|
+
background: adStatus.showAds ? "#f5c518" : "#ff0000",
|
|
7744
|
+
borderRadius: "1.5px",
|
|
7745
|
+
width: "".concat(progressPercent, "%"),
|
|
7746
|
+
transition: "width 0.15s linear"
|
|
7747
|
+
}
|
|
7748
|
+
}),
|
|
7749
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7750
|
+
className: "sc-progress-thumb",
|
|
7751
|
+
style: {
|
|
7752
|
+
position: "absolute",
|
|
7753
|
+
top: "50%",
|
|
7754
|
+
left: "".concat(progressPercent, "%"),
|
|
7755
|
+
transform: "translate(-50%, -50%) scale(0)",
|
|
7756
|
+
width: "13px",
|
|
7757
|
+
height: "13px",
|
|
7758
|
+
background: adStatus.showAds ? "#f5c518" : "#ff0000",
|
|
7759
|
+
borderRadius: "50%",
|
|
7760
|
+
boxShadow: "0 0 4px rgba(0, 0, 0, 0.3)",
|
|
7761
|
+
transition: "transform 0.1s ease, left 0.15s linear"
|
|
7762
|
+
}
|
|
7763
|
+
})
|
|
7764
|
+
]
|
|
7765
|
+
}),
|
|
7766
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7767
|
+
style: {
|
|
7768
|
+
display: "flex",
|
|
7769
|
+
alignItems: "center",
|
|
7770
|
+
justifyContent: "space-between",
|
|
7771
|
+
color: "white",
|
|
7772
|
+
gap: "".concat(8 * responsiveScale, "px")
|
|
7773
|
+
},
|
|
7774
|
+
children: [
|
|
7775
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7776
|
+
style: {
|
|
7777
|
+
display: "flex",
|
|
7778
|
+
alignItems: "center",
|
|
7779
|
+
gap: "".concat(8 * responsiveScale, "px")
|
|
7780
|
+
},
|
|
7781
|
+
children: [
|
|
7782
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
7783
|
+
className: "sc-ctrl-btn",
|
|
7784
|
+
onClick: handlePlayPause,
|
|
7785
|
+
style: {
|
|
7786
|
+
padding: "".concat(8 * responsiveScale, "px"),
|
|
7787
|
+
borderRadius: "50%",
|
|
7788
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
7789
|
+
minHeight: "".concat(36 * responsiveScale, "px")
|
|
7790
|
+
},
|
|
7791
|
+
title: isPlaying ? "Pause" : "Play",
|
|
7792
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaPause, {
|
|
7793
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
7794
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaPlay, {
|
|
7795
|
+
size: Math.max(14, 18 * responsiveScale),
|
|
7481
7796
|
style: {
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
target.style.boxShadow = "0 8px 32px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3)";
|
|
7506
|
-
},
|
|
7507
|
-
title: isPlaying ? "Pause" : "Play",
|
|
7508
|
-
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaPause, {
|
|
7509
|
-
size: Math.max(16, 20 * responsiveScale),
|
|
7797
|
+
marginLeft: "2px"
|
|
7798
|
+
}
|
|
7799
|
+
})
|
|
7800
|
+
}),
|
|
7801
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7802
|
+
style: {
|
|
7803
|
+
display: "flex",
|
|
7804
|
+
alignItems: "center"
|
|
7805
|
+
},
|
|
7806
|
+
onMouseEnter: function onMouseEnter() {
|
|
7807
|
+
return setShowVolumeSlider(true);
|
|
7808
|
+
},
|
|
7809
|
+
onMouseLeave: function onMouseLeave() {
|
|
7810
|
+
return setShowVolumeSlider(false);
|
|
7811
|
+
},
|
|
7812
|
+
children: [
|
|
7813
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
7814
|
+
className: "sc-ctrl-btn",
|
|
7815
|
+
onClick: function onClick() {
|
|
7816
|
+
if (playerRef.current) playerRef.current.toggleMute();
|
|
7817
|
+
onVolumeToggle === null || onVolumeToggle === void 0 ? void 0 : onVolumeToggle();
|
|
7818
|
+
resetControlsTimer();
|
|
7819
|
+
},
|
|
7510
7820
|
style: {
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7821
|
+
padding: "".concat(8 * responsiveScale, "px"),
|
|
7822
|
+
borderRadius: "50%",
|
|
7823
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
7824
|
+
minHeight: "".concat(36 * responsiveScale, "px")
|
|
7825
|
+
},
|
|
7826
|
+
title: isMuted ? "Unmute" : "Mute",
|
|
7827
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VolumeIcon, {
|
|
7828
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
7829
|
+
})
|
|
7830
|
+
}),
|
|
7831
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7515
7832
|
style: {
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
padding: "8px",
|
|
7526
|
-
margin: "-8px"
|
|
7527
|
-
},
|
|
7528
|
-
onMouseEnter: function onMouseEnter() {
|
|
7529
|
-
return setShowVolumeSlider(true);
|
|
7530
|
-
},
|
|
7531
|
-
onMouseLeave: function onMouseLeave() {
|
|
7532
|
-
return setShowVolumeSlider(false);
|
|
7533
|
-
},
|
|
7534
|
-
children: [
|
|
7535
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
7536
|
-
onClick: function onClick() {
|
|
7537
|
-
if (playerRef.current) {
|
|
7538
|
-
playerRef.current.toggleMute();
|
|
7539
|
-
}
|
|
7540
|
-
if (onVolumeToggle) {
|
|
7541
|
-
onVolumeToggle();
|
|
7542
|
-
}
|
|
7543
|
-
},
|
|
7833
|
+
width: showVolumeSlider ? "".concat(62 * responsiveScale, "px") : "0px",
|
|
7834
|
+
overflow: "hidden",
|
|
7835
|
+
transition: "width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7836
|
+
display: "flex",
|
|
7837
|
+
alignItems: "center",
|
|
7838
|
+
paddingLeft: showVolumeSlider ? "2px" : "0",
|
|
7839
|
+
paddingRight: showVolumeSlider ? "4px" : "0"
|
|
7840
|
+
},
|
|
7841
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7544
7842
|
style: {
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
color: "#ffffff",
|
|
7843
|
+
position: "relative",
|
|
7844
|
+
width: "".concat(56 * responsiveScale, "px"),
|
|
7845
|
+
height: "3px",
|
|
7549
7846
|
cursor: "pointer",
|
|
7550
|
-
|
|
7551
|
-
borderRadius: "".concat(16 * responsiveScale, "px"),
|
|
7552
|
-
display: "flex",
|
|
7553
|
-
alignItems: "center",
|
|
7554
|
-
justifyContent: "center",
|
|
7555
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7556
|
-
boxShadow: "0 6px 28px rgba(0, 0, 0, 0.4), 0 3px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25)",
|
|
7557
|
-
minWidth: "".concat(44 * responsiveScale, "px"),
|
|
7558
|
-
minHeight: "".concat(44 * responsiveScale, "px")
|
|
7847
|
+
borderRadius: "1.5px"
|
|
7559
7848
|
},
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7849
|
+
onMouseDown: function onMouseDown(e) {
|
|
7850
|
+
e.preventDefault();
|
|
7851
|
+
var el = e.currentTarget;
|
|
7852
|
+
var move = function move(ev) {
|
|
7853
|
+
var r2 = el.getBoundingClientRect();
|
|
7854
|
+
handleVolumeChange(Math.max(0, Math.min(1, (ev.clientX - r2.left) / r2.width)));
|
|
7855
|
+
};
|
|
7856
|
+
var up = function up1() {
|
|
7857
|
+
document.removeEventListener("mousemove", move);
|
|
7858
|
+
document.removeEventListener("mouseup", up);
|
|
7859
|
+
};
|
|
7860
|
+
document.addEventListener("mousemove", move);
|
|
7861
|
+
document.addEventListener("mouseup", up);
|
|
7862
|
+
var r = el.getBoundingClientRect();
|
|
7863
|
+
handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
|
|
7564
7864
|
},
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7865
|
+
onClick: function onClick(e) {
|
|
7866
|
+
e.stopPropagation();
|
|
7867
|
+
var r = e.currentTarget.getBoundingClientRect();
|
|
7868
|
+
handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
|
|
7569
7869
|
},
|
|
7570
|
-
title: isMuted ? "Unmute" : "Mute",
|
|
7571
|
-
children: isMuted || volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaVolumeMute, {
|
|
7572
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7573
|
-
style: {
|
|
7574
|
-
filter: "drop-shadow(0 0 0 transparent)"
|
|
7575
|
-
}
|
|
7576
|
-
}) : volume < 0.5 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaVolumeDown, {
|
|
7577
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7578
|
-
style: {
|
|
7579
|
-
filter: "drop-shadow(0 0 0 transparent)"
|
|
7580
|
-
}
|
|
7581
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaVolumeUp, {
|
|
7582
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7583
|
-
style: {
|
|
7584
|
-
filter: "drop-shadow(0 0 0 transparent)"
|
|
7585
|
-
}
|
|
7586
|
-
})
|
|
7587
|
-
}),
|
|
7588
|
-
showVolumeSlider && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
7589
7870
|
children: [
|
|
7590
7871
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7591
7872
|
style: {
|
|
7592
7873
|
position: "absolute",
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7874
|
+
inset: 0,
|
|
7875
|
+
background: "rgba(255, 255, 255, 0.2)",
|
|
7876
|
+
borderRadius: "1.5px"
|
|
7877
|
+
}
|
|
7878
|
+
}),
|
|
7879
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7880
|
+
style: {
|
|
7881
|
+
position: "absolute",
|
|
7882
|
+
top: 0,
|
|
7883
|
+
left: 0,
|
|
7884
|
+
bottom: 0,
|
|
7885
|
+
width: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
7886
|
+
background: "#fff",
|
|
7887
|
+
borderRadius: "1.5px",
|
|
7888
|
+
transition: "width 0.1s ease-out"
|
|
7606
7889
|
}
|
|
7607
7890
|
}),
|
|
7608
7891
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7609
7892
|
style: {
|
|
7610
7893
|
position: "absolute",
|
|
7611
|
-
|
|
7612
|
-
left: "
|
|
7613
|
-
transform: "
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
flexDirection: "column",
|
|
7622
|
-
alignItems: "center",
|
|
7623
|
-
justifyContent: "center",
|
|
7624
|
-
height: "128px",
|
|
7625
|
-
boxShadow: "0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15)",
|
|
7626
|
-
zIndex: 10,
|
|
7627
|
-
transition: "transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out"
|
|
7628
|
-
},
|
|
7629
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7630
|
-
setShowVolumeSlider(true);
|
|
7631
|
-
e.currentTarget.style.boxShadow = "0 16px 48px rgba(0, 0, 0, 0.6), 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 24px rgba(59, 130, 246, 0.3)";
|
|
7632
|
-
e.currentTarget.style.borderColor = "rgba(59, 130, 246, 0.4)";
|
|
7633
|
-
},
|
|
7634
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7635
|
-
setShowVolumeSlider(false);
|
|
7636
|
-
e.currentTarget.style.boxShadow = "0 12px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15)";
|
|
7637
|
-
e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.15)";
|
|
7638
|
-
},
|
|
7639
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7640
|
-
style: {
|
|
7641
|
-
position: "relative",
|
|
7642
|
-
width: "8px",
|
|
7643
|
-
height: "104px",
|
|
7644
|
-
cursor: "pointer",
|
|
7645
|
-
transition: "transform 0.2s ease-in-out"
|
|
7646
|
-
},
|
|
7647
|
-
onMouseEnter: function onMouseEnter(e) {},
|
|
7648
|
-
onMouseLeave: function onMouseLeave(e) {},
|
|
7649
|
-
onMouseDown: function onMouseDown(e) {
|
|
7650
|
-
e.preventDefault();
|
|
7651
|
-
var sliderElement = e.currentTarget;
|
|
7652
|
-
var handleMouseMove = function handleMouseMove(moveEvent) {
|
|
7653
|
-
if (!sliderElement) return;
|
|
7654
|
-
var rect2 = sliderElement.getBoundingClientRect();
|
|
7655
|
-
var y2 = moveEvent.clientY - rect2.top;
|
|
7656
|
-
var percentage2 = 1 - Math.max(0, Math.min(1, y2 / rect2.height));
|
|
7657
|
-
handleVolumeChange(percentage2);
|
|
7658
|
-
};
|
|
7659
|
-
var handleMouseUp = function handleMouseUp1() {
|
|
7660
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
7661
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
7662
|
-
};
|
|
7663
|
-
document.addEventListener("mousemove", handleMouseMove);
|
|
7664
|
-
document.addEventListener("mouseup", handleMouseUp);
|
|
7665
|
-
var rect = sliderElement.getBoundingClientRect();
|
|
7666
|
-
var y = e.clientY - rect.top;
|
|
7667
|
-
var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
|
|
7668
|
-
handleVolumeChange(percentage);
|
|
7669
|
-
},
|
|
7670
|
-
onClick: function onClick(e) {
|
|
7671
|
-
e.stopPropagation();
|
|
7672
|
-
var rect = e.currentTarget.getBoundingClientRect();
|
|
7673
|
-
var y = e.clientY - rect.top;
|
|
7674
|
-
var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
|
|
7675
|
-
handleVolumeChange(percentage);
|
|
7676
|
-
},
|
|
7677
|
-
children: [
|
|
7678
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7679
|
-
style: {
|
|
7680
|
-
position: "absolute",
|
|
7681
|
-
bottom: "0",
|
|
7682
|
-
left: "0",
|
|
7683
|
-
width: "100%",
|
|
7684
|
-
height: "100%",
|
|
7685
|
-
background: "linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.15) 100%)",
|
|
7686
|
-
borderRadius: "4px",
|
|
7687
|
-
boxShadow: "inset 0 1px 3px rgba(0, 0, 0, 0.2)"
|
|
7688
|
-
}
|
|
7689
|
-
}),
|
|
7690
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7691
|
-
style: {
|
|
7692
|
-
position: "absolute",
|
|
7693
|
-
bottom: "0",
|
|
7694
|
-
left: "0",
|
|
7695
|
-
width: "100%",
|
|
7696
|
-
height: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
7697
|
-
background: "linear-gradient(180deg, rgba(96, 165, 250, 1) 0%, rgba(59, 130, 246, 0.95) 50%, rgba(37, 99, 235, 0.9) 100%)",
|
|
7698
|
-
borderRadius: "4px",
|
|
7699
|
-
transition: "height 0.15s ease-out, box-shadow 0.2s ease-in-out",
|
|
7700
|
-
boxShadow: "0 0 8px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3)"
|
|
7701
|
-
}
|
|
7702
|
-
}),
|
|
7703
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7704
|
-
style: {
|
|
7705
|
-
position: "absolute",
|
|
7706
|
-
bottom: "calc(".concat((isMuted ? 0 : volume) * 100, "% - 7px)"),
|
|
7707
|
-
left: "50%",
|
|
7708
|
-
transform: "translateX(-50%)",
|
|
7709
|
-
width: "14px",
|
|
7710
|
-
height: "14px",
|
|
7711
|
-
background: "linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%)",
|
|
7712
|
-
borderRadius: "50%",
|
|
7713
|
-
boxShadow: "0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(59, 130, 246, 0.3), 0 0 12px rgba(59, 130, 246, 0.4)",
|
|
7714
|
-
transition: "bottom 0.15s ease-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out",
|
|
7715
|
-
cursor: "grab"
|
|
7716
|
-
},
|
|
7717
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7718
|
-
e.currentTarget.style.boxShadow = "0 3px 10px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.6)";
|
|
7719
|
-
e.currentTarget.style.cursor = "grab";
|
|
7720
|
-
},
|
|
7721
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7722
|
-
e.currentTarget.style.boxShadow = "0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(59, 130, 246, 0.3), 0 0 12px rgba(59, 130, 246, 0.4)";
|
|
7723
|
-
},
|
|
7724
|
-
onMouseDown: function onMouseDown(e) {
|
|
7725
|
-
e.currentTarget.style.cursor = "grabbing";
|
|
7726
|
-
},
|
|
7727
|
-
onMouseUp: function onMouseUp(e) {
|
|
7728
|
-
e.currentTarget.style.cursor = "grab";
|
|
7729
|
-
}
|
|
7730
|
-
})
|
|
7731
|
-
]
|
|
7732
|
-
})
|
|
7894
|
+
top: "50%",
|
|
7895
|
+
left: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
7896
|
+
transform: "translate(-50%, -50%)",
|
|
7897
|
+
width: "12px",
|
|
7898
|
+
height: "12px",
|
|
7899
|
+
background: "#fff",
|
|
7900
|
+
borderRadius: "50%",
|
|
7901
|
+
boxShadow: "0 0 3px rgba(0, 0, 0, 0.3)",
|
|
7902
|
+
transition: "left 0.1s ease-out"
|
|
7903
|
+
}
|
|
7733
7904
|
})
|
|
7734
7905
|
]
|
|
7735
7906
|
})
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7754
|
-
style: {
|
|
7755
|
-
display: "flex",
|
|
7756
|
-
alignItems: "center",
|
|
7757
|
-
gap: "".concat(12 * responsiveScale, "px")
|
|
7758
|
-
},
|
|
7759
|
-
children: [
|
|
7760
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7761
|
-
style: {
|
|
7762
|
-
position: "relative",
|
|
7763
|
-
display: viewportWidth < 600 ? "none" : "block"
|
|
7764
|
-
},
|
|
7765
|
-
children: [
|
|
7766
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
7767
|
-
onClick: function onClick() {
|
|
7768
|
-
return setShowSpeedMenu(!showSpeedMenu);
|
|
7769
|
-
},
|
|
7770
|
-
style: {
|
|
7771
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)",
|
|
7772
|
-
backdropFilter: "blur(10px)",
|
|
7773
|
-
border: "".concat(2 * responsiveScale, "px solid rgba(255, 255, 255, 0.3)"),
|
|
7774
|
-
color: "#ffffff",
|
|
7775
|
-
cursor: "pointer",
|
|
7776
|
-
padding: "".concat(8 * responsiveScale, "px ").concat(14 * responsiveScale, "px"),
|
|
7777
|
-
borderRadius: "".concat(14 * responsiveScale, "px"),
|
|
7778
|
-
fontSize: "".concat(14 * responsiveScale, "px"),
|
|
7779
|
-
fontFamily: "monospace",
|
|
7780
|
-
fontWeight: "700",
|
|
7781
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7782
|
-
boxShadow: "0 6px 24px rgba(0, 0, 0, 0.4), 0 3px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25)",
|
|
7783
|
-
minWidth: "".concat(56 * responsiveScale, "px"),
|
|
7784
|
-
minHeight: "".concat(40 * responsiveScale, "px")
|
|
7785
|
-
},
|
|
7786
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7787
|
-
var target = e.target;
|
|
7788
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
|
|
7789
|
-
target.style.boxShadow = "0 10px 32px rgba(0, 0, 0, 0.6), 0 5px 16px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.35)";
|
|
7790
|
-
},
|
|
7791
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7792
|
-
var target = e.target;
|
|
7793
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
|
|
7794
|
-
target.style.boxShadow = "0 6px 24px rgba(0, 0, 0, 0.4), 0 3px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25)";
|
|
7795
|
-
},
|
|
7796
|
-
title: "Playback Speed",
|
|
7797
|
-
children: [
|
|
7798
|
-
playbackRate,
|
|
7799
|
-
"x"
|
|
7800
|
-
]
|
|
7801
|
-
}),
|
|
7802
|
-
showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7803
|
-
style: {
|
|
7804
|
-
position: "absolute",
|
|
7805
|
-
bottom: "100%",
|
|
7806
|
-
right: 0,
|
|
7807
|
-
marginBottom: "12px",
|
|
7808
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%)",
|
|
7809
|
-
backdropFilter: "blur(20px)",
|
|
7810
|
-
borderRadius: "12px",
|
|
7811
|
-
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
7812
|
-
overflow: "hidden",
|
|
7813
|
-
minWidth: "90px",
|
|
7814
|
-
boxShadow: "0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1)"
|
|
7815
|
-
},
|
|
7816
|
-
children: [
|
|
7817
|
-
0.25,
|
|
7818
|
-
0.5,
|
|
7819
|
-
0.75,
|
|
7820
|
-
1,
|
|
7821
|
-
1.25,
|
|
7822
|
-
1.5,
|
|
7823
|
-
1.75,
|
|
7824
|
-
2
|
|
7825
|
-
].map(function(speed) {
|
|
7826
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
7827
|
-
onClick: function onClick() {
|
|
7828
|
-
return handlePlaybackRateChange(speed);
|
|
7829
|
-
},
|
|
7830
|
-
style: {
|
|
7831
|
-
display: "block",
|
|
7832
|
-
width: "100%",
|
|
7833
|
-
padding: "10px 16px",
|
|
7834
|
-
background: playbackRate === speed ? "linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(139, 92, 246, 0.6) 100%)" : "transparent",
|
|
7835
|
-
border: "none",
|
|
7836
|
-
color: "white",
|
|
7837
|
-
cursor: "pointer",
|
|
7838
|
-
fontSize: "13px",
|
|
7839
|
-
fontFamily: "monospace",
|
|
7840
|
-
fontWeight: "600",
|
|
7841
|
-
textAlign: "center",
|
|
7842
|
-
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7843
|
-
borderBottom: speed !== 2 ? "1px solid rgba(255, 255, 255, 0.05)" : "none"
|
|
7844
|
-
},
|
|
7845
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7846
|
-
if (playbackRate !== speed) {
|
|
7847
|
-
e.target.style.background = "linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%)";
|
|
7848
|
-
}
|
|
7849
|
-
},
|
|
7850
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7851
|
-
if (playbackRate !== speed) {
|
|
7852
|
-
e.target.style.background = "transparent";
|
|
7853
|
-
}
|
|
7854
|
-
},
|
|
7855
|
-
children: [
|
|
7856
|
-
speed,
|
|
7857
|
-
"x"
|
|
7858
|
-
]
|
|
7859
|
-
}, speed);
|
|
7860
|
-
})
|
|
7861
|
-
})
|
|
7862
|
-
]
|
|
7863
|
-
}),
|
|
7864
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
7865
|
-
onClick: function onClick() {
|
|
7866
|
-
if (onFullscreenToggle) {
|
|
7867
|
-
onFullscreenToggle();
|
|
7868
|
-
} else if (playerRef.current) {
|
|
7869
|
-
playerRef.current.toggleFullscreen().catch(function(err) {
|
|
7870
|
-
console.error("Fullscreen error:", err);
|
|
7871
|
-
});
|
|
7872
|
-
}
|
|
7873
|
-
},
|
|
7874
|
-
style: {
|
|
7875
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)",
|
|
7876
|
-
backdropFilter: "blur(10px)",
|
|
7877
|
-
border: "".concat(2 * responsiveScale, "px solid rgba(255, 255, 255, 0.3)"),
|
|
7878
|
-
color: "#ffffff",
|
|
7879
|
-
cursor: "pointer",
|
|
7880
|
-
padding: "".concat(8 * responsiveScale, "px"),
|
|
7881
|
-
borderRadius: "".concat(16 * responsiveScale, "px"),
|
|
7882
|
-
display: "flex",
|
|
7883
|
-
alignItems: "center",
|
|
7884
|
-
justifyContent: "center",
|
|
7885
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7886
|
-
boxShadow: "0 6px 28px rgba(0, 0, 0, 0.4), 0 3px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25)",
|
|
7887
|
-
minWidth: "".concat(44 * responsiveScale, "px"),
|
|
7888
|
-
minHeight: "".concat(44 * responsiveScale, "px")
|
|
7889
|
-
},
|
|
7890
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7891
|
-
var target = e.target;
|
|
7892
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
|
|
7893
|
-
target.style.boxShadow = "0 10px 36px rgba(0, 0, 0, 0.6), 0 5px 16px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.35)";
|
|
7894
|
-
},
|
|
7895
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7896
|
-
var target = e.target;
|
|
7897
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
|
|
7898
|
-
target.style.boxShadow = "0 6px 28px rgba(0, 0, 0, 0.4), 0 3px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25)";
|
|
7899
|
-
},
|
|
7900
|
-
title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
|
|
7901
|
-
children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaCompress, {
|
|
7902
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7907
|
+
})
|
|
7908
|
+
]
|
|
7909
|
+
}),
|
|
7910
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7911
|
+
style: {
|
|
7912
|
+
fontSize: "".concat(13 * responsiveScale, "px"),
|
|
7913
|
+
fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
|
|
7914
|
+
color: "rgba(255, 255, 255, 0.9)",
|
|
7915
|
+
display: viewportWidth < 480 ? "none" : "block",
|
|
7916
|
+
fontVariantNumeric: "tabular-nums",
|
|
7917
|
+
userSelect: "none",
|
|
7918
|
+
marginLeft: "".concat(4 * responsiveScale, "px")
|
|
7919
|
+
},
|
|
7920
|
+
children: [
|
|
7921
|
+
formatTime(currentTime),
|
|
7922
|
+
" ",
|
|
7923
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
7903
7924
|
style: {
|
|
7904
|
-
|
|
7905
|
-
}
|
|
7906
|
-
|
|
7907
|
-
|
|
7925
|
+
color: "rgba(255,255,255,0.5)"
|
|
7926
|
+
},
|
|
7927
|
+
children: "/"
|
|
7928
|
+
}),
|
|
7929
|
+
" ",
|
|
7930
|
+
formatTime(duration)
|
|
7931
|
+
]
|
|
7932
|
+
})
|
|
7933
|
+
]
|
|
7934
|
+
}),
|
|
7935
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7936
|
+
style: {
|
|
7937
|
+
display: "flex",
|
|
7938
|
+
alignItems: "center",
|
|
7939
|
+
gap: "".concat(8 * responsiveScale, "px")
|
|
7940
|
+
},
|
|
7941
|
+
children: [
|
|
7942
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7943
|
+
style: {
|
|
7944
|
+
position: "relative",
|
|
7945
|
+
display: viewportWidth < 600 ? "none" : "block"
|
|
7946
|
+
},
|
|
7947
|
+
children: [
|
|
7948
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
7949
|
+
className: "sc-ctrl-btn",
|
|
7950
|
+
onClick: function onClick() {
|
|
7951
|
+
setShowSpeedMenu(!showSpeedMenu);
|
|
7952
|
+
resetControlsTimer();
|
|
7953
|
+
},
|
|
7908
7954
|
style: {
|
|
7909
|
-
|
|
7910
|
-
|
|
7955
|
+
padding: "".concat(6 * responsiveScale, "px ").concat(10 * responsiveScale, "px"),
|
|
7956
|
+
borderRadius: "".concat(6 * responsiveScale, "px"),
|
|
7957
|
+
fontSize: "".concat(13 * responsiveScale, "px"),
|
|
7958
|
+
fontFamily: "'SF Mono', 'Cascadia Code', monospace",
|
|
7959
|
+
fontWeight: "600",
|
|
7960
|
+
minHeight: "".concat(32 * responsiveScale, "px")
|
|
7961
|
+
},
|
|
7962
|
+
title: "Playback Speed",
|
|
7963
|
+
children: [
|
|
7964
|
+
playbackRate,
|
|
7965
|
+
"x"
|
|
7966
|
+
]
|
|
7967
|
+
}),
|
|
7968
|
+
showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
7969
|
+
style: {
|
|
7970
|
+
position: "absolute",
|
|
7971
|
+
bottom: "100%",
|
|
7972
|
+
right: 0,
|
|
7973
|
+
marginBottom: "8px",
|
|
7974
|
+
background: "rgba(0, 0, 0, 0.8)",
|
|
7975
|
+
backdropFilter: "blur(24px)",
|
|
7976
|
+
WebkitBackdropFilter: "blur(24px)",
|
|
7977
|
+
borderRadius: "10px",
|
|
7978
|
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
7979
|
+
overflow: "hidden",
|
|
7980
|
+
minWidth: "80px",
|
|
7981
|
+
boxShadow: "0 12px 40px rgba(0, 0, 0, 0.5)",
|
|
7982
|
+
animation: "sc-fade-in 0.15s ease"
|
|
7983
|
+
},
|
|
7984
|
+
children: [
|
|
7985
|
+
0.25,
|
|
7986
|
+
0.5,
|
|
7987
|
+
0.75,
|
|
7988
|
+
1,
|
|
7989
|
+
1.25,
|
|
7990
|
+
1.5,
|
|
7991
|
+
1.75,
|
|
7992
|
+
2
|
|
7993
|
+
].map(function(speed) {
|
|
7994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
7995
|
+
onClick: function onClick() {
|
|
7996
|
+
return handlePlaybackRateChange(speed);
|
|
7997
|
+
},
|
|
7998
|
+
style: {
|
|
7999
|
+
display: "block",
|
|
8000
|
+
width: "100%",
|
|
8001
|
+
padding: "".concat(8 * responsiveScale, "px ").concat(14 * responsiveScale, "px"),
|
|
8002
|
+
background: playbackRate === speed ? "rgba(255, 255, 255, 0.12)" : "transparent",
|
|
8003
|
+
border: "none",
|
|
8004
|
+
color: playbackRate === speed ? "#fff" : "rgba(255, 255, 255, 0.7)",
|
|
8005
|
+
cursor: "pointer",
|
|
8006
|
+
fontSize: "".concat(12 * responsiveScale, "px"),
|
|
8007
|
+
fontFamily: "'SF Mono', monospace",
|
|
8008
|
+
fontWeight: playbackRate === speed ? "700" : "500",
|
|
8009
|
+
textAlign: "center",
|
|
8010
|
+
transition: "background 0.15s ease, color 0.15s ease"
|
|
8011
|
+
},
|
|
8012
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
8013
|
+
if (playbackRate !== speed) {
|
|
8014
|
+
e.target.style.background = "rgba(255, 255, 255, 0.08)";
|
|
8015
|
+
e.target.style.color = "#fff";
|
|
8016
|
+
}
|
|
8017
|
+
},
|
|
8018
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
8019
|
+
if (playbackRate !== speed) {
|
|
8020
|
+
e.target.style.background = "transparent";
|
|
8021
|
+
e.target.style.color = "rgba(255, 255, 255, 0.7)";
|
|
8022
|
+
}
|
|
8023
|
+
},
|
|
8024
|
+
children: [
|
|
8025
|
+
speed,
|
|
8026
|
+
"x"
|
|
8027
|
+
]
|
|
8028
|
+
}, speed);
|
|
8029
|
+
})
|
|
7911
8030
|
})
|
|
8031
|
+
]
|
|
8032
|
+
}),
|
|
8033
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
8034
|
+
className: "sc-ctrl-btn",
|
|
8035
|
+
onClick: function onClick() {
|
|
8036
|
+
if (onFullscreenToggle) {
|
|
8037
|
+
onFullscreenToggle();
|
|
8038
|
+
} else if (wrapperRef.current) {
|
|
8039
|
+
if (!document.fullscreenElement) {
|
|
8040
|
+
wrapperRef.current.requestFullscreen().catch(function() {});
|
|
8041
|
+
} else {
|
|
8042
|
+
document.exitFullscreen().catch(function() {});
|
|
8043
|
+
}
|
|
8044
|
+
}
|
|
8045
|
+
resetControlsTimer();
|
|
8046
|
+
},
|
|
8047
|
+
style: {
|
|
8048
|
+
padding: "".concat(8 * responsiveScale, "px"),
|
|
8049
|
+
borderRadius: "50%",
|
|
8050
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
8051
|
+
minHeight: "".concat(36 * responsiveScale, "px")
|
|
8052
|
+
},
|
|
8053
|
+
title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
|
|
8054
|
+
children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaCompress, {
|
|
8055
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
8056
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaExpand, {
|
|
8057
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
7912
8058
|
})
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
8059
|
+
})
|
|
8060
|
+
]
|
|
8061
|
+
})
|
|
8062
|
+
]
|
|
8063
|
+
})
|
|
8064
|
+
]
|
|
7919
8065
|
}) : showCustomControls && !showLicenseWarning && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
8066
|
+
className: "sc-controls-bar",
|
|
7920
8067
|
style: {
|
|
7921
8068
|
position: "absolute",
|
|
7922
8069
|
bottom: "".concat(10 * responsiveScale, "px"),
|
|
7923
8070
|
right: "".concat(10 * responsiveScale, "px"),
|
|
7924
|
-
transform: "none",
|
|
7925
8071
|
display: "flex",
|
|
7926
8072
|
flexDirection: isPortrait ? "column" : "row",
|
|
7927
|
-
gap: "".concat(
|
|
7928
|
-
zIndex: 10
|
|
8073
|
+
gap: "".concat(8 * responsiveScale, "px"),
|
|
8074
|
+
zIndex: 10,
|
|
8075
|
+
opacity: controlsVisible ? 1 : 0,
|
|
8076
|
+
transform: controlsVisible ? "translateY(0)" : "translateY(4px)",
|
|
8077
|
+
pointerEvents: controlsVisible ? "auto" : "none"
|
|
7929
8078
|
},
|
|
7930
8079
|
children: [
|
|
7931
8080
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
7932
8081
|
style: {
|
|
7933
|
-
position: "relative",
|
|
7934
8082
|
display: "flex",
|
|
7935
8083
|
alignItems: "center",
|
|
7936
|
-
|
|
7937
|
-
|
|
8084
|
+
background: "rgba(0, 0, 0, 0.6)",
|
|
8085
|
+
borderRadius: "".concat(18 * responsiveScale, "px"),
|
|
8086
|
+
padding: "2px"
|
|
7938
8087
|
},
|
|
7939
8088
|
onMouseEnter: function onMouseEnter() {
|
|
7940
8089
|
return setShowVolumeSlider(true);
|
|
@@ -7944,260 +8093,128 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
|
|
|
7944
8093
|
},
|
|
7945
8094
|
children: [
|
|
7946
8095
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
8096
|
+
className: "sc-ctrl-btn",
|
|
7947
8097
|
onClick: function onClick() {
|
|
7948
|
-
if (playerRef.current)
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
if (onVolumeToggle) {
|
|
7952
|
-
onVolumeToggle();
|
|
7953
|
-
}
|
|
7954
|
-
},
|
|
7955
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7956
|
-
var target = e.currentTarget;
|
|
7957
|
-
target.style.boxShadow = "0 14px 48px rgba(0, 0, 0, 0.7), 0 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.4)";
|
|
7958
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
|
|
7959
|
-
},
|
|
7960
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7961
|
-
var target = e.currentTarget;
|
|
7962
|
-
target.style.boxShadow = "0 10px 36px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3)";
|
|
7963
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
|
|
8098
|
+
if (playerRef.current) playerRef.current.toggleMute();
|
|
8099
|
+
onVolumeToggle === null || onVolumeToggle === void 0 ? void 0 : onVolumeToggle();
|
|
8100
|
+
resetControlsTimer();
|
|
7964
8101
|
},
|
|
7965
8102
|
style: {
|
|
7966
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)",
|
|
7967
|
-
color: "#ffffff",
|
|
7968
|
-
border: "none",
|
|
7969
|
-
borderRadius: "".concat(18 * responsiveScale, "px"),
|
|
7970
8103
|
padding: "".concat(8 * responsiveScale, "px"),
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
justifyContent: "center",
|
|
7975
|
-
backdropFilter: "blur(20px)",
|
|
7976
|
-
boxShadow: "0 10px 36px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3)",
|
|
7977
|
-
transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7978
|
-
minWidth: "".concat(46 * responsiveScale, "px"),
|
|
7979
|
-
minHeight: "".concat(46 * responsiveScale, "px")
|
|
8104
|
+
borderRadius: "50%",
|
|
8105
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
8106
|
+
minHeight: "".concat(36 * responsiveScale, "px")
|
|
7980
8107
|
},
|
|
7981
8108
|
title: isMuted ? "Unmute" : "Mute",
|
|
7982
|
-
children:
|
|
7983
|
-
size: Math.max(14,
|
|
7984
|
-
style: {
|
|
7985
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
7986
|
-
color: "#ffffff"
|
|
7987
|
-
}
|
|
7988
|
-
}) : volume < 0.5 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaVolumeDown, {
|
|
7989
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7990
|
-
style: {
|
|
7991
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
7992
|
-
color: "#ffffff"
|
|
7993
|
-
}
|
|
7994
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaVolumeUp, {
|
|
7995
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7996
|
-
style: {
|
|
7997
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
7998
|
-
color: "#ffffff"
|
|
7999
|
-
}
|
|
8109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VolumeIcon, {
|
|
8110
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
8000
8111
|
})
|
|
8001
8112
|
}),
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
8044
|
-
setShowVolumeSlider(true);
|
|
8045
|
-
e.currentTarget.style.boxShadow = "0 16px 48px rgba(0, 0, 0, 0.9), 0 6px 16px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 24px rgba(96, 165, 250, 0.4)";
|
|
8046
|
-
e.currentTarget.style.borderColor = "rgba(96, 165, 250, 0.8)";
|
|
8047
|
-
},
|
|
8048
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
8049
|
-
setShowVolumeSlider(false);
|
|
8050
|
-
e.currentTarget.style.boxShadow = "0 12px 40px rgba(0, 0, 0, 0.85), 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35)";
|
|
8051
|
-
e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.7)";
|
|
8052
|
-
},
|
|
8053
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
8113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8114
|
+
style: {
|
|
8115
|
+
width: showVolumeSlider ? "".concat(62 * responsiveScale, "px") : "0px",
|
|
8116
|
+
overflow: "hidden",
|
|
8117
|
+
transition: "width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
8118
|
+
display: "flex",
|
|
8119
|
+
alignItems: "center",
|
|
8120
|
+
paddingLeft: showVolumeSlider ? "2px" : "0",
|
|
8121
|
+
paddingRight: showVolumeSlider ? "6px" : "0"
|
|
8122
|
+
},
|
|
8123
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
8124
|
+
style: {
|
|
8125
|
+
position: "relative",
|
|
8126
|
+
width: "".concat(56 * responsiveScale, "px"),
|
|
8127
|
+
height: "3px",
|
|
8128
|
+
cursor: "pointer",
|
|
8129
|
+
borderRadius: "1.5px"
|
|
8130
|
+
},
|
|
8131
|
+
onMouseDown: function onMouseDown(e) {
|
|
8132
|
+
e.preventDefault();
|
|
8133
|
+
var el = e.currentTarget;
|
|
8134
|
+
var move = function move(ev) {
|
|
8135
|
+
var r2 = el.getBoundingClientRect();
|
|
8136
|
+
handleVolumeChange(Math.max(0, Math.min(1, (ev.clientX - r2.left) / r2.width)));
|
|
8137
|
+
};
|
|
8138
|
+
var up = function up1() {
|
|
8139
|
+
document.removeEventListener("mousemove", move);
|
|
8140
|
+
document.removeEventListener("mouseup", up);
|
|
8141
|
+
};
|
|
8142
|
+
document.addEventListener("mousemove", move);
|
|
8143
|
+
document.addEventListener("mouseup", up);
|
|
8144
|
+
var r = el.getBoundingClientRect();
|
|
8145
|
+
handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
|
|
8146
|
+
},
|
|
8147
|
+
onClick: function onClick(e) {
|
|
8148
|
+
e.stopPropagation();
|
|
8149
|
+
var r = e.currentTarget.getBoundingClientRect();
|
|
8150
|
+
handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
|
|
8151
|
+
},
|
|
8152
|
+
children: [
|
|
8153
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8054
8154
|
style: {
|
|
8055
|
-
position: "
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
|
|
8087
|
-
handleVolumeChange(percentage);
|
|
8088
|
-
},
|
|
8089
|
-
children: [
|
|
8090
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8091
|
-
style: {
|
|
8092
|
-
position: "absolute",
|
|
8093
|
-
bottom: "0",
|
|
8094
|
-
left: "0",
|
|
8095
|
-
width: "100%",
|
|
8096
|
-
height: "100%",
|
|
8097
|
-
background: "linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.5) 100%)",
|
|
8098
|
-
borderRadius: "4px",
|
|
8099
|
-
border: "1px solid rgba(255, 255, 255, 0.4)",
|
|
8100
|
-
boxShadow: "inset 0 1px 3px rgba(0, 0, 0, 0.3)"
|
|
8101
|
-
}
|
|
8102
|
-
}),
|
|
8103
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8104
|
-
style: {
|
|
8105
|
-
position: "absolute",
|
|
8106
|
-
bottom: "0",
|
|
8107
|
-
left: "0",
|
|
8108
|
-
width: "100%",
|
|
8109
|
-
height: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
8110
|
-
background: "linear-gradient(180deg, rgba(125, 211, 252, 1) 0%, rgba(96, 165, 250, 0.98) 50%, rgba(59, 130, 246, 0.95) 100%)",
|
|
8111
|
-
borderRadius: "4px",
|
|
8112
|
-
transition: "height 0.15s ease-out, box-shadow 0.2s ease-in-out",
|
|
8113
|
-
boxShadow: "0 0 12px rgba(96, 165, 250, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4)"
|
|
8114
|
-
}
|
|
8115
|
-
}),
|
|
8116
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8117
|
-
style: {
|
|
8118
|
-
position: "absolute",
|
|
8119
|
-
bottom: "calc(".concat((isMuted ? 0 : volume) * 100, "% - 8px)"),
|
|
8120
|
-
left: "50%",
|
|
8121
|
-
transform: "translateX(-50%)",
|
|
8122
|
-
width: "16px",
|
|
8123
|
-
height: "16px",
|
|
8124
|
-
background: "linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%)",
|
|
8125
|
-
borderRadius: "50%",
|
|
8126
|
-
border: "2px solid rgba(96, 165, 250, 0.9)",
|
|
8127
|
-
boxShadow: "0 3px 8px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(96, 165, 250, 0.4), 0 0 16px rgba(96, 165, 250, 0.5)",
|
|
8128
|
-
transition: "bottom 0.15s ease-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, width 0.2s ease-in-out, height 0.2s ease-in-out",
|
|
8129
|
-
cursor: "grab"
|
|
8130
|
-
},
|
|
8131
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
8132
|
-
e.currentTarget.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(96, 165, 250, 0.6), 0 0 24px rgba(96, 165, 250, 0.7)";
|
|
8133
|
-
e.currentTarget.style.cursor = "grab";
|
|
8134
|
-
},
|
|
8135
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
8136
|
-
e.currentTarget.style.boxShadow = "0 3px 8px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(96, 165, 250, 0.4), 0 0 16px rgba(96, 165, 250, 0.5)";
|
|
8137
|
-
},
|
|
8138
|
-
onMouseDown: function onMouseDown(e) {
|
|
8139
|
-
e.currentTarget.style.cursor = "grabbing";
|
|
8140
|
-
},
|
|
8141
|
-
onMouseUp: function onMouseUp(e) {
|
|
8142
|
-
e.currentTarget.style.cursor = "grab";
|
|
8143
|
-
}
|
|
8144
|
-
})
|
|
8145
|
-
]
|
|
8155
|
+
position: "absolute",
|
|
8156
|
+
inset: 0,
|
|
8157
|
+
background: "rgba(255, 255, 255, 0.2)",
|
|
8158
|
+
borderRadius: "1.5px"
|
|
8159
|
+
}
|
|
8160
|
+
}),
|
|
8161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8162
|
+
style: {
|
|
8163
|
+
position: "absolute",
|
|
8164
|
+
top: 0,
|
|
8165
|
+
left: 0,
|
|
8166
|
+
bottom: 0,
|
|
8167
|
+
width: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
8168
|
+
background: "#fff",
|
|
8169
|
+
borderRadius: "1.5px",
|
|
8170
|
+
transition: "width 0.1s ease-out"
|
|
8171
|
+
}
|
|
8172
|
+
}),
|
|
8173
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
8174
|
+
style: {
|
|
8175
|
+
position: "absolute",
|
|
8176
|
+
top: "50%",
|
|
8177
|
+
left: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
8178
|
+
transform: "translate(-50%, -50%)",
|
|
8179
|
+
width: "12px",
|
|
8180
|
+
height: "12px",
|
|
8181
|
+
background: "#fff",
|
|
8182
|
+
borderRadius: "50%",
|
|
8183
|
+
boxShadow: "0 0 3px rgba(0, 0, 0, 0.3)",
|
|
8184
|
+
transition: "left 0.1s ease-out"
|
|
8185
|
+
}
|
|
8146
8186
|
})
|
|
8147
|
-
|
|
8148
|
-
|
|
8187
|
+
]
|
|
8188
|
+
})
|
|
8149
8189
|
})
|
|
8150
8190
|
]
|
|
8151
8191
|
}),
|
|
8152
8192
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
8193
|
+
className: "sc-ctrl-btn",
|
|
8153
8194
|
onClick: function onClick() {
|
|
8154
8195
|
if (onFullscreenToggle) {
|
|
8155
8196
|
onFullscreenToggle();
|
|
8156
|
-
} else if (
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
}
|
|
8197
|
+
} else if (wrapperRef.current) {
|
|
8198
|
+
if (!document.fullscreenElement) {
|
|
8199
|
+
wrapperRef.current.requestFullscreen().catch(function() {});
|
|
8200
|
+
} else {
|
|
8201
|
+
document.exitFullscreen().catch(function() {});
|
|
8202
|
+
}
|
|
8160
8203
|
}
|
|
8161
|
-
|
|
8162
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
8163
|
-
var target = e.currentTarget;
|
|
8164
|
-
target.style.boxShadow = "0 14px 48px rgba(0, 0, 0, 0.7), 0 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.4)";
|
|
8165
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
|
|
8166
|
-
},
|
|
8167
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
8168
|
-
var target = e.currentTarget;
|
|
8169
|
-
target.style.boxShadow = "0 10px 36px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3)";
|
|
8170
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
|
|
8204
|
+
resetControlsTimer();
|
|
8171
8205
|
},
|
|
8172
8206
|
style: {
|
|
8173
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)",
|
|
8174
|
-
color: "#ffffff",
|
|
8175
|
-
border: "none",
|
|
8176
|
-
borderRadius: "".concat(18 * responsiveScale, "px"),
|
|
8177
8207
|
padding: "".concat(8 * responsiveScale, "px"),
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
backdropFilter: "blur(20px)",
|
|
8183
|
-
boxShadow: "0 10px 36px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3)",
|
|
8184
|
-
transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
8185
|
-
minWidth: "".concat(46 * responsiveScale, "px"),
|
|
8186
|
-
minHeight: "".concat(46 * responsiveScale, "px")
|
|
8208
|
+
borderRadius: "50%",
|
|
8209
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
8210
|
+
minHeight: "".concat(36 * responsiveScale, "px"),
|
|
8211
|
+
background: "rgba(0, 0, 0, 0.6)"
|
|
8187
8212
|
},
|
|
8188
8213
|
title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
|
|
8189
8214
|
children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaCompress, {
|
|
8190
|
-
size: Math.max(14,
|
|
8191
|
-
style: {
|
|
8192
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
8193
|
-
color: "#ffffff"
|
|
8194
|
-
}
|
|
8215
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
8195
8216
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fa.FaExpand, {
|
|
8196
|
-
size: Math.max(14,
|
|
8197
|
-
style: {
|
|
8198
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
8199
|
-
color: "#ffffff"
|
|
8200
|
-
}
|
|
8217
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
8201
8218
|
})
|
|
8202
8219
|
})
|
|
8203
8220
|
]
|