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
package/lib/index.js
CHANGED
|
@@ -367,7 +367,7 @@ function _ts_values(o) {
|
|
|
367
367
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
368
368
|
}
|
|
369
369
|
// src/ui/StormcloudVideoPlayer.tsx
|
|
370
|
-
import React, { useEffect, useRef, useMemo } from "react";
|
|
370
|
+
import React, { useEffect, useRef, useMemo, useCallback } from "react";
|
|
371
371
|
// src/player/StormcloudVideoPlayer.ts
|
|
372
372
|
import Hls2 from "hls.js";
|
|
373
373
|
// src/utils/browserCompat.ts
|
|
@@ -2660,9 +2660,6 @@ function sendInitialTracking(licenseKey) {
|
|
|
2660
2660
|
headers = {
|
|
2661
2661
|
"Content-Type": "application/json"
|
|
2662
2662
|
};
|
|
2663
|
-
if (licenseKey) {
|
|
2664
|
-
headers["Authorization"] = "Bearer ".concat(licenseKey);
|
|
2665
|
-
}
|
|
2666
2663
|
return [
|
|
2667
2664
|
4,
|
|
2668
2665
|
fetch("https://adstorm.co/api-adstorm-dev/adstorm/player-tracking/track", {
|
|
@@ -2768,6 +2765,234 @@ function sendHeartbeat(licenseKey) {
|
|
|
2768
2765
|
});
|
|
2769
2766
|
})();
|
|
2770
2767
|
}
|
|
2768
|
+
var TRACK_API_URL = "https://adstorm.co/api-adstorm-dev/adstorm/player-tracking/track";
|
|
2769
|
+
function mapToAdTrackingSource(source, adPlayerType) {
|
|
2770
|
+
if (source === "prebid" || source === "ima" || source === "hls") {
|
|
2771
|
+
return source;
|
|
2772
|
+
}
|
|
2773
|
+
if (source === "preload" || source === "ssp") {
|
|
2774
|
+
return source === "ssp" ? "prebid" : "ima";
|
|
2775
|
+
}
|
|
2776
|
+
return adPlayerType === "hls" ? "hls" : "ima";
|
|
2777
|
+
}
|
|
2778
|
+
function postAdTracking(licenseKey, body) {
|
|
2779
|
+
return _async_to_generator(function() {
|
|
2780
|
+
var headers, response;
|
|
2781
|
+
return _ts_generator(this, function(_state) {
|
|
2782
|
+
switch(_state.label){
|
|
2783
|
+
case 0:
|
|
2784
|
+
headers = {
|
|
2785
|
+
"Content-Type": "application/json"
|
|
2786
|
+
};
|
|
2787
|
+
if (licenseKey) {
|
|
2788
|
+
headers["Authorization"] = "Bearer ".concat(licenseKey);
|
|
2789
|
+
}
|
|
2790
|
+
return [
|
|
2791
|
+
4,
|
|
2792
|
+
fetch(TRACK_API_URL, {
|
|
2793
|
+
method: "POST",
|
|
2794
|
+
headers: headers,
|
|
2795
|
+
body: JSON.stringify(body)
|
|
2796
|
+
})
|
|
2797
|
+
];
|
|
2798
|
+
case 1:
|
|
2799
|
+
response = _state.sent();
|
|
2800
|
+
if (!response.ok) {
|
|
2801
|
+
throw new Error("HTTP error! status: ".concat(response.status));
|
|
2802
|
+
}
|
|
2803
|
+
return [
|
|
2804
|
+
4,
|
|
2805
|
+
response.json()
|
|
2806
|
+
];
|
|
2807
|
+
case 2:
|
|
2808
|
+
_state.sent();
|
|
2809
|
+
return [
|
|
2810
|
+
2
|
|
2811
|
+
];
|
|
2812
|
+
}
|
|
2813
|
+
});
|
|
2814
|
+
})();
|
|
2815
|
+
}
|
|
2816
|
+
function sendAdDetectTracking(licenseKey, payload) {
|
|
2817
|
+
return _async_to_generator(function() {
|
|
2818
|
+
var _payload_source, _payload_timestamp, clientInfo, browserId, adDetectInfo, body, error;
|
|
2819
|
+
return _ts_generator(this, function(_state) {
|
|
2820
|
+
switch(_state.label){
|
|
2821
|
+
case 0:
|
|
2822
|
+
_state.trys.push([
|
|
2823
|
+
0,
|
|
2824
|
+
3,
|
|
2825
|
+
,
|
|
2826
|
+
4
|
|
2827
|
+
]);
|
|
2828
|
+
clientInfo = getClientInfo();
|
|
2829
|
+
return [
|
|
2830
|
+
4,
|
|
2831
|
+
getBrowserID(clientInfo)
|
|
2832
|
+
];
|
|
2833
|
+
case 1:
|
|
2834
|
+
browserId = _state.sent();
|
|
2835
|
+
adDetectInfo = _object_spread({
|
|
2836
|
+
source: (_payload_source = payload.source) !== null && _payload_source !== void 0 ? _payload_source : "scte35",
|
|
2837
|
+
timestamp: (_payload_timestamp = payload.timestamp) !== null && _payload_timestamp !== void 0 ? _payload_timestamp : /* @__PURE__ */ new Date().toISOString()
|
|
2838
|
+
}, payload.durationSeconds != null && {
|
|
2839
|
+
durationSeconds: payload.durationSeconds
|
|
2840
|
+
}, payload.ptsSeconds != null && {
|
|
2841
|
+
ptsSeconds: payload.ptsSeconds
|
|
2842
|
+
}, payload.detectedAtFragmentSn != null && {
|
|
2843
|
+
detectedAtFragmentSn: payload.detectedAtFragmentSn
|
|
2844
|
+
});
|
|
2845
|
+
body = _object_spread_props(_object_spread({
|
|
2846
|
+
browserId: browserId
|
|
2847
|
+
}, clientInfo, licenseKey && {
|
|
2848
|
+
licenseKey: licenseKey
|
|
2849
|
+
}), {
|
|
2850
|
+
adDetectInfo: adDetectInfo
|
|
2851
|
+
});
|
|
2852
|
+
return [
|
|
2853
|
+
4,
|
|
2854
|
+
postAdTracking(licenseKey, body)
|
|
2855
|
+
];
|
|
2856
|
+
case 2:
|
|
2857
|
+
_state.sent();
|
|
2858
|
+
return [
|
|
2859
|
+
3,
|
|
2860
|
+
4
|
|
2861
|
+
];
|
|
2862
|
+
case 3:
|
|
2863
|
+
error = _state.sent();
|
|
2864
|
+
console.error("[StormcloudVideoPlayer] Error sending ad-detect tracking:", error);
|
|
2865
|
+
return [
|
|
2866
|
+
3,
|
|
2867
|
+
4
|
|
2868
|
+
];
|
|
2869
|
+
case 4:
|
|
2870
|
+
return [
|
|
2871
|
+
2
|
|
2872
|
+
];
|
|
2873
|
+
}
|
|
2874
|
+
});
|
|
2875
|
+
})();
|
|
2876
|
+
}
|
|
2877
|
+
function sendAdLoadedTracking(licenseKey, payload, adPlayerType) {
|
|
2878
|
+
return _async_to_generator(function() {
|
|
2879
|
+
var clientInfo, browserId, source, adLoadedInfo, body, error;
|
|
2880
|
+
return _ts_generator(this, function(_state) {
|
|
2881
|
+
switch(_state.label){
|
|
2882
|
+
case 0:
|
|
2883
|
+
_state.trys.push([
|
|
2884
|
+
0,
|
|
2885
|
+
3,
|
|
2886
|
+
,
|
|
2887
|
+
4
|
|
2888
|
+
]);
|
|
2889
|
+
clientInfo = getClientInfo();
|
|
2890
|
+
return [
|
|
2891
|
+
4,
|
|
2892
|
+
getBrowserID(clientInfo)
|
|
2893
|
+
];
|
|
2894
|
+
case 1:
|
|
2895
|
+
browserId = _state.sent();
|
|
2896
|
+
source = mapToAdTrackingSource(payload.source, adPlayerType);
|
|
2897
|
+
adLoadedInfo = _object_spread({
|
|
2898
|
+
source: source,
|
|
2899
|
+
timestamp: /* @__PURE__ */ new Date().toISOString()
|
|
2900
|
+
}, payload.vastUrl != null && {
|
|
2901
|
+
vastUrl: payload.vastUrl
|
|
2902
|
+
}, payload.durationSeconds != null && {
|
|
2903
|
+
durationSeconds: payload.durationSeconds
|
|
2904
|
+
});
|
|
2905
|
+
body = _object_spread_props(_object_spread({
|
|
2906
|
+
browserId: browserId
|
|
2907
|
+
}, clientInfo, licenseKey && {
|
|
2908
|
+
licenseKey: licenseKey
|
|
2909
|
+
}), {
|
|
2910
|
+
adLoadedInfo: adLoadedInfo
|
|
2911
|
+
});
|
|
2912
|
+
return [
|
|
2913
|
+
4,
|
|
2914
|
+
postAdTracking(licenseKey, body)
|
|
2915
|
+
];
|
|
2916
|
+
case 2:
|
|
2917
|
+
_state.sent();
|
|
2918
|
+
return [
|
|
2919
|
+
3,
|
|
2920
|
+
4
|
|
2921
|
+
];
|
|
2922
|
+
case 3:
|
|
2923
|
+
error = _state.sent();
|
|
2924
|
+
console.error("[StormcloudVideoPlayer] Error sending ad-loaded tracking:", error);
|
|
2925
|
+
return [
|
|
2926
|
+
3,
|
|
2927
|
+
4
|
|
2928
|
+
];
|
|
2929
|
+
case 4:
|
|
2930
|
+
return [
|
|
2931
|
+
2
|
|
2932
|
+
];
|
|
2933
|
+
}
|
|
2934
|
+
});
|
|
2935
|
+
})();
|
|
2936
|
+
}
|
|
2937
|
+
function sendAdImpressionTracking(licenseKey, payload, adPlayerType) {
|
|
2938
|
+
return _async_to_generator(function() {
|
|
2939
|
+
var clientInfo, browserId, source, adImpressionInfo, body, error;
|
|
2940
|
+
return _ts_generator(this, function(_state) {
|
|
2941
|
+
switch(_state.label){
|
|
2942
|
+
case 0:
|
|
2943
|
+
_state.trys.push([
|
|
2944
|
+
0,
|
|
2945
|
+
3,
|
|
2946
|
+
,
|
|
2947
|
+
4
|
|
2948
|
+
]);
|
|
2949
|
+
clientInfo = getClientInfo();
|
|
2950
|
+
return [
|
|
2951
|
+
4,
|
|
2952
|
+
getBrowserID(clientInfo)
|
|
2953
|
+
];
|
|
2954
|
+
case 1:
|
|
2955
|
+
browserId = _state.sent();
|
|
2956
|
+
source = mapToAdTrackingSource(payload.source, adPlayerType);
|
|
2957
|
+
adImpressionInfo = _object_spread({
|
|
2958
|
+
source: source,
|
|
2959
|
+
adIndex: payload.adIndex,
|
|
2960
|
+
timestamp: /* @__PURE__ */ new Date().toISOString()
|
|
2961
|
+
}, payload.durationSeconds != null && {
|
|
2962
|
+
durationSeconds: payload.durationSeconds
|
|
2963
|
+
});
|
|
2964
|
+
body = _object_spread_props(_object_spread({
|
|
2965
|
+
browserId: browserId
|
|
2966
|
+
}, clientInfo, licenseKey && {
|
|
2967
|
+
licenseKey: licenseKey
|
|
2968
|
+
}), {
|
|
2969
|
+
adImpressionInfo: adImpressionInfo
|
|
2970
|
+
});
|
|
2971
|
+
return [
|
|
2972
|
+
4,
|
|
2973
|
+
postAdTracking(licenseKey, body)
|
|
2974
|
+
];
|
|
2975
|
+
case 2:
|
|
2976
|
+
_state.sent();
|
|
2977
|
+
return [
|
|
2978
|
+
3,
|
|
2979
|
+
4
|
|
2980
|
+
];
|
|
2981
|
+
case 3:
|
|
2982
|
+
error = _state.sent();
|
|
2983
|
+
console.error("[StormcloudVideoPlayer] Error sending ad-impression tracking:", error);
|
|
2984
|
+
return [
|
|
2985
|
+
3,
|
|
2986
|
+
4
|
|
2987
|
+
];
|
|
2988
|
+
case 4:
|
|
2989
|
+
return [
|
|
2990
|
+
2
|
|
2991
|
+
];
|
|
2992
|
+
}
|
|
2993
|
+
});
|
|
2994
|
+
})();
|
|
2995
|
+
}
|
|
2771
2996
|
// src/utils/polyfills.ts
|
|
2772
2997
|
function polyfillURLSearchParams() {
|
|
2773
2998
|
if (typeof URLSearchParams !== "undefined") {
|
|
@@ -3071,6 +3296,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3071
3296
|
this.maxPreloadPoolSize = 2;
|
|
3072
3297
|
this.preloadPoolActive = false;
|
|
3073
3298
|
this.preloadPoolLoopRunning = false;
|
|
3299
|
+
this.adDetectSentForCurrentBreak = false;
|
|
3074
3300
|
this.continuousFetchLoopRunning = false;
|
|
3075
3301
|
initializePolyfills();
|
|
3076
3302
|
var browserOverrides = getBrowserConfigOverrides();
|
|
@@ -3540,6 +3766,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3540
3766
|
value: function attachImaEventListeners() {
|
|
3541
3767
|
var _this = this;
|
|
3542
3768
|
this.ima.on("all_ads_completed", function() {
|
|
3769
|
+
sendAdImpressionTracking(_this.config.licenseKey, {
|
|
3770
|
+
adIndex: _this.currentAdIndex
|
|
3771
|
+
}, _this.config.adPlayerType).catch(function() {});
|
|
3543
3772
|
var remaining = _this.getRemainingAdMs();
|
|
3544
3773
|
_this.consecutiveFailures = 0;
|
|
3545
3774
|
if (_this.config.debugAdTiming) {
|
|
@@ -3602,6 +3831,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3602
3831
|
}
|
|
3603
3832
|
});
|
|
3604
3833
|
this.ima.on("content_resume", function() {
|
|
3834
|
+
sendAdImpressionTracking(_this.config.licenseKey, {
|
|
3835
|
+
adIndex: _this.currentAdIndex
|
|
3836
|
+
}, _this.config.adPlayerType).catch(function() {});
|
|
3605
3837
|
if (!_this.video.muted) {
|
|
3606
3838
|
_this.video.muted = true;
|
|
3607
3839
|
_this.video.volume = 0;
|
|
@@ -3985,6 +4217,13 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
3985
4217
|
}
|
|
3986
4218
|
return;
|
|
3987
4219
|
}
|
|
4220
|
+
if (!this.adDetectSentForCurrentBreak) {
|
|
4221
|
+
this.adDetectSentForCurrentBreak = true;
|
|
4222
|
+
var detectPayload = {};
|
|
4223
|
+
if (marker.durationSeconds != null) detectPayload.durationSeconds = marker.durationSeconds;
|
|
4224
|
+
if (marker.ptsSeconds != null) detectPayload.ptsSeconds = marker.ptsSeconds;
|
|
4225
|
+
sendAdDetectTracking(this.config.licenseKey, detectPayload).catch(function() {});
|
|
4226
|
+
}
|
|
3988
4227
|
var hasPrefetchedAds = this.pendingAdBreak && this.pendingAdBreak.vastUrls.length > 0;
|
|
3989
4228
|
this.inAdBreak = true;
|
|
3990
4229
|
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;
|
|
@@ -4542,6 +4781,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
4542
4781
|
isFetching: false,
|
|
4543
4782
|
fetchStartTime: Date.now()
|
|
4544
4783
|
});
|
|
4784
|
+
this.adDetectSentForCurrentBreak = true;
|
|
4785
|
+
var detectPayload = {};
|
|
4786
|
+
if (marker.durationSeconds != null) detectPayload.durationSeconds = marker.durationSeconds;
|
|
4787
|
+
if (marker.ptsSeconds != null) detectPayload.ptsSeconds = marker.ptsSeconds;
|
|
4788
|
+
if (fragmentSn !== void 0) detectPayload.detectedAtFragmentSn = fragmentSn;
|
|
4789
|
+
sendAdDetectTracking(this.config.licenseKey, detectPayload).catch(function() {});
|
|
4545
4790
|
if (this.config.debugAdTiming) {
|
|
4546
4791
|
console.log("[PREFETCH] \uD83D\uDD04 Starting ad prefetch for upcoming ad break");
|
|
4547
4792
|
console.log("[PREFETCH] \uD83D\uDCCB Pre-generated ".concat(generatedUrls.length, " VAST URLs"));
|
|
@@ -5017,6 +5262,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5017
5262
|
firstAdUrl = preloaded.vastUrl;
|
|
5018
5263
|
preloadedController = preloaded.imaController;
|
|
5019
5264
|
usePreloadedAd = true;
|
|
5265
|
+
sendAdLoadedTracking(this.config.licenseKey, {
|
|
5266
|
+
source: "preload",
|
|
5267
|
+
vastUrl: firstAdUrl
|
|
5268
|
+
}, this.config.adPlayerType).catch(function() {});
|
|
5020
5269
|
if (this.config.debugAdTiming) {
|
|
5021
5270
|
console.log("[CONTINUOUS-FETCH] \uD83D\uDE80 Using preloaded ad from pool (preloaded in advance, ready immediately!)");
|
|
5022
5271
|
console.log("[CONTINUOUS-FETCH] Pool still has ".concat(this.preloadPool.length, " preloaded ads ready"));
|
|
@@ -5106,6 +5355,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5106
5355
|
];
|
|
5107
5356
|
case 5:
|
|
5108
5357
|
_state.sent();
|
|
5358
|
+
sendAdLoadedTracking(this.config.licenseKey, {
|
|
5359
|
+
source: "ssp",
|
|
5360
|
+
vastUrl: firstAdUrl
|
|
5361
|
+
}, this.config.adPlayerType).catch(function() {});
|
|
5109
5362
|
if (this.config.debugAdTiming) {
|
|
5110
5363
|
console.log("[CONTINUOUS-FETCH] \u2705 First ad request successful, starting playback");
|
|
5111
5364
|
}
|
|
@@ -5502,6 +5755,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5502
5755
|
if (this.config.debugAdTiming) {
|
|
5503
5756
|
console.log("[CONTINUOUS-FETCH] \uD83C\uDFAF Using preloaded ad from pool (".concat(this.preloadPool.length, " remaining in pool)"));
|
|
5504
5757
|
}
|
|
5758
|
+
sendAdLoadedTracking(this.config.licenseKey, {
|
|
5759
|
+
source: "preload",
|
|
5760
|
+
vastUrl: preloaded.vastUrl
|
|
5761
|
+
}, this.config.adPlayerType).catch(function() {});
|
|
5505
5762
|
_state.label = 1;
|
|
5506
5763
|
case 1:
|
|
5507
5764
|
_state.trys.push([
|
|
@@ -6206,6 +6463,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
6206
6463
|
];
|
|
6207
6464
|
case 3:
|
|
6208
6465
|
_state.sent();
|
|
6466
|
+
sendAdLoadedTracking(this.config.licenseKey, {
|
|
6467
|
+
source: "ssp",
|
|
6468
|
+
vastUrl: vastTagUrl
|
|
6469
|
+
}, this.config.adPlayerType).catch(function() {});
|
|
6209
6470
|
this.clearAdRequestWatchdog();
|
|
6210
6471
|
if (this.activeAdRequestToken !== requestToken) {
|
|
6211
6472
|
return [
|
|
@@ -6420,6 +6681,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
6420
6681
|
}
|
|
6421
6682
|
this.adRequestQueue = [];
|
|
6422
6683
|
this.inAdBreak = false;
|
|
6684
|
+
this.adDetectSentForCurrentBreak = false;
|
|
6423
6685
|
this.expectedAdBreakDurationMs = void 0;
|
|
6424
6686
|
this.currentAdBreakStartWallClockMs = void 0;
|
|
6425
6687
|
this.clearAdStartTimer();
|
|
@@ -6859,6 +7121,7 @@ var CRITICAL_PROPS = [
|
|
|
6859
7121
|
"driftToleranceMs",
|
|
6860
7122
|
"vastMode"
|
|
6861
7123
|
];
|
|
7124
|
+
var CONTROLS_HIDE_DELAY = 3e3;
|
|
6862
7125
|
var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
6863
7126
|
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, [
|
|
6864
7127
|
"src",
|
|
@@ -6893,6 +7156,8 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
6893
7156
|
var videoRef = useRef(null);
|
|
6894
7157
|
var playerRef = useRef(null);
|
|
6895
7158
|
var bufferingTimeoutRef = useRef(null);
|
|
7159
|
+
var controlsTimerRef = useRef(null);
|
|
7160
|
+
var wrapperRef = useRef(null);
|
|
6896
7161
|
var _React_useState = _sliced_to_array(React.useState({
|
|
6897
7162
|
showAds: false,
|
|
6898
7163
|
currentIndex: 0,
|
|
@@ -6912,8 +7177,9 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
6912
7177
|
var _React_useState12 = _sliced_to_array(React.useState(false), 2), isBuffering = _React_useState12[0], setIsBuffering = _React_useState12[1];
|
|
6913
7178
|
var _React_useState13 = _sliced_to_array(React.useState(false), 2), showCenterPlay = _React_useState13[0], setShowCenterPlay = _React_useState13[1];
|
|
6914
7179
|
var _React_useState14 = _sliced_to_array(React.useState(false), 2), showLicenseWarning = _React_useState14[0], setShowLicenseWarning = _React_useState14[1];
|
|
6915
|
-
var _React_useState15 = _sliced_to_array(React.useState(
|
|
6916
|
-
var _React_useState16 = _sliced_to_array(React.useState(typeof window !== "undefined" ? window.
|
|
7180
|
+
var _React_useState15 = _sliced_to_array(React.useState(true), 2), controlsVisible = _React_useState15[0], setControlsVisible = _React_useState15[1];
|
|
7181
|
+
var _React_useState16 = _sliced_to_array(React.useState(typeof window !== "undefined" ? window.innerWidth : 1920), 2), viewportWidth = _React_useState16[0], setViewportWidth = _React_useState16[1];
|
|
7182
|
+
var _React_useState17 = _sliced_to_array(React.useState(typeof window !== "undefined" ? window.innerHeight > window.innerWidth : false), 2), isPortrait = _React_useState17[0], setIsPortrait = _React_useState17[1];
|
|
6917
7183
|
var getResponsiveScale = function getResponsiveScale() {
|
|
6918
7184
|
if (viewportWidth < 480) return 0.7;
|
|
6919
7185
|
if (viewportWidth < 768) return 0.8;
|
|
@@ -6921,6 +7187,33 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
6921
7187
|
return 1;
|
|
6922
7188
|
};
|
|
6923
7189
|
var responsiveScale = getResponsiveScale();
|
|
7190
|
+
var resetControlsTimer = useCallback(function() {
|
|
7191
|
+
if (controlsTimerRef.current) {
|
|
7192
|
+
clearTimeout(controlsTimerRef.current);
|
|
7193
|
+
}
|
|
7194
|
+
setControlsVisible(true);
|
|
7195
|
+
controlsTimerRef.current = window.setTimeout(function() {
|
|
7196
|
+
if (!showVolumeSlider && !showSpeedMenu) {
|
|
7197
|
+
setControlsVisible(false);
|
|
7198
|
+
}
|
|
7199
|
+
}, CONTROLS_HIDE_DELAY);
|
|
7200
|
+
}, [
|
|
7201
|
+
showVolumeSlider,
|
|
7202
|
+
showSpeedMenu
|
|
7203
|
+
]);
|
|
7204
|
+
var handleWrapperMouseMove = useCallback(function() {
|
|
7205
|
+
resetControlsTimer();
|
|
7206
|
+
}, [
|
|
7207
|
+
resetControlsTimer
|
|
7208
|
+
]);
|
|
7209
|
+
var handleWrapperMouseLeave = useCallback(function() {
|
|
7210
|
+
if (!showVolumeSlider && !showSpeedMenu) {
|
|
7211
|
+
setControlsVisible(false);
|
|
7212
|
+
}
|
|
7213
|
+
}, [
|
|
7214
|
+
showVolumeSlider,
|
|
7215
|
+
showSpeedMenu
|
|
7216
|
+
]);
|
|
6924
7217
|
var formatTime = function formatTime(seconds) {
|
|
6925
7218
|
if (!isFinite(seconds)) return "0:00:00";
|
|
6926
7219
|
var hours = Math.floor(seconds / 3600);
|
|
@@ -6946,6 +7239,7 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
6946
7239
|
setShowCenterPlay(true);
|
|
6947
7240
|
}
|
|
6948
7241
|
}
|
|
7242
|
+
resetControlsTimer();
|
|
6949
7243
|
};
|
|
6950
7244
|
var handleCenterPlayClick = function handleCenterPlayClick() {
|
|
6951
7245
|
if (videoRef.current && videoRef.current.paused) {
|
|
@@ -6971,6 +7265,7 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
6971
7265
|
videoRef.current.currentTime = newTime;
|
|
6972
7266
|
}
|
|
6973
7267
|
}
|
|
7268
|
+
resetControlsTimer();
|
|
6974
7269
|
};
|
|
6975
7270
|
var handleVolumeChange = function handleVolumeChange(newVolume) {
|
|
6976
7271
|
if (playerRef.current && isFinite(newVolume)) {
|
|
@@ -7126,7 +7421,6 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7126
7421
|
useEffect(function() {
|
|
7127
7422
|
if (!playerRef.current || !videoRef.current) return;
|
|
7128
7423
|
var updateStates = function updateStates() {
|
|
7129
|
-
var _videoRef_current;
|
|
7130
7424
|
if (playerRef.current && videoRef.current) {
|
|
7131
7425
|
setIsMuted(playerRef.current.isMuted());
|
|
7132
7426
|
setIsPlaying(!videoRef.current.paused);
|
|
@@ -7139,12 +7433,11 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7139
7433
|
var rateValue = videoRef.current.playbackRate;
|
|
7140
7434
|
setPlaybackRate(isFinite(rateValue) && rateValue > 0 ? rateValue : 1);
|
|
7141
7435
|
}
|
|
7142
|
-
setIsFullscreen(document.fullscreenElement ===
|
|
7436
|
+
setIsFullscreen(document.fullscreenElement === wrapperRef.current);
|
|
7143
7437
|
};
|
|
7144
7438
|
var interval = setInterval(updateStates, 200);
|
|
7145
7439
|
var handleFullscreenChange = function handleFullscreenChange() {
|
|
7146
|
-
|
|
7147
|
-
setIsFullscreen(document.fullscreenElement === ((_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.parentElement));
|
|
7440
|
+
setIsFullscreen(document.fullscreenElement === wrapperRef.current);
|
|
7148
7441
|
};
|
|
7149
7442
|
document.addEventListener("fullscreenchange", handleFullscreenChange);
|
|
7150
7443
|
return function() {
|
|
@@ -7272,13 +7565,25 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7272
7565
|
}, [
|
|
7273
7566
|
debugAdTiming
|
|
7274
7567
|
]);
|
|
7568
|
+
useEffect(function() {
|
|
7569
|
+
return function() {
|
|
7570
|
+
if (controlsTimerRef.current) {
|
|
7571
|
+
clearTimeout(controlsTimerRef.current);
|
|
7572
|
+
}
|
|
7573
|
+
};
|
|
7574
|
+
}, []);
|
|
7575
|
+
var progressPercent = duration > 0 ? currentTime / duration * 100 : 0;
|
|
7576
|
+
var VolumeIcon = isMuted || volume === 0 ? FaVolumeMute : volume < 0.5 ? FaVolumeDown : FaVolumeUp;
|
|
7275
7577
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
7276
7578
|
children: [
|
|
7277
7579
|
/* @__PURE__ */ jsx("style", {
|
|
7278
|
-
children: "\n @keyframes spin {\n from {
|
|
7580
|
+
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 "
|
|
7279
7581
|
}),
|
|
7280
7582
|
/* @__PURE__ */ jsxs("div", {
|
|
7281
|
-
|
|
7583
|
+
ref: wrapperRef,
|
|
7584
|
+
className: "sc-wrapper ".concat(wrapperClassName || ""),
|
|
7585
|
+
onMouseMove: handleWrapperMouseMove,
|
|
7586
|
+
onMouseLeave: handleWrapperMouseLeave,
|
|
7282
7587
|
style: _object_spread({
|
|
7283
7588
|
display: "flex",
|
|
7284
7589
|
alignItems: "center",
|
|
@@ -7293,7 +7598,7 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7293
7598
|
maxWidth: isFullscreen ? "100vw" : "100%",
|
|
7294
7599
|
maxHeight: isFullscreen ? "100vh" : "none",
|
|
7295
7600
|
zIndex: isFullscreen ? 999999 : void 0,
|
|
7296
|
-
backgroundColor:
|
|
7601
|
+
backgroundColor: "#000",
|
|
7297
7602
|
borderRadius: isFullscreen ? 0 : void 0,
|
|
7298
7603
|
boxShadow: isFullscreen ? "none" : void 0
|
|
7299
7604
|
}, wrapperStyle),
|
|
@@ -7319,16 +7624,16 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7319
7624
|
children: children
|
|
7320
7625
|
})),
|
|
7321
7626
|
(isLoading || isBuffering) && !hideLoadingIndicator && /* @__PURE__ */ jsx(FaSpinner, {
|
|
7322
|
-
className: "
|
|
7323
|
-
size:
|
|
7324
|
-
color: "
|
|
7627
|
+
className: "sc-loading-indicator",
|
|
7628
|
+
size: 40,
|
|
7629
|
+
color: "rgba(255, 255, 255, 0.85)",
|
|
7325
7630
|
style: {
|
|
7326
7631
|
position: "absolute",
|
|
7327
|
-
top: "calc(50% -
|
|
7328
|
-
left: "calc(50% -
|
|
7632
|
+
top: "calc(50% - 20px)",
|
|
7633
|
+
left: "calc(50% - 20px)",
|
|
7329
7634
|
zIndex: 20,
|
|
7330
|
-
animation: "spin
|
|
7331
|
-
filter: "drop-shadow(0
|
|
7635
|
+
animation: "sc-spin 0.9s linear infinite",
|
|
7636
|
+
filter: "drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6))"
|
|
7332
7637
|
}
|
|
7333
7638
|
}),
|
|
7334
7639
|
showLicenseWarning && /* @__PURE__ */ jsxs("div", {
|
|
@@ -7338,13 +7643,13 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7338
7643
|
left: "50%",
|
|
7339
7644
|
transform: "translate(-50%, -50%)",
|
|
7340
7645
|
zIndex: 25,
|
|
7341
|
-
background: "
|
|
7646
|
+
background: "rgba(220, 38, 38, 0.92)",
|
|
7647
|
+
backdropFilter: "blur(24px)",
|
|
7342
7648
|
color: "white",
|
|
7343
|
-
padding: "
|
|
7344
|
-
borderRadius: "
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
boxShadow: "0 20px 60px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.2)",
|
|
7649
|
+
padding: "28px 36px",
|
|
7650
|
+
borderRadius: "14px",
|
|
7651
|
+
border: "1px solid rgba(255, 255, 255, 0.15)",
|
|
7652
|
+
boxShadow: "0 24px 64px rgba(0, 0, 0, 0.5)",
|
|
7348
7653
|
textAlign: "center",
|
|
7349
7654
|
maxWidth: "400px",
|
|
7350
7655
|
margin: "0 16px"
|
|
@@ -7352,20 +7657,18 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7352
7657
|
children: [
|
|
7353
7658
|
/* @__PURE__ */ jsx("div", {
|
|
7354
7659
|
style: {
|
|
7355
|
-
fontSize: "
|
|
7356
|
-
fontWeight: "
|
|
7357
|
-
marginBottom: "
|
|
7358
|
-
|
|
7359
|
-
textShadow: "0 2px 4px rgba(0, 0, 0, 0.5)"
|
|
7660
|
+
fontSize: "18px",
|
|
7661
|
+
fontWeight: "700",
|
|
7662
|
+
marginBottom: "10px",
|
|
7663
|
+
letterSpacing: "-0.02em"
|
|
7360
7664
|
},
|
|
7361
7665
|
children: "License Key Required"
|
|
7362
7666
|
}),
|
|
7363
7667
|
/* @__PURE__ */ jsxs("div", {
|
|
7364
7668
|
style: {
|
|
7365
|
-
fontSize: "
|
|
7366
|
-
lineHeight: "1.
|
|
7367
|
-
color: "rgba(255, 255, 255, 0.
|
|
7368
|
-
textShadow: "0 1px 2px rgba(0, 0, 0, 0.3)"
|
|
7669
|
+
fontSize: "13px",
|
|
7670
|
+
lineHeight: "1.6",
|
|
7671
|
+
color: "rgba(255, 255, 255, 0.85)"
|
|
7369
7672
|
},
|
|
7370
7673
|
children: [
|
|
7371
7674
|
"Please provide a valid license key to use the Stormcloud Video Player.",
|
|
@@ -7384,573 +7687,419 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7384
7687
|
transform: "translate(-50%, -50%)",
|
|
7385
7688
|
zIndex: 15,
|
|
7386
7689
|
cursor: "pointer",
|
|
7387
|
-
background: "
|
|
7690
|
+
background: "rgba(0, 0, 0, 0.55)",
|
|
7691
|
+
backdropFilter: "blur(8px)",
|
|
7388
7692
|
borderRadius: "50%",
|
|
7389
|
-
width: "
|
|
7390
|
-
height: "
|
|
7693
|
+
width: "".concat(92 * responsiveScale, "px"),
|
|
7694
|
+
height: "".concat(92 * responsiveScale, "px"),
|
|
7391
7695
|
display: "flex",
|
|
7392
7696
|
alignItems: "center",
|
|
7393
7697
|
justifyContent: "center",
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
boxShadow: "0 12px 40px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.3)",
|
|
7397
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
7698
|
+
transition: "background 0.2s ease, transform 0.2s ease",
|
|
7699
|
+
animation: "sc-fade-in 0.2s ease"
|
|
7398
7700
|
},
|
|
7399
7701
|
onMouseEnter: function onMouseEnter(e) {
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(40, 40, 40, 0.9) 100%)";
|
|
7403
|
-
target.style.boxShadow = "0 16px 48px rgba(0, 0, 0, 0.9), inset 0 2px 0 rgba(255, 255, 255, 0.4)";
|
|
7404
|
-
target.style.borderColor = "rgba(255, 255, 255, 0.9)";
|
|
7702
|
+
e.currentTarget.style.background = "rgba(0, 0, 0, 0.72)";
|
|
7703
|
+
e.currentTarget.style.transform = "translate(-50%, -50%) scale(1.06)";
|
|
7405
7704
|
},
|
|
7406
7705
|
onMouseLeave: function onMouseLeave(e) {
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.8) 100%)";
|
|
7410
|
-
target.style.boxShadow = "0 12px 40px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.3)";
|
|
7411
|
-
target.style.borderColor = "rgba(255, 255, 255, 0.8)";
|
|
7706
|
+
e.currentTarget.style.background = "rgba(0, 0, 0, 0.55)";
|
|
7707
|
+
e.currentTarget.style.transform = "translate(-50%, -50%) scale(1)";
|
|
7412
7708
|
},
|
|
7413
7709
|
title: "Play",
|
|
7414
7710
|
children: /* @__PURE__ */ jsx(FaPlay, {
|
|
7415
|
-
size:
|
|
7711
|
+
size: Math.max(24, 32 * responsiveScale),
|
|
7416
7712
|
color: "white",
|
|
7417
7713
|
style: {
|
|
7418
|
-
marginLeft: "
|
|
7419
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))"
|
|
7714
|
+
marginLeft: "4px"
|
|
7420
7715
|
}
|
|
7421
7716
|
})
|
|
7422
7717
|
}),
|
|
7423
|
-
shouldShowEnhancedControls && !showLicenseWarning ? /* @__PURE__ */
|
|
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
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7718
|
+
shouldShowEnhancedControls && !showLicenseWarning ? /* @__PURE__ */ jsxs("div", {
|
|
7719
|
+
className: "sc-controls-bar",
|
|
7720
|
+
style: {
|
|
7721
|
+
position: "absolute",
|
|
7722
|
+
bottom: 0,
|
|
7723
|
+
left: 0,
|
|
7724
|
+
right: 0,
|
|
7725
|
+
background: "linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%)",
|
|
7726
|
+
padding: "".concat(20 * responsiveScale, "px ").concat(12 * responsiveScale, "px ").concat(8 * responsiveScale, "px"),
|
|
7727
|
+
zIndex: 10,
|
|
7728
|
+
opacity: controlsVisible || adStatus.showAds ? 1 : 0,
|
|
7729
|
+
transform: controlsVisible || adStatus.showAds ? "translateY(0)" : "translateY(6px)",
|
|
7730
|
+
pointerEvents: controlsVisible || adStatus.showAds ? "auto" : "none"
|
|
7731
|
+
},
|
|
7732
|
+
children: [
|
|
7733
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7734
|
+
className: "sc-progress-track",
|
|
7735
|
+
style: {
|
|
7736
|
+
width: "100%",
|
|
7737
|
+
height: "3px",
|
|
7738
|
+
background: "rgba(255, 255, 255, 0.2)",
|
|
7739
|
+
borderRadius: "1.5px",
|
|
7740
|
+
marginBottom: "".concat(8 * responsiveScale, "px"),
|
|
7741
|
+
cursor: "pointer",
|
|
7742
|
+
position: "relative",
|
|
7743
|
+
transition: "height 0.1s ease"
|
|
7744
|
+
},
|
|
7745
|
+
onClick: handleTimelineSeek,
|
|
7746
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
7747
|
+
e.currentTarget.style.height = "5px";
|
|
7748
|
+
},
|
|
7749
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
7750
|
+
e.currentTarget.style.height = "3px";
|
|
7751
|
+
},
|
|
7752
|
+
children: [
|
|
7753
|
+
/* @__PURE__ */ jsx("div", {
|
|
7754
|
+
style: {
|
|
7755
|
+
position: "absolute",
|
|
7756
|
+
top: 0,
|
|
7757
|
+
left: 0,
|
|
7758
|
+
bottom: 0,
|
|
7759
|
+
background: adStatus.showAds ? "#f5c518" : "#ff0000",
|
|
7760
|
+
borderRadius: "1.5px",
|
|
7761
|
+
width: "".concat(progressPercent, "%"),
|
|
7762
|
+
transition: "width 0.15s linear"
|
|
7763
|
+
}
|
|
7764
|
+
}),
|
|
7765
|
+
/* @__PURE__ */ jsx("div", {
|
|
7766
|
+
className: "sc-progress-thumb",
|
|
7767
|
+
style: {
|
|
7768
|
+
position: "absolute",
|
|
7769
|
+
top: "50%",
|
|
7770
|
+
left: "".concat(progressPercent, "%"),
|
|
7771
|
+
transform: "translate(-50%, -50%) scale(0)",
|
|
7772
|
+
width: "13px",
|
|
7773
|
+
height: "13px",
|
|
7774
|
+
background: adStatus.showAds ? "#f5c518" : "#ff0000",
|
|
7775
|
+
borderRadius: "50%",
|
|
7776
|
+
boxShadow: "0 0 4px rgba(0, 0, 0, 0.3)",
|
|
7777
|
+
transition: "transform 0.1s ease, left 0.15s linear"
|
|
7778
|
+
}
|
|
7779
|
+
})
|
|
7780
|
+
]
|
|
7781
|
+
}),
|
|
7782
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7783
|
+
style: {
|
|
7784
|
+
display: "flex",
|
|
7785
|
+
alignItems: "center",
|
|
7786
|
+
justifyContent: "space-between",
|
|
7787
|
+
color: "white",
|
|
7788
|
+
gap: "".concat(8 * responsiveScale, "px")
|
|
7789
|
+
},
|
|
7790
|
+
children: [
|
|
7791
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7792
|
+
style: {
|
|
7793
|
+
display: "flex",
|
|
7794
|
+
alignItems: "center",
|
|
7795
|
+
gap: "".concat(8 * responsiveScale, "px")
|
|
7796
|
+
},
|
|
7797
|
+
children: [
|
|
7798
|
+
/* @__PURE__ */ jsx("button", {
|
|
7799
|
+
className: "sc-ctrl-btn",
|
|
7800
|
+
onClick: handlePlayPause,
|
|
7801
|
+
style: {
|
|
7802
|
+
padding: "".concat(8 * responsiveScale, "px"),
|
|
7803
|
+
borderRadius: "50%",
|
|
7804
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
7805
|
+
minHeight: "".concat(36 * responsiveScale, "px")
|
|
7806
|
+
},
|
|
7807
|
+
title: isPlaying ? "Pause" : "Play",
|
|
7808
|
+
children: isPlaying ? /* @__PURE__ */ jsx(FaPause, {
|
|
7809
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
7810
|
+
}) : /* @__PURE__ */ jsx(FaPlay, {
|
|
7811
|
+
size: Math.max(14, 18 * responsiveScale),
|
|
7497
7812
|
style: {
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
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)";
|
|
7522
|
-
},
|
|
7523
|
-
title: isPlaying ? "Pause" : "Play",
|
|
7524
|
-
children: isPlaying ? /* @__PURE__ */ jsx(FaPause, {
|
|
7525
|
-
size: Math.max(16, 20 * responsiveScale),
|
|
7813
|
+
marginLeft: "2px"
|
|
7814
|
+
}
|
|
7815
|
+
})
|
|
7816
|
+
}),
|
|
7817
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7818
|
+
style: {
|
|
7819
|
+
display: "flex",
|
|
7820
|
+
alignItems: "center"
|
|
7821
|
+
},
|
|
7822
|
+
onMouseEnter: function onMouseEnter() {
|
|
7823
|
+
return setShowVolumeSlider(true);
|
|
7824
|
+
},
|
|
7825
|
+
onMouseLeave: function onMouseLeave() {
|
|
7826
|
+
return setShowVolumeSlider(false);
|
|
7827
|
+
},
|
|
7828
|
+
children: [
|
|
7829
|
+
/* @__PURE__ */ jsx("button", {
|
|
7830
|
+
className: "sc-ctrl-btn",
|
|
7831
|
+
onClick: function onClick() {
|
|
7832
|
+
if (playerRef.current) playerRef.current.toggleMute();
|
|
7833
|
+
onVolumeToggle === null || onVolumeToggle === void 0 ? void 0 : onVolumeToggle();
|
|
7834
|
+
resetControlsTimer();
|
|
7835
|
+
},
|
|
7526
7836
|
style: {
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7837
|
+
padding: "".concat(8 * responsiveScale, "px"),
|
|
7838
|
+
borderRadius: "50%",
|
|
7839
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
7840
|
+
minHeight: "".concat(36 * responsiveScale, "px")
|
|
7841
|
+
},
|
|
7842
|
+
title: isMuted ? "Unmute" : "Mute",
|
|
7843
|
+
children: /* @__PURE__ */ jsx(VolumeIcon, {
|
|
7844
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
7845
|
+
})
|
|
7846
|
+
}),
|
|
7847
|
+
/* @__PURE__ */ jsx("div", {
|
|
7531
7848
|
style: {
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
padding: "8px",
|
|
7542
|
-
margin: "-8px"
|
|
7543
|
-
},
|
|
7544
|
-
onMouseEnter: function onMouseEnter() {
|
|
7545
|
-
return setShowVolumeSlider(true);
|
|
7546
|
-
},
|
|
7547
|
-
onMouseLeave: function onMouseLeave() {
|
|
7548
|
-
return setShowVolumeSlider(false);
|
|
7549
|
-
},
|
|
7550
|
-
children: [
|
|
7551
|
-
/* @__PURE__ */ jsx("button", {
|
|
7552
|
-
onClick: function onClick() {
|
|
7553
|
-
if (playerRef.current) {
|
|
7554
|
-
playerRef.current.toggleMute();
|
|
7555
|
-
}
|
|
7556
|
-
if (onVolumeToggle) {
|
|
7557
|
-
onVolumeToggle();
|
|
7558
|
-
}
|
|
7559
|
-
},
|
|
7849
|
+
width: showVolumeSlider ? "".concat(62 * responsiveScale, "px") : "0px",
|
|
7850
|
+
overflow: "hidden",
|
|
7851
|
+
transition: "width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7852
|
+
display: "flex",
|
|
7853
|
+
alignItems: "center",
|
|
7854
|
+
paddingLeft: showVolumeSlider ? "2px" : "0",
|
|
7855
|
+
paddingRight: showVolumeSlider ? "4px" : "0"
|
|
7856
|
+
},
|
|
7857
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
7560
7858
|
style: {
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
color: "#ffffff",
|
|
7859
|
+
position: "relative",
|
|
7860
|
+
width: "".concat(56 * responsiveScale, "px"),
|
|
7861
|
+
height: "3px",
|
|
7565
7862
|
cursor: "pointer",
|
|
7566
|
-
|
|
7567
|
-
borderRadius: "".concat(16 * responsiveScale, "px"),
|
|
7568
|
-
display: "flex",
|
|
7569
|
-
alignItems: "center",
|
|
7570
|
-
justifyContent: "center",
|
|
7571
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7572
|
-
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)",
|
|
7573
|
-
minWidth: "".concat(44 * responsiveScale, "px"),
|
|
7574
|
-
minHeight: "".concat(44 * responsiveScale, "px")
|
|
7863
|
+
borderRadius: "1.5px"
|
|
7575
7864
|
},
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7865
|
+
onMouseDown: function onMouseDown(e) {
|
|
7866
|
+
e.preventDefault();
|
|
7867
|
+
var el = e.currentTarget;
|
|
7868
|
+
var move = function move(ev) {
|
|
7869
|
+
var r2 = el.getBoundingClientRect();
|
|
7870
|
+
handleVolumeChange(Math.max(0, Math.min(1, (ev.clientX - r2.left) / r2.width)));
|
|
7871
|
+
};
|
|
7872
|
+
var up = function up1() {
|
|
7873
|
+
document.removeEventListener("mousemove", move);
|
|
7874
|
+
document.removeEventListener("mouseup", up);
|
|
7875
|
+
};
|
|
7876
|
+
document.addEventListener("mousemove", move);
|
|
7877
|
+
document.addEventListener("mouseup", up);
|
|
7878
|
+
var r = el.getBoundingClientRect();
|
|
7879
|
+
handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
|
|
7580
7880
|
},
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7881
|
+
onClick: function onClick(e) {
|
|
7882
|
+
e.stopPropagation();
|
|
7883
|
+
var r = e.currentTarget.getBoundingClientRect();
|
|
7884
|
+
handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
|
|
7585
7885
|
},
|
|
7586
|
-
title: isMuted ? "Unmute" : "Mute",
|
|
7587
|
-
children: isMuted || volume === 0 ? /* @__PURE__ */ jsx(FaVolumeMute, {
|
|
7588
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7589
|
-
style: {
|
|
7590
|
-
filter: "drop-shadow(0 0 0 transparent)"
|
|
7591
|
-
}
|
|
7592
|
-
}) : volume < 0.5 ? /* @__PURE__ */ jsx(FaVolumeDown, {
|
|
7593
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7594
|
-
style: {
|
|
7595
|
-
filter: "drop-shadow(0 0 0 transparent)"
|
|
7596
|
-
}
|
|
7597
|
-
}) : /* @__PURE__ */ jsx(FaVolumeUp, {
|
|
7598
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7599
|
-
style: {
|
|
7600
|
-
filter: "drop-shadow(0 0 0 transparent)"
|
|
7601
|
-
}
|
|
7602
|
-
})
|
|
7603
|
-
}),
|
|
7604
|
-
showVolumeSlider && /* @__PURE__ */ jsxs(Fragment, {
|
|
7605
7886
|
children: [
|
|
7606
7887
|
/* @__PURE__ */ jsx("div", {
|
|
7607
7888
|
style: {
|
|
7608
7889
|
position: "absolute",
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7890
|
+
inset: 0,
|
|
7891
|
+
background: "rgba(255, 255, 255, 0.2)",
|
|
7892
|
+
borderRadius: "1.5px"
|
|
7893
|
+
}
|
|
7894
|
+
}),
|
|
7895
|
+
/* @__PURE__ */ jsx("div", {
|
|
7896
|
+
style: {
|
|
7897
|
+
position: "absolute",
|
|
7898
|
+
top: 0,
|
|
7899
|
+
left: 0,
|
|
7900
|
+
bottom: 0,
|
|
7901
|
+
width: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
7902
|
+
background: "#fff",
|
|
7903
|
+
borderRadius: "1.5px",
|
|
7904
|
+
transition: "width 0.1s ease-out"
|
|
7622
7905
|
}
|
|
7623
7906
|
}),
|
|
7624
7907
|
/* @__PURE__ */ jsx("div", {
|
|
7625
7908
|
style: {
|
|
7626
7909
|
position: "absolute",
|
|
7627
|
-
|
|
7628
|
-
left: "
|
|
7629
|
-
transform: "
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
flexDirection: "column",
|
|
7638
|
-
alignItems: "center",
|
|
7639
|
-
justifyContent: "center",
|
|
7640
|
-
height: "128px",
|
|
7641
|
-
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)",
|
|
7642
|
-
zIndex: 10,
|
|
7643
|
-
transition: "transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out"
|
|
7644
|
-
},
|
|
7645
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7646
|
-
setShowVolumeSlider(true);
|
|
7647
|
-
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)";
|
|
7648
|
-
e.currentTarget.style.borderColor = "rgba(59, 130, 246, 0.4)";
|
|
7649
|
-
},
|
|
7650
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7651
|
-
setShowVolumeSlider(false);
|
|
7652
|
-
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)";
|
|
7653
|
-
e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.15)";
|
|
7654
|
-
},
|
|
7655
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
7656
|
-
style: {
|
|
7657
|
-
position: "relative",
|
|
7658
|
-
width: "8px",
|
|
7659
|
-
height: "104px",
|
|
7660
|
-
cursor: "pointer",
|
|
7661
|
-
transition: "transform 0.2s ease-in-out"
|
|
7662
|
-
},
|
|
7663
|
-
onMouseEnter: function onMouseEnter(e) {},
|
|
7664
|
-
onMouseLeave: function onMouseLeave(e) {},
|
|
7665
|
-
onMouseDown: function onMouseDown(e) {
|
|
7666
|
-
e.preventDefault();
|
|
7667
|
-
var sliderElement = e.currentTarget;
|
|
7668
|
-
var handleMouseMove = function handleMouseMove(moveEvent) {
|
|
7669
|
-
if (!sliderElement) return;
|
|
7670
|
-
var rect2 = sliderElement.getBoundingClientRect();
|
|
7671
|
-
var y2 = moveEvent.clientY - rect2.top;
|
|
7672
|
-
var percentage2 = 1 - Math.max(0, Math.min(1, y2 / rect2.height));
|
|
7673
|
-
handleVolumeChange(percentage2);
|
|
7674
|
-
};
|
|
7675
|
-
var handleMouseUp = function handleMouseUp1() {
|
|
7676
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
7677
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
7678
|
-
};
|
|
7679
|
-
document.addEventListener("mousemove", handleMouseMove);
|
|
7680
|
-
document.addEventListener("mouseup", handleMouseUp);
|
|
7681
|
-
var rect = sliderElement.getBoundingClientRect();
|
|
7682
|
-
var y = e.clientY - rect.top;
|
|
7683
|
-
var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
|
|
7684
|
-
handleVolumeChange(percentage);
|
|
7685
|
-
},
|
|
7686
|
-
onClick: function onClick(e) {
|
|
7687
|
-
e.stopPropagation();
|
|
7688
|
-
var rect = e.currentTarget.getBoundingClientRect();
|
|
7689
|
-
var y = e.clientY - rect.top;
|
|
7690
|
-
var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
|
|
7691
|
-
handleVolumeChange(percentage);
|
|
7692
|
-
},
|
|
7693
|
-
children: [
|
|
7694
|
-
/* @__PURE__ */ jsx("div", {
|
|
7695
|
-
style: {
|
|
7696
|
-
position: "absolute",
|
|
7697
|
-
bottom: "0",
|
|
7698
|
-
left: "0",
|
|
7699
|
-
width: "100%",
|
|
7700
|
-
height: "100%",
|
|
7701
|
-
background: "linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.15) 100%)",
|
|
7702
|
-
borderRadius: "4px",
|
|
7703
|
-
boxShadow: "inset 0 1px 3px rgba(0, 0, 0, 0.2)"
|
|
7704
|
-
}
|
|
7705
|
-
}),
|
|
7706
|
-
/* @__PURE__ */ jsx("div", {
|
|
7707
|
-
style: {
|
|
7708
|
-
position: "absolute",
|
|
7709
|
-
bottom: "0",
|
|
7710
|
-
left: "0",
|
|
7711
|
-
width: "100%",
|
|
7712
|
-
height: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
7713
|
-
background: "linear-gradient(180deg, rgba(96, 165, 250, 1) 0%, rgba(59, 130, 246, 0.95) 50%, rgba(37, 99, 235, 0.9) 100%)",
|
|
7714
|
-
borderRadius: "4px",
|
|
7715
|
-
transition: "height 0.15s ease-out, box-shadow 0.2s ease-in-out",
|
|
7716
|
-
boxShadow: "0 0 8px rgba(59, 130, 246, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3)"
|
|
7717
|
-
}
|
|
7718
|
-
}),
|
|
7719
|
-
/* @__PURE__ */ jsx("div", {
|
|
7720
|
-
style: {
|
|
7721
|
-
position: "absolute",
|
|
7722
|
-
bottom: "calc(".concat((isMuted ? 0 : volume) * 100, "% - 7px)"),
|
|
7723
|
-
left: "50%",
|
|
7724
|
-
transform: "translateX(-50%)",
|
|
7725
|
-
width: "14px",
|
|
7726
|
-
height: "14px",
|
|
7727
|
-
background: "linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%)",
|
|
7728
|
-
borderRadius: "50%",
|
|
7729
|
-
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)",
|
|
7730
|
-
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",
|
|
7731
|
-
cursor: "grab"
|
|
7732
|
-
},
|
|
7733
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7734
|
-
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)";
|
|
7735
|
-
e.currentTarget.style.cursor = "grab";
|
|
7736
|
-
},
|
|
7737
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7738
|
-
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)";
|
|
7739
|
-
},
|
|
7740
|
-
onMouseDown: function onMouseDown(e) {
|
|
7741
|
-
e.currentTarget.style.cursor = "grabbing";
|
|
7742
|
-
},
|
|
7743
|
-
onMouseUp: function onMouseUp(e) {
|
|
7744
|
-
e.currentTarget.style.cursor = "grab";
|
|
7745
|
-
}
|
|
7746
|
-
})
|
|
7747
|
-
]
|
|
7748
|
-
})
|
|
7910
|
+
top: "50%",
|
|
7911
|
+
left: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
7912
|
+
transform: "translate(-50%, -50%)",
|
|
7913
|
+
width: "12px",
|
|
7914
|
+
height: "12px",
|
|
7915
|
+
background: "#fff",
|
|
7916
|
+
borderRadius: "50%",
|
|
7917
|
+
boxShadow: "0 0 3px rgba(0, 0, 0, 0.3)",
|
|
7918
|
+
transition: "left 0.1s ease-out"
|
|
7919
|
+
}
|
|
7749
7920
|
})
|
|
7750
7921
|
]
|
|
7751
7922
|
})
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
/* @__PURE__ */ jsxs("div", {
|
|
7770
|
-
style: {
|
|
7771
|
-
display: "flex",
|
|
7772
|
-
alignItems: "center",
|
|
7773
|
-
gap: "".concat(12 * responsiveScale, "px")
|
|
7774
|
-
},
|
|
7775
|
-
children: [
|
|
7776
|
-
/* @__PURE__ */ jsxs("div", {
|
|
7777
|
-
style: {
|
|
7778
|
-
position: "relative",
|
|
7779
|
-
display: viewportWidth < 600 ? "none" : "block"
|
|
7780
|
-
},
|
|
7781
|
-
children: [
|
|
7782
|
-
/* @__PURE__ */ jsxs("button", {
|
|
7783
|
-
onClick: function onClick() {
|
|
7784
|
-
return setShowSpeedMenu(!showSpeedMenu);
|
|
7785
|
-
},
|
|
7786
|
-
style: {
|
|
7787
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)",
|
|
7788
|
-
backdropFilter: "blur(10px)",
|
|
7789
|
-
border: "".concat(2 * responsiveScale, "px solid rgba(255, 255, 255, 0.3)"),
|
|
7790
|
-
color: "#ffffff",
|
|
7791
|
-
cursor: "pointer",
|
|
7792
|
-
padding: "".concat(8 * responsiveScale, "px ").concat(14 * responsiveScale, "px"),
|
|
7793
|
-
borderRadius: "".concat(14 * responsiveScale, "px"),
|
|
7794
|
-
fontSize: "".concat(14 * responsiveScale, "px"),
|
|
7795
|
-
fontFamily: "monospace",
|
|
7796
|
-
fontWeight: "700",
|
|
7797
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7798
|
-
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)",
|
|
7799
|
-
minWidth: "".concat(56 * responsiveScale, "px"),
|
|
7800
|
-
minHeight: "".concat(40 * responsiveScale, "px")
|
|
7801
|
-
},
|
|
7802
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7803
|
-
var target = e.target;
|
|
7804
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
|
|
7805
|
-
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)";
|
|
7806
|
-
},
|
|
7807
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7808
|
-
var target = e.target;
|
|
7809
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
|
|
7810
|
-
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)";
|
|
7811
|
-
},
|
|
7812
|
-
title: "Playback Speed",
|
|
7813
|
-
children: [
|
|
7814
|
-
playbackRate,
|
|
7815
|
-
"x"
|
|
7816
|
-
]
|
|
7817
|
-
}),
|
|
7818
|
-
showSpeedMenu && /* @__PURE__ */ jsx("div", {
|
|
7819
|
-
style: {
|
|
7820
|
-
position: "absolute",
|
|
7821
|
-
bottom: "100%",
|
|
7822
|
-
right: 0,
|
|
7823
|
-
marginBottom: "12px",
|
|
7824
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%)",
|
|
7825
|
-
backdropFilter: "blur(20px)",
|
|
7826
|
-
borderRadius: "12px",
|
|
7827
|
-
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
7828
|
-
overflow: "hidden",
|
|
7829
|
-
minWidth: "90px",
|
|
7830
|
-
boxShadow: "0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1)"
|
|
7831
|
-
},
|
|
7832
|
-
children: [
|
|
7833
|
-
0.25,
|
|
7834
|
-
0.5,
|
|
7835
|
-
0.75,
|
|
7836
|
-
1,
|
|
7837
|
-
1.25,
|
|
7838
|
-
1.5,
|
|
7839
|
-
1.75,
|
|
7840
|
-
2
|
|
7841
|
-
].map(function(speed) {
|
|
7842
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
7843
|
-
onClick: function onClick() {
|
|
7844
|
-
return handlePlaybackRateChange(speed);
|
|
7845
|
-
},
|
|
7846
|
-
style: {
|
|
7847
|
-
display: "block",
|
|
7848
|
-
width: "100%",
|
|
7849
|
-
padding: "10px 16px",
|
|
7850
|
-
background: playbackRate === speed ? "linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(139, 92, 246, 0.6) 100%)" : "transparent",
|
|
7851
|
-
border: "none",
|
|
7852
|
-
color: "white",
|
|
7853
|
-
cursor: "pointer",
|
|
7854
|
-
fontSize: "13px",
|
|
7855
|
-
fontFamily: "monospace",
|
|
7856
|
-
fontWeight: "600",
|
|
7857
|
-
textAlign: "center",
|
|
7858
|
-
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7859
|
-
borderBottom: speed !== 2 ? "1px solid rgba(255, 255, 255, 0.05)" : "none"
|
|
7860
|
-
},
|
|
7861
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7862
|
-
if (playbackRate !== speed) {
|
|
7863
|
-
e.target.style.background = "linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%)";
|
|
7864
|
-
}
|
|
7865
|
-
},
|
|
7866
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7867
|
-
if (playbackRate !== speed) {
|
|
7868
|
-
e.target.style.background = "transparent";
|
|
7869
|
-
}
|
|
7870
|
-
},
|
|
7871
|
-
children: [
|
|
7872
|
-
speed,
|
|
7873
|
-
"x"
|
|
7874
|
-
]
|
|
7875
|
-
}, speed);
|
|
7876
|
-
})
|
|
7877
|
-
})
|
|
7878
|
-
]
|
|
7879
|
-
}),
|
|
7880
|
-
/* @__PURE__ */ jsx("button", {
|
|
7881
|
-
onClick: function onClick() {
|
|
7882
|
-
if (onFullscreenToggle) {
|
|
7883
|
-
onFullscreenToggle();
|
|
7884
|
-
} else if (playerRef.current) {
|
|
7885
|
-
playerRef.current.toggleFullscreen().catch(function(err) {
|
|
7886
|
-
console.error("Fullscreen error:", err);
|
|
7887
|
-
});
|
|
7888
|
-
}
|
|
7889
|
-
},
|
|
7890
|
-
style: {
|
|
7891
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)",
|
|
7892
|
-
backdropFilter: "blur(10px)",
|
|
7893
|
-
border: "".concat(2 * responsiveScale, "px solid rgba(255, 255, 255, 0.3)"),
|
|
7894
|
-
color: "#ffffff",
|
|
7895
|
-
cursor: "pointer",
|
|
7896
|
-
padding: "".concat(8 * responsiveScale, "px"),
|
|
7897
|
-
borderRadius: "".concat(16 * responsiveScale, "px"),
|
|
7898
|
-
display: "flex",
|
|
7899
|
-
alignItems: "center",
|
|
7900
|
-
justifyContent: "center",
|
|
7901
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7902
|
-
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)",
|
|
7903
|
-
minWidth: "".concat(44 * responsiveScale, "px"),
|
|
7904
|
-
minHeight: "".concat(44 * responsiveScale, "px")
|
|
7905
|
-
},
|
|
7906
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7907
|
-
var target = e.target;
|
|
7908
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
|
|
7909
|
-
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)";
|
|
7910
|
-
},
|
|
7911
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7912
|
-
var target = e.target;
|
|
7913
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
|
|
7914
|
-
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)";
|
|
7915
|
-
},
|
|
7916
|
-
title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
|
|
7917
|
-
children: isFullscreen ? /* @__PURE__ */ jsx(FaCompress, {
|
|
7918
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
7923
|
+
})
|
|
7924
|
+
]
|
|
7925
|
+
}),
|
|
7926
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7927
|
+
style: {
|
|
7928
|
+
fontSize: "".concat(13 * responsiveScale, "px"),
|
|
7929
|
+
fontFamily: "Roboto, 'Segoe UI', Arial, sans-serif",
|
|
7930
|
+
color: "rgba(255, 255, 255, 0.9)",
|
|
7931
|
+
display: viewportWidth < 480 ? "none" : "block",
|
|
7932
|
+
fontVariantNumeric: "tabular-nums",
|
|
7933
|
+
userSelect: "none",
|
|
7934
|
+
marginLeft: "".concat(4 * responsiveScale, "px")
|
|
7935
|
+
},
|
|
7936
|
+
children: [
|
|
7937
|
+
formatTime(currentTime),
|
|
7938
|
+
" ",
|
|
7939
|
+
/* @__PURE__ */ jsx("span", {
|
|
7919
7940
|
style: {
|
|
7920
|
-
|
|
7921
|
-
}
|
|
7922
|
-
|
|
7923
|
-
|
|
7941
|
+
color: "rgba(255,255,255,0.5)"
|
|
7942
|
+
},
|
|
7943
|
+
children: "/"
|
|
7944
|
+
}),
|
|
7945
|
+
" ",
|
|
7946
|
+
formatTime(duration)
|
|
7947
|
+
]
|
|
7948
|
+
})
|
|
7949
|
+
]
|
|
7950
|
+
}),
|
|
7951
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7952
|
+
style: {
|
|
7953
|
+
display: "flex",
|
|
7954
|
+
alignItems: "center",
|
|
7955
|
+
gap: "".concat(8 * responsiveScale, "px")
|
|
7956
|
+
},
|
|
7957
|
+
children: [
|
|
7958
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7959
|
+
style: {
|
|
7960
|
+
position: "relative",
|
|
7961
|
+
display: viewportWidth < 600 ? "none" : "block"
|
|
7962
|
+
},
|
|
7963
|
+
children: [
|
|
7964
|
+
/* @__PURE__ */ jsxs("button", {
|
|
7965
|
+
className: "sc-ctrl-btn",
|
|
7966
|
+
onClick: function onClick() {
|
|
7967
|
+
setShowSpeedMenu(!showSpeedMenu);
|
|
7968
|
+
resetControlsTimer();
|
|
7969
|
+
},
|
|
7924
7970
|
style: {
|
|
7925
|
-
|
|
7926
|
-
|
|
7971
|
+
padding: "".concat(6 * responsiveScale, "px ").concat(10 * responsiveScale, "px"),
|
|
7972
|
+
borderRadius: "".concat(6 * responsiveScale, "px"),
|
|
7973
|
+
fontSize: "".concat(13 * responsiveScale, "px"),
|
|
7974
|
+
fontFamily: "'SF Mono', 'Cascadia Code', monospace",
|
|
7975
|
+
fontWeight: "600",
|
|
7976
|
+
minHeight: "".concat(32 * responsiveScale, "px")
|
|
7977
|
+
},
|
|
7978
|
+
title: "Playback Speed",
|
|
7979
|
+
children: [
|
|
7980
|
+
playbackRate,
|
|
7981
|
+
"x"
|
|
7982
|
+
]
|
|
7983
|
+
}),
|
|
7984
|
+
showSpeedMenu && /* @__PURE__ */ jsx("div", {
|
|
7985
|
+
style: {
|
|
7986
|
+
position: "absolute",
|
|
7987
|
+
bottom: "100%",
|
|
7988
|
+
right: 0,
|
|
7989
|
+
marginBottom: "8px",
|
|
7990
|
+
background: "rgba(0, 0, 0, 0.8)",
|
|
7991
|
+
backdropFilter: "blur(24px)",
|
|
7992
|
+
WebkitBackdropFilter: "blur(24px)",
|
|
7993
|
+
borderRadius: "10px",
|
|
7994
|
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
7995
|
+
overflow: "hidden",
|
|
7996
|
+
minWidth: "80px",
|
|
7997
|
+
boxShadow: "0 12px 40px rgba(0, 0, 0, 0.5)",
|
|
7998
|
+
animation: "sc-fade-in 0.15s ease"
|
|
7999
|
+
},
|
|
8000
|
+
children: [
|
|
8001
|
+
0.25,
|
|
8002
|
+
0.5,
|
|
8003
|
+
0.75,
|
|
8004
|
+
1,
|
|
8005
|
+
1.25,
|
|
8006
|
+
1.5,
|
|
8007
|
+
1.75,
|
|
8008
|
+
2
|
|
8009
|
+
].map(function(speed) {
|
|
8010
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
8011
|
+
onClick: function onClick() {
|
|
8012
|
+
return handlePlaybackRateChange(speed);
|
|
8013
|
+
},
|
|
8014
|
+
style: {
|
|
8015
|
+
display: "block",
|
|
8016
|
+
width: "100%",
|
|
8017
|
+
padding: "".concat(8 * responsiveScale, "px ").concat(14 * responsiveScale, "px"),
|
|
8018
|
+
background: playbackRate === speed ? "rgba(255, 255, 255, 0.12)" : "transparent",
|
|
8019
|
+
border: "none",
|
|
8020
|
+
color: playbackRate === speed ? "#fff" : "rgba(255, 255, 255, 0.7)",
|
|
8021
|
+
cursor: "pointer",
|
|
8022
|
+
fontSize: "".concat(12 * responsiveScale, "px"),
|
|
8023
|
+
fontFamily: "'SF Mono', monospace",
|
|
8024
|
+
fontWeight: playbackRate === speed ? "700" : "500",
|
|
8025
|
+
textAlign: "center",
|
|
8026
|
+
transition: "background 0.15s ease, color 0.15s ease"
|
|
8027
|
+
},
|
|
8028
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
8029
|
+
if (playbackRate !== speed) {
|
|
8030
|
+
e.target.style.background = "rgba(255, 255, 255, 0.08)";
|
|
8031
|
+
e.target.style.color = "#fff";
|
|
8032
|
+
}
|
|
8033
|
+
},
|
|
8034
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
8035
|
+
if (playbackRate !== speed) {
|
|
8036
|
+
e.target.style.background = "transparent";
|
|
8037
|
+
e.target.style.color = "rgba(255, 255, 255, 0.7)";
|
|
8038
|
+
}
|
|
8039
|
+
},
|
|
8040
|
+
children: [
|
|
8041
|
+
speed,
|
|
8042
|
+
"x"
|
|
8043
|
+
]
|
|
8044
|
+
}, speed);
|
|
8045
|
+
})
|
|
7927
8046
|
})
|
|
8047
|
+
]
|
|
8048
|
+
}),
|
|
8049
|
+
/* @__PURE__ */ jsx("button", {
|
|
8050
|
+
className: "sc-ctrl-btn",
|
|
8051
|
+
onClick: function onClick() {
|
|
8052
|
+
if (onFullscreenToggle) {
|
|
8053
|
+
onFullscreenToggle();
|
|
8054
|
+
} else if (wrapperRef.current) {
|
|
8055
|
+
if (!document.fullscreenElement) {
|
|
8056
|
+
wrapperRef.current.requestFullscreen().catch(function() {});
|
|
8057
|
+
} else {
|
|
8058
|
+
document.exitFullscreen().catch(function() {});
|
|
8059
|
+
}
|
|
8060
|
+
}
|
|
8061
|
+
resetControlsTimer();
|
|
8062
|
+
},
|
|
8063
|
+
style: {
|
|
8064
|
+
padding: "".concat(8 * responsiveScale, "px"),
|
|
8065
|
+
borderRadius: "50%",
|
|
8066
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
8067
|
+
minHeight: "".concat(36 * responsiveScale, "px")
|
|
8068
|
+
},
|
|
8069
|
+
title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
|
|
8070
|
+
children: isFullscreen ? /* @__PURE__ */ jsx(FaCompress, {
|
|
8071
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
8072
|
+
}) : /* @__PURE__ */ jsx(FaExpand, {
|
|
8073
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
7928
8074
|
})
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
8075
|
+
})
|
|
8076
|
+
]
|
|
8077
|
+
})
|
|
8078
|
+
]
|
|
8079
|
+
})
|
|
8080
|
+
]
|
|
7935
8081
|
}) : showCustomControls && !showLicenseWarning && /* @__PURE__ */ jsxs("div", {
|
|
8082
|
+
className: "sc-controls-bar",
|
|
7936
8083
|
style: {
|
|
7937
8084
|
position: "absolute",
|
|
7938
8085
|
bottom: "".concat(10 * responsiveScale, "px"),
|
|
7939
8086
|
right: "".concat(10 * responsiveScale, "px"),
|
|
7940
|
-
transform: "none",
|
|
7941
8087
|
display: "flex",
|
|
7942
8088
|
flexDirection: isPortrait ? "column" : "row",
|
|
7943
|
-
gap: "".concat(
|
|
7944
|
-
zIndex: 10
|
|
8089
|
+
gap: "".concat(8 * responsiveScale, "px"),
|
|
8090
|
+
zIndex: 10,
|
|
8091
|
+
opacity: controlsVisible ? 1 : 0,
|
|
8092
|
+
transform: controlsVisible ? "translateY(0)" : "translateY(4px)",
|
|
8093
|
+
pointerEvents: controlsVisible ? "auto" : "none"
|
|
7945
8094
|
},
|
|
7946
8095
|
children: [
|
|
7947
8096
|
/* @__PURE__ */ jsxs("div", {
|
|
7948
8097
|
style: {
|
|
7949
|
-
position: "relative",
|
|
7950
8098
|
display: "flex",
|
|
7951
8099
|
alignItems: "center",
|
|
7952
|
-
|
|
7953
|
-
|
|
8100
|
+
background: "rgba(0, 0, 0, 0.6)",
|
|
8101
|
+
borderRadius: "".concat(18 * responsiveScale, "px"),
|
|
8102
|
+
padding: "2px"
|
|
7954
8103
|
},
|
|
7955
8104
|
onMouseEnter: function onMouseEnter() {
|
|
7956
8105
|
return setShowVolumeSlider(true);
|
|
@@ -7960,260 +8109,128 @@ var StormcloudVideoPlayerComponent = React.memo(function(props) {
|
|
|
7960
8109
|
},
|
|
7961
8110
|
children: [
|
|
7962
8111
|
/* @__PURE__ */ jsx("button", {
|
|
8112
|
+
className: "sc-ctrl-btn",
|
|
7963
8113
|
onClick: function onClick() {
|
|
7964
|
-
if (playerRef.current)
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
if (onVolumeToggle) {
|
|
7968
|
-
onVolumeToggle();
|
|
7969
|
-
}
|
|
7970
|
-
},
|
|
7971
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
7972
|
-
var target = e.currentTarget;
|
|
7973
|
-
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)";
|
|
7974
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
|
|
7975
|
-
},
|
|
7976
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
7977
|
-
var target = e.currentTarget;
|
|
7978
|
-
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)";
|
|
7979
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
|
|
8114
|
+
if (playerRef.current) playerRef.current.toggleMute();
|
|
8115
|
+
onVolumeToggle === null || onVolumeToggle === void 0 ? void 0 : onVolumeToggle();
|
|
8116
|
+
resetControlsTimer();
|
|
7980
8117
|
},
|
|
7981
8118
|
style: {
|
|
7982
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)",
|
|
7983
|
-
color: "#ffffff",
|
|
7984
|
-
border: "none",
|
|
7985
|
-
borderRadius: "".concat(18 * responsiveScale, "px"),
|
|
7986
8119
|
padding: "".concat(8 * responsiveScale, "px"),
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
justifyContent: "center",
|
|
7991
|
-
backdropFilter: "blur(20px)",
|
|
7992
|
-
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)",
|
|
7993
|
-
transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7994
|
-
minWidth: "".concat(46 * responsiveScale, "px"),
|
|
7995
|
-
minHeight: "".concat(46 * responsiveScale, "px")
|
|
8120
|
+
borderRadius: "50%",
|
|
8121
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
8122
|
+
minHeight: "".concat(36 * responsiveScale, "px")
|
|
7996
8123
|
},
|
|
7997
8124
|
title: isMuted ? "Unmute" : "Mute",
|
|
7998
|
-
children:
|
|
7999
|
-
size: Math.max(14,
|
|
8000
|
-
style: {
|
|
8001
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
8002
|
-
color: "#ffffff"
|
|
8003
|
-
}
|
|
8004
|
-
}) : volume < 0.5 ? /* @__PURE__ */ jsx(FaVolumeDown, {
|
|
8005
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
8006
|
-
style: {
|
|
8007
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
8008
|
-
color: "#ffffff"
|
|
8009
|
-
}
|
|
8010
|
-
}) : /* @__PURE__ */ jsx(FaVolumeUp, {
|
|
8011
|
-
size: Math.max(14, 16 * responsiveScale),
|
|
8012
|
-
style: {
|
|
8013
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
8014
|
-
color: "#ffffff"
|
|
8015
|
-
}
|
|
8125
|
+
children: /* @__PURE__ */ jsx(VolumeIcon, {
|
|
8126
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
8016
8127
|
})
|
|
8017
8128
|
}),
|
|
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
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
8060
|
-
setShowVolumeSlider(true);
|
|
8061
|
-
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)";
|
|
8062
|
-
e.currentTarget.style.borderColor = "rgba(96, 165, 250, 0.8)";
|
|
8063
|
-
},
|
|
8064
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
8065
|
-
setShowVolumeSlider(false);
|
|
8066
|
-
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)";
|
|
8067
|
-
e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.7)";
|
|
8068
|
-
},
|
|
8069
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
8129
|
+
/* @__PURE__ */ jsx("div", {
|
|
8130
|
+
style: {
|
|
8131
|
+
width: showVolumeSlider ? "".concat(62 * responsiveScale, "px") : "0px",
|
|
8132
|
+
overflow: "hidden",
|
|
8133
|
+
transition: "width 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
8134
|
+
display: "flex",
|
|
8135
|
+
alignItems: "center",
|
|
8136
|
+
paddingLeft: showVolumeSlider ? "2px" : "0",
|
|
8137
|
+
paddingRight: showVolumeSlider ? "6px" : "0"
|
|
8138
|
+
},
|
|
8139
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
8140
|
+
style: {
|
|
8141
|
+
position: "relative",
|
|
8142
|
+
width: "".concat(56 * responsiveScale, "px"),
|
|
8143
|
+
height: "3px",
|
|
8144
|
+
cursor: "pointer",
|
|
8145
|
+
borderRadius: "1.5px"
|
|
8146
|
+
},
|
|
8147
|
+
onMouseDown: function onMouseDown(e) {
|
|
8148
|
+
e.preventDefault();
|
|
8149
|
+
var el = e.currentTarget;
|
|
8150
|
+
var move = function move(ev) {
|
|
8151
|
+
var r2 = el.getBoundingClientRect();
|
|
8152
|
+
handleVolumeChange(Math.max(0, Math.min(1, (ev.clientX - r2.left) / r2.width)));
|
|
8153
|
+
};
|
|
8154
|
+
var up = function up1() {
|
|
8155
|
+
document.removeEventListener("mousemove", move);
|
|
8156
|
+
document.removeEventListener("mouseup", up);
|
|
8157
|
+
};
|
|
8158
|
+
document.addEventListener("mousemove", move);
|
|
8159
|
+
document.addEventListener("mouseup", up);
|
|
8160
|
+
var r = el.getBoundingClientRect();
|
|
8161
|
+
handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
|
|
8162
|
+
},
|
|
8163
|
+
onClick: function onClick(e) {
|
|
8164
|
+
e.stopPropagation();
|
|
8165
|
+
var r = e.currentTarget.getBoundingClientRect();
|
|
8166
|
+
handleVolumeChange(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)));
|
|
8167
|
+
},
|
|
8168
|
+
children: [
|
|
8169
|
+
/* @__PURE__ */ jsx("div", {
|
|
8070
8170
|
style: {
|
|
8071
|
-
position: "
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
|
|
8103
|
-
handleVolumeChange(percentage);
|
|
8104
|
-
},
|
|
8105
|
-
children: [
|
|
8106
|
-
/* @__PURE__ */ jsx("div", {
|
|
8107
|
-
style: {
|
|
8108
|
-
position: "absolute",
|
|
8109
|
-
bottom: "0",
|
|
8110
|
-
left: "0",
|
|
8111
|
-
width: "100%",
|
|
8112
|
-
height: "100%",
|
|
8113
|
-
background: "linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.5) 100%)",
|
|
8114
|
-
borderRadius: "4px",
|
|
8115
|
-
border: "1px solid rgba(255, 255, 255, 0.4)",
|
|
8116
|
-
boxShadow: "inset 0 1px 3px rgba(0, 0, 0, 0.3)"
|
|
8117
|
-
}
|
|
8118
|
-
}),
|
|
8119
|
-
/* @__PURE__ */ jsx("div", {
|
|
8120
|
-
style: {
|
|
8121
|
-
position: "absolute",
|
|
8122
|
-
bottom: "0",
|
|
8123
|
-
left: "0",
|
|
8124
|
-
width: "100%",
|
|
8125
|
-
height: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
8126
|
-
background: "linear-gradient(180deg, rgba(125, 211, 252, 1) 0%, rgba(96, 165, 250, 0.98) 50%, rgba(59, 130, 246, 0.95) 100%)",
|
|
8127
|
-
borderRadius: "4px",
|
|
8128
|
-
transition: "height 0.15s ease-out, box-shadow 0.2s ease-in-out",
|
|
8129
|
-
boxShadow: "0 0 12px rgba(96, 165, 250, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4)"
|
|
8130
|
-
}
|
|
8131
|
-
}),
|
|
8132
|
-
/* @__PURE__ */ jsx("div", {
|
|
8133
|
-
style: {
|
|
8134
|
-
position: "absolute",
|
|
8135
|
-
bottom: "calc(".concat((isMuted ? 0 : volume) * 100, "% - 8px)"),
|
|
8136
|
-
left: "50%",
|
|
8137
|
-
transform: "translateX(-50%)",
|
|
8138
|
-
width: "16px",
|
|
8139
|
-
height: "16px",
|
|
8140
|
-
background: "linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%)",
|
|
8141
|
-
borderRadius: "50%",
|
|
8142
|
-
border: "2px solid rgba(96, 165, 250, 0.9)",
|
|
8143
|
-
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)",
|
|
8144
|
-
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",
|
|
8145
|
-
cursor: "grab"
|
|
8146
|
-
},
|
|
8147
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
8148
|
-
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)";
|
|
8149
|
-
e.currentTarget.style.cursor = "grab";
|
|
8150
|
-
},
|
|
8151
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
8152
|
-
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)";
|
|
8153
|
-
},
|
|
8154
|
-
onMouseDown: function onMouseDown(e) {
|
|
8155
|
-
e.currentTarget.style.cursor = "grabbing";
|
|
8156
|
-
},
|
|
8157
|
-
onMouseUp: function onMouseUp(e) {
|
|
8158
|
-
e.currentTarget.style.cursor = "grab";
|
|
8159
|
-
}
|
|
8160
|
-
})
|
|
8161
|
-
]
|
|
8171
|
+
position: "absolute",
|
|
8172
|
+
inset: 0,
|
|
8173
|
+
background: "rgba(255, 255, 255, 0.2)",
|
|
8174
|
+
borderRadius: "1.5px"
|
|
8175
|
+
}
|
|
8176
|
+
}),
|
|
8177
|
+
/* @__PURE__ */ jsx("div", {
|
|
8178
|
+
style: {
|
|
8179
|
+
position: "absolute",
|
|
8180
|
+
top: 0,
|
|
8181
|
+
left: 0,
|
|
8182
|
+
bottom: 0,
|
|
8183
|
+
width: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
8184
|
+
background: "#fff",
|
|
8185
|
+
borderRadius: "1.5px",
|
|
8186
|
+
transition: "width 0.1s ease-out"
|
|
8187
|
+
}
|
|
8188
|
+
}),
|
|
8189
|
+
/* @__PURE__ */ jsx("div", {
|
|
8190
|
+
style: {
|
|
8191
|
+
position: "absolute",
|
|
8192
|
+
top: "50%",
|
|
8193
|
+
left: "".concat((isMuted ? 0 : volume) * 100, "%"),
|
|
8194
|
+
transform: "translate(-50%, -50%)",
|
|
8195
|
+
width: "12px",
|
|
8196
|
+
height: "12px",
|
|
8197
|
+
background: "#fff",
|
|
8198
|
+
borderRadius: "50%",
|
|
8199
|
+
boxShadow: "0 0 3px rgba(0, 0, 0, 0.3)",
|
|
8200
|
+
transition: "left 0.1s ease-out"
|
|
8201
|
+
}
|
|
8162
8202
|
})
|
|
8163
|
-
|
|
8164
|
-
|
|
8203
|
+
]
|
|
8204
|
+
})
|
|
8165
8205
|
})
|
|
8166
8206
|
]
|
|
8167
8207
|
}),
|
|
8168
8208
|
/* @__PURE__ */ jsx("button", {
|
|
8209
|
+
className: "sc-ctrl-btn",
|
|
8169
8210
|
onClick: function onClick() {
|
|
8170
8211
|
if (onFullscreenToggle) {
|
|
8171
8212
|
onFullscreenToggle();
|
|
8172
|
-
} else if (
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
}
|
|
8213
|
+
} else if (wrapperRef.current) {
|
|
8214
|
+
if (!document.fullscreenElement) {
|
|
8215
|
+
wrapperRef.current.requestFullscreen().catch(function() {});
|
|
8216
|
+
} else {
|
|
8217
|
+
document.exitFullscreen().catch(function() {});
|
|
8218
|
+
}
|
|
8176
8219
|
}
|
|
8177
|
-
|
|
8178
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
8179
|
-
var target = e.currentTarget;
|
|
8180
|
-
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)";
|
|
8181
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
|
|
8182
|
-
},
|
|
8183
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
8184
|
-
var target = e.currentTarget;
|
|
8185
|
-
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)";
|
|
8186
|
-
target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
|
|
8220
|
+
resetControlsTimer();
|
|
8187
8221
|
},
|
|
8188
8222
|
style: {
|
|
8189
|
-
background: "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)",
|
|
8190
|
-
color: "#ffffff",
|
|
8191
|
-
border: "none",
|
|
8192
|
-
borderRadius: "".concat(18 * responsiveScale, "px"),
|
|
8193
8223
|
padding: "".concat(8 * responsiveScale, "px"),
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
backdropFilter: "blur(20px)",
|
|
8199
|
-
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)",
|
|
8200
|
-
transition: "all 0.4s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
8201
|
-
minWidth: "".concat(46 * responsiveScale, "px"),
|
|
8202
|
-
minHeight: "".concat(46 * responsiveScale, "px")
|
|
8224
|
+
borderRadius: "50%",
|
|
8225
|
+
minWidth: "".concat(36 * responsiveScale, "px"),
|
|
8226
|
+
minHeight: "".concat(36 * responsiveScale, "px"),
|
|
8227
|
+
background: "rgba(0, 0, 0, 0.6)"
|
|
8203
8228
|
},
|
|
8204
8229
|
title: isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen",
|
|
8205
8230
|
children: isFullscreen ? /* @__PURE__ */ jsx(FaCompress, {
|
|
8206
|
-
size: Math.max(14,
|
|
8207
|
-
style: {
|
|
8208
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
8209
|
-
color: "#ffffff"
|
|
8210
|
-
}
|
|
8231
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
8211
8232
|
}) : /* @__PURE__ */ jsx(FaExpand, {
|
|
8212
|
-
size: Math.max(14,
|
|
8213
|
-
style: {
|
|
8214
|
-
filter: "drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))",
|
|
8215
|
-
color: "#ffffff"
|
|
8216
|
-
}
|
|
8233
|
+
size: Math.max(14, 18 * responsiveScale)
|
|
8217
8234
|
})
|
|
8218
8235
|
})
|
|
8219
8236
|
]
|
|
@@ -9486,5 +9503,5 @@ var createStormcloudPlayer = function createStormcloudPlayer(playerList, fallbac
|
|
|
9486
9503
|
};
|
|
9487
9504
|
var StormcloudPlayer = createStormcloudPlayer(players_default, players_default[players_default.length - 1]);
|
|
9488
9505
|
var StormcloudPlayer_default = StormcloudPlayer;
|
|
9489
|
-
export { IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, SUPPORTS_DASH, SUPPORTS_HLS, StormcloudPlayer_default as StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, canPlay, createHlsAdPlayer, createImaController, createStormcloudPlayer, StormcloudVideoPlayerComponent as default, detectBrowser, getBrowserConfigOverrides, getBrowserID, getClientInfo, getRecommendedAdPlayer, initializePolyfills, isMediaStream, lazy, logBrowserInfo, merge, omit, parseQuery, players_default as players, randomString, sendHeartbeat, sendInitialTracking, supportsFeature, supportsGoogleIMA, supportsModernJS, supportsWebKitPresentationMode };
|
|
9506
|
+
export { IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, SUPPORTS_DASH, SUPPORTS_HLS, StormcloudPlayer_default as StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, canPlay, createHlsAdPlayer, createImaController, createStormcloudPlayer, StormcloudVideoPlayerComponent as default, detectBrowser, getBrowserConfigOverrides, getBrowserID, getClientInfo, getRecommendedAdPlayer, initializePolyfills, isMediaStream, lazy, logBrowserInfo, merge, omit, parseQuery, players_default as players, randomString, sendAdDetectTracking, sendAdImpressionTracking, sendAdLoadedTracking, sendHeartbeat, sendInitialTracking, supportsFeature, supportsGoogleIMA, supportsModernJS, supportsWebKitPresentationMode };
|
|
9490
9507
|
//# sourceMappingURL=index.js.map
|