stormcloud-video-player 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -181,12 +181,22 @@ function _object_spread_props(target, source) {
181
181
  }
182
182
  function _object_without_properties(source, excluded) {
183
183
  if (source == null) return {};
184
- var target = _object_without_properties_loose(source, excluded);
185
- var key, i;
184
+ var target = {}, sourceKeys, key, i;
185
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
186
+ sourceKeys = Reflect.ownKeys(Object(source));
187
+ for(i = 0; i < sourceKeys.length; i++){
188
+ key = sourceKeys[i];
189
+ if (excluded.indexOf(key) >= 0) continue;
190
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
191
+ target[key] = source[key];
192
+ }
193
+ return target;
194
+ }
195
+ target = _object_without_properties_loose(source, excluded);
186
196
  if (Object.getOwnPropertySymbols) {
187
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
188
- for(i = 0; i < sourceSymbolKeys.length; i++){
189
- key = sourceSymbolKeys[i];
197
+ sourceKeys = Object.getOwnPropertySymbols(source);
198
+ for(i = 0; i < sourceKeys.length; i++){
199
+ key = sourceKeys[i];
190
200
  if (excluded.indexOf(key) >= 0) continue;
191
201
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
192
202
  target[key] = source[key];
@@ -196,12 +206,11 @@ function _object_without_properties(source, excluded) {
196
206
  }
197
207
  function _object_without_properties_loose(source, excluded) {
198
208
  if (source == null) return {};
199
- var target = {};
200
- var sourceKeys = Object.keys(source);
201
- var key, i;
209
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
202
210
  for(i = 0; i < sourceKeys.length; i++){
203
211
  key = sourceKeys[i];
204
212
  if (excluded.indexOf(key) >= 0) continue;
213
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
205
214
  target[key] = source[key];
206
215
  }
207
216
  return target;
@@ -254,9 +263,17 @@ function _ts_generator(thisArg, body) {
254
263
  },
255
264
  trys: [],
256
265
  ops: []
257
- }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
258
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
259
- return this;
266
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
267
+ return d(g, "next", {
268
+ value: verb(0)
269
+ }), d(g, "throw", {
270
+ value: verb(1)
271
+ }), d(g, "return", {
272
+ value: verb(2)
273
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
274
+ value: function() {
275
+ return this;
276
+ }
260
277
  }), g;
261
278
  function verb(n) {
262
279
  return function(v) {
@@ -356,20 +373,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
356
373
  var __getOwnPropNames = Object.getOwnPropertyNames;
357
374
  var __getProtoOf = Object.getPrototypeOf;
358
375
  var __hasOwnProp = Object.prototype.hasOwnProperty;
359
- var __export = function(target, all) {
376
+ var __export = function __export(target, all) {
360
377
  for(var name in all)__defProp(target, name, {
361
378
  get: all[name],
362
379
  enumerable: true
363
380
  });
364
381
  };
365
- var __copyProps = function(to, from, except, desc) {
382
+ var __copyProps = function __copyProps(to, from, except, desc) {
366
383
  if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
367
384
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
368
385
  try {
369
386
  var _loop = function() {
370
387
  var key = _step.value;
371
388
  if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
372
- get: function() {
389
+ get: function get() {
373
390
  return from[key];
374
391
  },
375
392
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
@@ -393,7 +410,7 @@ var __copyProps = function(to, from, except, desc) {
393
410
  }
394
411
  return to;
395
412
  };
396
- var __toESM = function(mod, isNodeMode, target) {
413
+ var __toESM = function __toESM(mod, isNodeMode, target) {
397
414
  return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
398
415
  // file that has been converted to a CommonJS file using a Babel-
399
416
  // compatible transform (i.e. "__esModule" has not been set), then set
@@ -403,7 +420,7 @@ var __toESM = function(mod, isNodeMode, target) {
403
420
  enumerable: true
404
421
  }) : target, mod);
405
422
  };
406
- var __toCommonJS = function(mod) {
423
+ var __toCommonJS = function __toCommonJS(mod) {
407
424
  return __copyProps(__defProp({}, "__esModule", {
408
425
  value: true
409
426
  }), mod);
@@ -411,112 +428,112 @@ var __toCommonJS = function(mod) {
411
428
  // src/index.ts
412
429
  var index_exports = {};
413
430
  __export(index_exports, {
414
- IS_BROWSER: function() {
431
+ IS_BROWSER: function IS_BROWSER1() {
415
432
  return IS_BROWSER;
416
433
  },
417
- IS_GLOBAL: function() {
434
+ IS_GLOBAL: function IS_GLOBAL1() {
418
435
  return IS_GLOBAL;
419
436
  },
420
- IS_IOS: function() {
437
+ IS_IOS: function IS_IOS1() {
421
438
  return IS_IOS;
422
439
  },
423
- IS_SAFARI: function() {
440
+ IS_SAFARI: function IS_SAFARI1() {
424
441
  return IS_SAFARI;
425
442
  },
426
- SUPPORTS_DASH: function() {
443
+ SUPPORTS_DASH: function SUPPORTS_DASH1() {
427
444
  return SUPPORTS_DASH;
428
445
  },
429
- SUPPORTS_HLS: function() {
446
+ SUPPORTS_HLS: function SUPPORTS_HLS1() {
430
447
  return SUPPORTS_HLS;
431
448
  },
432
- StormcloudPlayer: function() {
449
+ StormcloudPlayer: function StormcloudPlayer() {
433
450
  return StormcloudPlayer_default;
434
451
  },
435
- StormcloudVideoPlayer: function() {
452
+ StormcloudVideoPlayer: function StormcloudVideoPlayer1() {
436
453
  return StormcloudVideoPlayer;
437
454
  },
438
- StormcloudVideoPlayerComponent: function() {
455
+ StormcloudVideoPlayerComponent: function StormcloudVideoPlayerComponent1() {
439
456
  return StormcloudVideoPlayerComponent;
440
457
  },
441
- canPlay: function() {
458
+ canPlay: function canPlay1() {
442
459
  return canPlay;
443
460
  },
444
- createHlsAdPlayer: function() {
461
+ createHlsAdPlayer: function createHlsAdPlayer1() {
445
462
  return createHlsAdPlayer;
446
463
  },
447
- createImaController: function() {
464
+ createImaController: function createImaController1() {
448
465
  return createImaController;
449
466
  },
450
- createPrebidController: function() {
467
+ createPrebidController: function createPrebidController1() {
451
468
  return createPrebidController;
452
469
  },
453
- createPrebidManager: function() {
470
+ createPrebidManager: function createPrebidManager1() {
454
471
  return createPrebidManager;
455
472
  },
456
- createStormcloudPlayer: function() {
473
+ createStormcloudPlayer: function createStormcloudPlayer1() {
457
474
  return createStormcloudPlayer;
458
475
  },
459
- default: function() {
476
+ default: function _default() {
460
477
  return StormcloudVideoPlayerComponent;
461
478
  },
462
- detectBrowser: function() {
479
+ detectBrowser: function detectBrowser1() {
463
480
  return detectBrowser;
464
481
  },
465
- getBrowserConfigOverrides: function() {
482
+ getBrowserConfigOverrides: function getBrowserConfigOverrides1() {
466
483
  return getBrowserConfigOverrides;
467
484
  },
468
- getBrowserID: function() {
485
+ getBrowserID: function getBrowserID1() {
469
486
  return getBrowserID;
470
487
  },
471
- getClientInfo: function() {
488
+ getClientInfo: function getClientInfo1() {
472
489
  return getClientInfo;
473
490
  },
474
- getRecommendedAdPlayer: function() {
491
+ getRecommendedAdPlayer: function getRecommendedAdPlayer1() {
475
492
  return getRecommendedAdPlayer;
476
493
  },
477
- initializePolyfills: function() {
494
+ initializePolyfills: function initializePolyfills1() {
478
495
  return initializePolyfills;
479
496
  },
480
- isMediaStream: function() {
497
+ isMediaStream: function isMediaStream1() {
481
498
  return isMediaStream;
482
499
  },
483
- lazy: function() {
500
+ lazy: function lazy1() {
484
501
  return lazy;
485
502
  },
486
- logBrowserInfo: function() {
503
+ logBrowserInfo: function logBrowserInfo1() {
487
504
  return logBrowserInfo;
488
505
  },
489
- merge: function() {
506
+ merge: function merge1() {
490
507
  return merge;
491
508
  },
492
- omit: function() {
509
+ omit: function omit1() {
493
510
  return omit;
494
511
  },
495
- parseQuery: function() {
512
+ parseQuery: function parseQuery1() {
496
513
  return parseQuery;
497
514
  },
498
- players: function() {
515
+ players: function players() {
499
516
  return players_default;
500
517
  },
501
- randomString: function() {
518
+ randomString: function randomString1() {
502
519
  return randomString;
503
520
  },
504
- sendHeartbeat: function() {
521
+ sendHeartbeat: function sendHeartbeat1() {
505
522
  return sendHeartbeat;
506
523
  },
507
- sendInitialTracking: function() {
524
+ sendInitialTracking: function sendInitialTracking1() {
508
525
  return sendInitialTracking;
509
526
  },
510
- supportsFeature: function() {
527
+ supportsFeature: function supportsFeature1() {
511
528
  return supportsFeature;
512
529
  },
513
- supportsGoogleIMA: function() {
530
+ supportsGoogleIMA: function supportsGoogleIMA1() {
514
531
  return supportsGoogleIMA;
515
532
  },
516
- supportsModernJS: function() {
533
+ supportsModernJS: function supportsModernJS1() {
517
534
  return supportsModernJS;
518
535
  },
519
- supportsWebKitPresentationMode: function() {
536
+ supportsWebKitPresentationMode: function supportsWebKitPresentationMode1() {
520
537
  return supportsWebKitPresentationMode;
521
538
  }
522
539
  });
@@ -881,7 +898,7 @@ function createImaController(video, options) {
881
898
  var fn = _step.value;
882
899
  try {
883
900
  fn(payload);
884
- } catch (e) {}
901
+ } catch (unused) {}
885
902
  }
886
903
  } catch (err) {
887
904
  _didIteratorError = true;
@@ -919,7 +936,7 @@ function createImaController(video, options) {
919
936
  console.error("StormcloudVideoPlayer: The host page is inside a sandboxed iframe without 'allow-scripts'. Google IMA cannot run ads within sandboxed frames. Remove the sandbox attribute or include 'allow-scripts allow-same-origin'.");
920
937
  }
921
938
  }
922
- } catch (e) {}
939
+ } catch (unused) {}
923
940
  if (typeof window !== "undefined" && ((_window_google = window.google) === null || _window_google === void 0 ? void 0 : _window_google.ima)) return Promise.resolve();
924
941
  var existing = document.querySelector('script[data-ima="true"]');
925
942
  if (existing) {
@@ -1167,7 +1184,7 @@ function createImaController(video, options) {
1167
1184
  if (adsManager) {
1168
1185
  try {
1169
1186
  adsManager.destroy();
1170
- } catch (e) {}
1187
+ } catch (unused) {}
1171
1188
  adsManager = void 0;
1172
1189
  }
1173
1190
  if (adVideoElement) {
@@ -1178,7 +1195,7 @@ function createImaController(video, options) {
1178
1195
  if (adsLoader) {
1179
1196
  try {
1180
1197
  adsLoader.destroy();
1181
- } catch (e) {}
1198
+ } catch (unused) {}
1182
1199
  adsLoader = void 0;
1183
1200
  }
1184
1201
  }
@@ -1196,7 +1213,7 @@ function createImaController(video, options) {
1196
1213
  try {
1197
1214
  var _adDisplayContainer_initialize;
1198
1215
  (_adDisplayContainer_initialize = adDisplayContainer.initialize) === null || _adDisplayContainer_initialize === void 0 ? void 0 : _adDisplayContainer_initialize.call(adDisplayContainer);
1199
- } catch (e) {}
1216
+ } catch (unused) {}
1200
1217
  }
1201
1218
  }).catch(function() {});
1202
1219
  },
@@ -1355,7 +1372,7 @@ function createImaController(video, options) {
1355
1372
  window.setTimeout(function() {
1356
1373
  try {
1357
1374
  makeAdsRequest(google, lastAdTagUrl);
1358
- } catch (e) {}
1375
+ } catch (unused) {}
1359
1376
  }, delay);
1360
1377
  } else {
1361
1378
  emit("ad_error", {
@@ -1387,7 +1404,7 @@ function createImaController(video, options) {
1387
1404
  if (adsManager) {
1388
1405
  try {
1389
1406
  adsManager.setVolume(adVolume);
1390
- } catch (e) {}
1407
+ } catch (unused) {}
1391
1408
  }
1392
1409
  emit("content_pause");
1393
1410
  });
@@ -1401,7 +1418,7 @@ function createImaController(video, options) {
1401
1418
  if (adsManager) {
1402
1419
  try {
1403
1420
  adsManager.setVolume(originalMutedState ? 0 : adVolume);
1404
- } catch (e) {}
1421
+ } catch (unused) {}
1405
1422
  }
1406
1423
  }
1407
1424
  if (adContainerEl) {
@@ -1562,7 +1579,7 @@ function createImaController(video, options) {
1562
1579
  }
1563
1580
  try {
1564
1581
  adsManager.setVolume(originalMutedState ? 0 : adVolume);
1565
- } catch (e) {}
1582
+ } catch (unused) {}
1566
1583
  adsManager.start();
1567
1584
  return [
1568
1585
  2,
@@ -1644,7 +1661,7 @@ function createImaController(video, options) {
1644
1661
  try {
1645
1662
  ;
1646
1663
  adsManager === null || adsManager === void 0 ? void 0 : (_adsManager_stop = adsManager.stop) === null || _adsManager_stop === void 0 ? void 0 : _adsManager_stop.call(adsManager);
1647
- } catch (e) {}
1664
+ } catch (unused) {}
1648
1665
  destroyAdsManager();
1649
1666
  return [
1650
1667
  2
@@ -1675,7 +1692,7 @@ function createImaController(video, options) {
1675
1692
  try {
1676
1693
  var _adsLoader_destroy;
1677
1694
  adsLoader === null || adsLoader === void 0 ? void 0 : (_adsLoader_destroy = adsLoader.destroy) === null || _adsLoader_destroy === void 0 ? void 0 : _adsLoader_destroy.call(adsLoader);
1678
- } catch (e) {}
1695
+ } catch (unused) {}
1679
1696
  adDisplayContainer = void 0;
1680
1697
  adsLoader = void 0;
1681
1698
  contentVideoHidden = false;
@@ -1724,7 +1741,7 @@ function createImaController(video, options) {
1724
1741
  if (adsManager && adPlaying) {
1725
1742
  try {
1726
1743
  adsManager.setVolume(clampedVolume);
1727
- } catch (e) {}
1744
+ } catch (unused) {}
1728
1745
  }
1729
1746
  },
1730
1747
  getAdVolume: function getAdVolume() {
@@ -2640,8 +2657,8 @@ var DEFAULT_TIMEOUT_MS = 3e3;
2640
2657
  var AUCTION_URL = "https://sspproxy.adstorm.co/openrtb2/auction/adstorm";
2641
2658
  function createPrebidManager() {
2642
2659
  var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2643
- var initialized = false;
2644
2660
  var _options_debug;
2661
+ var initialized = false;
2645
2662
  var debug = (_options_debug = options.debug) !== null && _options_debug !== void 0 ? _options_debug : false;
2646
2663
  function log() {
2647
2664
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
@@ -3143,6 +3160,8 @@ function createPrebidController(contentVideo, options) {
3143
3160
  adContainerEl.style.display = "none";
3144
3161
  adContainerEl.style.pointerEvents = "none";
3145
3162
  }
3163
+ contentVideo.style.visibility = "visible";
3164
+ contentVideo.style.opacity = "1";
3146
3165
  if (options === null || options === void 0 ? void 0 : options.continueLiveStreamDuringAds) {
3147
3166
  if (contentVideo.paused) {
3148
3167
  console.log("".concat(LOG, " Content video paused in live mode, resuming playback"));
@@ -4451,7 +4470,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4451
4470
  });
4452
4471
  this.hls.on(import_hls3.default.Events.MANIFEST_PARSED, function(_, data) {
4453
4472
  return _async_to_generator(function() {
4454
- var _this_hls_levels, _this_hls, _this_hls_levels_some, adBehavior, _this_config_minSegmentsBeforePlay, minSegments, _this_video_play;
4473
+ var _this_config_minSegmentsBeforePlay, _ref, _this_hls_levels, _this_hls, adBehavior, minSegments, _this_video_play;
4455
4474
  return _ts_generator(this, function(_state) {
4456
4475
  switch(_state.label){
4457
4476
  case 0:
@@ -4460,10 +4479,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4460
4479
  } else {
4461
4480
  ;
4462
4481
  ;
4463
- this.isLiveStream = (_this_hls_levels_some = (_this_hls = this.hls) === null || _this_hls === void 0 ? void 0 : (_this_hls_levels = _this_hls.levels) === null || _this_hls_levels === void 0 ? void 0 : _this_hls_levels.some(function(level) {
4482
+ this.isLiveStream = (_ref = (_this_hls = this.hls) === null || _this_hls === void 0 ? void 0 : (_this_hls_levels = _this_hls.levels) === null || _this_hls_levels === void 0 ? void 0 : _this_hls_levels.some(function(level) {
4464
4483
  var _level_details, _level_details1;
4465
4484
  return (level === null || level === void 0 ? void 0 : (_level_details = level.details) === null || _level_details === void 0 ? void 0 : _level_details.live) === true || (level === null || level === void 0 ? void 0 : (_level_details1 = level.details) === null || _level_details1 === void 0 ? void 0 : _level_details1.type) === "LIVE";
4466
- })) !== null && _this_hls_levels_some !== void 0 ? _this_hls_levels_some : false;
4485
+ })) !== null && _ref !== void 0 ? _ref : false;
4467
4486
  }
4468
4487
  if (this.config.debugAdTiming) {
4469
4488
  adBehavior = this.shouldContinueLiveStreamDuringAds() ? "live (main video continues muted during ads)" : "vod (main video pauses during ads)";
@@ -4527,9 +4546,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4527
4546
  var tag = "";
4528
4547
  var value = "";
4529
4548
  if (Array.isArray(entry)) {
4530
- var _entry_;
4549
+ var _entry_, _entry_1;
4531
4550
  tag = String((_entry_ = entry[0]) !== null && _entry_ !== void 0 ? _entry_ : "");
4532
- var _entry_1;
4533
4551
  value = String((_entry_1 = entry[1]) !== null && _entry_1 !== void 0 ? _entry_1 : "");
4534
4552
  } else if (typeof entry === "string") {
4535
4553
  var idx = entry.indexOf(":");
@@ -4652,9 +4670,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4652
4670
  var tag = "";
4653
4671
  var value = "";
4654
4672
  if (Array.isArray(entry)) {
4655
- var _entry_;
4673
+ var _entry_, _entry_1;
4656
4674
  tag = String((_entry_ = entry[0]) !== null && _entry_ !== void 0 ? _entry_ : "");
4657
- var _entry_1;
4658
4675
  value = String((_entry_1 = entry[1]) !== null && _entry_1 !== void 0 ? _entry_1 : "");
4659
4676
  } else if (typeof entry === "string") {
4660
4677
  var idx = entry.indexOf(":");
@@ -4704,10 +4721,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4704
4721
  }
4705
4722
  });
4706
4723
  } else if (tag.includes("EXT-X-DATERANGE")) {
4724
+ var _attrs_CLASS;
4707
4725
  var attrs = _this.parseAttributeList(value);
4708
4726
  var hasScteOut = "SCTE35-OUT" in attrs || attrs["SCTE35-OUT"] !== void 0;
4709
4727
  var hasScteIn = "SCTE35-IN" in attrs || attrs["SCTE35-IN"] !== void 0;
4710
- var _attrs_CLASS;
4711
4728
  var klass = String((_attrs_CLASS = attrs["CLASS"]) !== null && _attrs_CLASS !== void 0 ? _attrs_CLASS : "");
4712
4729
  var duration = _this.toNumber(attrs["DURATION"]);
4713
4730
  if (hasScteOut || /com\.apple\.hls\.cue/i.test(klass)) {
@@ -5109,11 +5126,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5109
5126
  }
5110
5127
  var daterangeMatch = text.match(/EXT-X-DATERANGE:([^\r\n]*)/i);
5111
5128
  if (daterangeMatch) {
5112
- var _daterangeMatch_;
5129
+ var _daterangeMatch_, _attrs_CLASS;
5113
5130
  var attrs = this.parseAttributeList((_daterangeMatch_ = daterangeMatch[1]) !== null && _daterangeMatch_ !== void 0 ? _daterangeMatch_ : "");
5114
5131
  var hasScteOut = "SCTE35-OUT" in attrs || attrs["SCTE35-OUT"] !== void 0;
5115
5132
  var hasScteIn = "SCTE35-IN" in attrs || attrs["SCTE35-IN"] !== void 0;
5116
- var _attrs_CLASS;
5117
5133
  var klass = String((_attrs_CLASS = attrs["CLASS"]) !== null && _attrs_CLASS !== void 0 ? _attrs_CLASS : "");
5118
5134
  var duration = this.toNumber(attrs["DURATION"]);
5119
5135
  if (hasScteOut || /com\.apple\.hls\.cue/i.test(klass)) {
@@ -5189,7 +5205,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5189
5205
  var out = "";
5190
5206
  for(var i = 0; i < value.length; i++)out += String.fromCharCode(value[i]);
5191
5207
  return out;
5192
- } catch (e) {
5208
+ } catch (unused) {
5193
5209
  return void 0;
5194
5210
  }
5195
5211
  }
@@ -5208,6 +5224,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5208
5224
  });
5209
5225
  }
5210
5226
  if (marker.type === "start") {
5227
+ var _this_config_immediateManifestAds;
5211
5228
  var _this_pendingAdBreak;
5212
5229
  if (!this.video.muted) {
5213
5230
  this.video.muted = true;
@@ -5232,7 +5249,6 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5232
5249
  this.expectedAdBreakDurationMs = durationMs;
5233
5250
  this.currentAdBreakStartWallClockMs = Date.now();
5234
5251
  var isManifestMarker = this.isManifestBasedMarker(marker);
5235
- var _this_config_immediateManifestAds;
5236
5252
  var forceImmediate = (_this_config_immediateManifestAds = this.config.immediateManifestAds) !== null && _this_config_immediateManifestAds !== void 0 ? _this_config_immediateManifestAds : true;
5237
5253
  if (this.config.debugAdTiming) {
5238
5254
  console.log("[StormcloudVideoPlayer] Ad start decision:", {
@@ -5387,9 +5403,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5387
5403
  var regex = /([A-Z0-9-]+)=(("[^"]*")|([^",]*))(?:,|$)/gi;
5388
5404
  var match;
5389
5405
  while((match = regex.exec(value)) !== null){
5390
- var _match_;
5406
+ var _match_, _ref, _match_1;
5391
5407
  var key = (_match_ = match[1]) !== null && _match_ !== void 0 ? _match_ : "";
5392
- var _match_1, _ref;
5393
5408
  var rawVal = (_ref = (_match_1 = match[3]) !== null && _match_1 !== void 0 ? _match_1 : match[4]) !== null && _ref !== void 0 ? _ref : "";
5394
5409
  if (rawVal.startsWith('"') && rawVal.endsWith('"')) {
5395
5410
  rawVal = rawVal.slice(1, -1);
@@ -5748,13 +5763,13 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5748
5763
  {
5749
5764
  key: "shouldShowNativeControls",
5750
5765
  value: function shouldShowNativeControls() {
5766
+ var _this_config_showCustomControls;
5751
5767
  var streamType = this.getStreamType();
5752
5768
  if (streamType === "other") {
5753
- var _this_config_showCustomControls;
5754
- return !((_this_config_showCustomControls = this.config.showCustomControls) !== null && _this_config_showCustomControls !== void 0 ? _this_config_showCustomControls : false);
5769
+ var _this_config_showCustomControls1;
5770
+ return !((_this_config_showCustomControls1 = this.config.showCustomControls) !== null && _this_config_showCustomControls1 !== void 0 ? _this_config_showCustomControls1 : false);
5755
5771
  }
5756
- var _this_config_showCustomControls1;
5757
- return !!(this.config.allowNativeHls && !((_this_config_showCustomControls1 = this.config.showCustomControls) !== null && _this_config_showCustomControls1 !== void 0 ? _this_config_showCustomControls1 : false));
5772
+ return !!(this.config.allowNativeHls && !((_this_config_showCustomControls = this.config.showCustomControls) !== null && _this_config_showCustomControls !== void 0 ? _this_config_showCustomControls : false));
5758
5773
  }
5759
5774
  },
5760
5775
  {
@@ -5913,12 +5928,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5913
5928
  continueLiveStreamDuringAds = this.shouldContinueLiveStreamDuringAds();
5914
5929
  preloadIma = this.createAdPlayer(continueLiveStreamDuringAds);
5915
5930
  preloadIma.initialize();
5916
- errorListener = function(payload) {
5931
+ errorListener = function errorListener(payload) {
5917
5932
  hasAdError = true;
5918
5933
  adErrorPayload = payload;
5919
5934
  };
5920
5935
  preloadIma.on("ad_error", errorListener);
5921
- errorListenerCleanup = function() {
5936
+ errorListenerCleanup = function errorListenerCleanup() {
5922
5937
  return preloadIma.off("ad_error", errorListener);
5923
5938
  };
5924
5939
  return [
@@ -5969,7 +5984,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5969
5984
  isReady: true,
5970
5985
  loadPromise: Promise.resolve()
5971
5986
  };
5972
- lateErrorListener = function(payload) {
5987
+ lateErrorListener = function lateErrorListener(payload) {
5973
5988
  var index = _this.preloadPool.findIndex(function(entry) {
5974
5989
  return entry.vastUrl === vastUrl;
5975
5990
  });
@@ -5980,7 +5995,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5980
5995
  }
5981
5996
  try {
5982
5997
  preloadIma.destroy();
5983
- } catch (e) {}
5998
+ } catch (unused) {}
5984
5999
  }
5985
6000
  };
5986
6001
  preloadIma.on("ad_error", lateErrorListener);
@@ -6805,7 +6820,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
6805
6820
  10
6806
6821
  ];
6807
6822
  nextAdUrl = this.adRequestQueue.shift();
6808
- if (!nextAdUrl) {
6823
+ if (nextAdUrl == null) {
6809
6824
  return [
6810
6825
  3,
6811
6826
  4
@@ -6991,7 +7006,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
6991
7006
  9
6992
7007
  ];
6993
7008
  nextAdUrl = this.adRequestQueue.shift();
6994
- if (!nextAdUrl) {
7009
+ if (nextAdUrl == null) {
6995
7010
  return [
6996
7011
  3,
6997
7012
  3
@@ -7196,11 +7211,11 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7196
7211
  {
7197
7212
  key: "ensureAdStoppedByTimer",
7198
7213
  value: function ensureAdStoppedByTimer() {
7214
+ var _this_config_adBreakCheckIntervalMs, _this_expectedAdBreakDurationMs;
7199
7215
  if (!this.inAdBreak) return;
7200
7216
  this.adStopTimerId = void 0;
7201
7217
  var adPlaying = this.ima.isAdPlaying();
7202
7218
  var pendingAds = this.adPodQueue.length > 0;
7203
- var _this_config_adBreakCheckIntervalMs;
7204
7219
  var checkIntervalMs = Math.max(250, Math.floor((_this_config_adBreakCheckIntervalMs = this.config.adBreakCheckIntervalMs) !== null && _this_config_adBreakCheckIntervalMs !== void 0 ? _this_config_adBreakCheckIntervalMs : 1e3));
7205
7220
  var maxExtensionMsConfig = this.config.maxAdBreakExtensionMs;
7206
7221
  var maxExtensionMs = typeof maxExtensionMsConfig === "number" && maxExtensionMsConfig > 0 ? maxExtensionMsConfig : 6e4;
@@ -7208,7 +7223,6 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7208
7223
  if (this.currentAdBreakStartWallClockMs != null) {
7209
7224
  elapsedSinceStartMs = Date.now() - this.currentAdBreakStartWallClockMs;
7210
7225
  }
7211
- var _this_expectedAdBreakDurationMs;
7212
7226
  var expectedDurationMs = (_this_expectedAdBreakDurationMs = this.expectedAdBreakDurationMs) !== null && _this_expectedAdBreakDurationMs !== void 0 ? _this_expectedAdBreakDurationMs : 0;
7213
7227
  var overrunMs = Math.max(0, elapsedSinceStartMs - expectedDurationMs);
7214
7228
  var shouldExtendAdBreak = (adPlaying || pendingAds || this.showAds) && overrunMs < maxExtensionMs;
@@ -7465,15 +7479,17 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7465
7479
  9
7466
7480
  ];
7467
7481
  case 9:
7468
- if (this.isTemporaryAdError(playError)) {
7469
- this.temporaryFailureUrls.set(vastTagUrl, Date.now());
7470
- if (this.config.debugAdTiming) {
7471
- console.log("[AD-ERROR] Temporary play error - URL can be retried after cooldown");
7472
- }
7473
- } else {
7474
- this.failedVastUrls.add(vastTagUrl);
7475
- if (this.config.debugAdTiming) {
7476
- console.log("[AD-ERROR] Permanent play error - URL blacklisted");
7482
+ if (vastTagUrl) {
7483
+ if (this.isTemporaryAdError(playError)) {
7484
+ this.temporaryFailureUrls.set(vastTagUrl, Date.now());
7485
+ if (this.config.debugAdTiming) {
7486
+ console.log("[AD-ERROR] Temporary play error - URL can be retried after cooldown");
7487
+ }
7488
+ } else {
7489
+ this.failedVastUrls.add(vastTagUrl);
7490
+ if (this.config.debugAdTiming) {
7491
+ console.log("[AD-ERROR] Permanent play error - URL blacklisted");
7492
+ }
7477
7493
  }
7478
7494
  }
7479
7495
  this.clearAdFailsafeTimer();
@@ -7542,15 +7558,17 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7542
7558
  15
7543
7559
  ];
7544
7560
  case 15:
7545
- if (this.isTemporaryAdError(error)) {
7546
- this.temporaryFailureUrls.set(vastTagUrl, Date.now());
7547
- if (this.config.debugAdTiming) {
7548
- console.log("[AD-ERROR] Temporary error (no-fill/timeout) - URL can be retried after cooldown");
7549
- }
7550
- } else {
7551
- this.failedVastUrls.add(vastTagUrl);
7552
- if (this.config.debugAdTiming) {
7553
- console.log("[AD-ERROR] Permanent error - URL blacklisted:", errorMessage);
7561
+ if (vastTagUrl) {
7562
+ if (this.isTemporaryAdError(error)) {
7563
+ this.temporaryFailureUrls.set(vastTagUrl, Date.now());
7564
+ if (this.config.debugAdTiming) {
7565
+ console.log("[AD-ERROR] Temporary error (no-fill/timeout) - URL can be retried after cooldown");
7566
+ }
7567
+ } else {
7568
+ this.failedVastUrls.add(vastTagUrl);
7569
+ if (this.config.debugAdTiming) {
7570
+ console.log("[AD-ERROR] Permanent error - URL blacklisted:", errorMessage);
7571
+ }
7554
7572
  }
7555
7573
  }
7556
7574
  this.clearAdRequestWatchdog();
@@ -7653,8 +7671,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7653
7671
  key: "startAdRequestWatchdog",
7654
7672
  value: function startAdRequestWatchdog(token) {
7655
7673
  var _this = this;
7656
- this.clearAdRequestWatchdog();
7657
7674
  var _this_config_adFailsafeTimeoutMs;
7675
+ this.clearAdRequestWatchdog();
7658
7676
  var timeoutMs = (_this_config_adFailsafeTimeoutMs = this.config.adFailsafeTimeoutMs) !== null && _this_config_adFailsafeTimeoutMs !== void 0 ? _this_config_adFailsafeTimeoutMs : 1e4;
7659
7677
  this.adRequestWatchdogToken = token;
7660
7678
  this.adRequestWatchdogId = window.setTimeout(function() {
@@ -7697,8 +7715,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7697
7715
  key: "startAdFailsafeTimer",
7698
7716
  value: function startAdFailsafeTimer(token) {
7699
7717
  var _this = this;
7700
- this.clearAdFailsafeTimer();
7701
7718
  var _this_config_adFailsafeTimeoutMs;
7719
+ this.clearAdFailsafeTimer();
7702
7720
  var failsafeMs = (_this_config_adFailsafeTimeoutMs = this.config.adFailsafeTimeoutMs) !== null && _this_config_adFailsafeTimeoutMs !== void 0 ? _this_config_adFailsafeTimeoutMs : 1e4;
7703
7721
  this.adFailsafeToken = token;
7704
7722
  this.adFailsafeTimerId = window.setTimeout(function() {
@@ -8079,21 +8097,21 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8079
8097
  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];
8080
8098
  var _import_react_default_useState15 = _sliced_to_array(import_react.default.useState(typeof window !== "undefined" ? window.innerWidth : 1920), 2), viewportWidth = _import_react_default_useState15[0], setViewportWidth = _import_react_default_useState15[1];
8081
8099
  var _import_react_default_useState16 = _sliced_to_array(import_react.default.useState(typeof window !== "undefined" ? window.innerHeight > window.innerWidth : false), 2), isPortrait = _import_react_default_useState16[0], setIsPortrait = _import_react_default_useState16[1];
8082
- var getResponsiveScale = function() {
8100
+ var getResponsiveScale = function getResponsiveScale() {
8083
8101
  if (viewportWidth < 480) return 0.7;
8084
8102
  if (viewportWidth < 768) return 0.8;
8085
8103
  if (viewportWidth < 1024) return 0.9;
8086
8104
  return 1;
8087
8105
  };
8088
8106
  var responsiveScale = getResponsiveScale();
8089
- var formatTime = function(seconds) {
8107
+ var formatTime = function formatTime(seconds) {
8090
8108
  if (!isFinite(seconds)) return "0:00:00";
8091
8109
  var hours = Math.floor(seconds / 3600);
8092
8110
  var minutes = Math.floor(seconds % 3600 / 60);
8093
8111
  var remainingSeconds = Math.floor(seconds % 60);
8094
8112
  return "".concat(hours, ":").concat(minutes.toString().padStart(2, "0"), ":").concat(remainingSeconds.toString().padStart(2, "0"));
8095
8113
  };
8096
- var handlePlayPause = function() {
8114
+ var handlePlayPause = function handlePlayPause() {
8097
8115
  if (videoRef.current) {
8098
8116
  if (videoRef.current.paused) {
8099
8117
  var hasValidSource = videoRef.current.src || videoRef.current.currentSrc && videoRef.current.currentSrc !== "" || videoRef.current.readyState >= 1;
@@ -8112,7 +8130,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8112
8130
  }
8113
8131
  }
8114
8132
  };
8115
- var handleCenterPlayClick = function() {
8133
+ var handleCenterPlayClick = function handleCenterPlayClick() {
8116
8134
  if (videoRef.current && videoRef.current.paused) {
8117
8135
  var hasValidSource = videoRef.current.src || videoRef.current.currentSrc && videoRef.current.currentSrc !== "" || videoRef.current.readyState >= 1;
8118
8136
  if (hasValidSource) {
@@ -8126,7 +8144,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8126
8144
  }
8127
8145
  }
8128
8146
  };
8129
- var handleTimelineSeek = function(e) {
8147
+ var handleTimelineSeek = function handleTimelineSeek(e) {
8130
8148
  if (videoRef.current && duration > 0 && isFinite(duration)) {
8131
8149
  var rect = e.currentTarget.getBoundingClientRect();
8132
8150
  var clickX = e.clientX - rect.left;
@@ -8137,13 +8155,13 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8137
8155
  }
8138
8156
  }
8139
8157
  };
8140
- var handleVolumeChange = function(newVolume) {
8158
+ var handleVolumeChange = function handleVolumeChange(newVolume) {
8141
8159
  if (playerRef.current && isFinite(newVolume)) {
8142
8160
  var clampedVolume = Math.max(0, Math.min(1, newVolume));
8143
8161
  playerRef.current.setVolume(clampedVolume);
8144
8162
  }
8145
8163
  };
8146
- var handlePlaybackRateChange = function(rate) {
8164
+ var handlePlaybackRateChange = function handlePlaybackRateChange(rate) {
8147
8165
  if (videoRef.current && isFinite(rate) && rate > 0) {
8148
8166
  videoRef.current.playbackRate = rate;
8149
8167
  }
@@ -8181,7 +8199,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8181
8199
  if (playerRef.current) {
8182
8200
  try {
8183
8201
  playerRef.current.destroy();
8184
- } catch (e) {}
8202
+ } catch (unused) {}
8185
8203
  playerRef.current = null;
8186
8204
  }
8187
8205
  var cfg = {
@@ -8221,7 +8239,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8221
8239
  return function() {
8222
8240
  try {
8223
8241
  player.destroy();
8224
- } catch (e) {}
8242
+ } catch (unused) {}
8225
8243
  playerRef.current = null;
8226
8244
  };
8227
8245
  }, [
@@ -8245,7 +8263,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8245
8263
  ]);
8246
8264
  (0, import_react.useEffect)(function() {
8247
8265
  if (!playerRef.current) return;
8248
- var checkAdStatus = function() {
8266
+ var checkAdStatus = function checkAdStatus() {
8249
8267
  if (playerRef.current) {
8250
8268
  var _videoRef_current_dataset, _videoRef_current;
8251
8269
  var showAdsFromMethod = playerRef.current.isShowingAds();
@@ -8275,7 +8293,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8275
8293
  }, []);
8276
8294
  (0, import_react.useEffect)(function() {
8277
8295
  if (typeof window === "undefined" || !playerRef.current) return;
8278
- var handleResize = function() {
8296
+ var handleResize = function handleResize() {
8279
8297
  if (playerRef.current && videoRef.current) {
8280
8298
  if (typeof playerRef.current.resize === "function") {
8281
8299
  playerRef.current.resize();
@@ -8291,7 +8309,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8291
8309
  }, []);
8292
8310
  (0, import_react.useEffect)(function() {
8293
8311
  if (!playerRef.current || !videoRef.current) return;
8294
- var updateStates = function() {
8312
+ var updateStates = function updateStates() {
8295
8313
  var _videoRef_current;
8296
8314
  if (playerRef.current && videoRef.current) {
8297
8315
  setIsMuted(playerRef.current.isMuted());
@@ -8308,7 +8326,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8308
8326
  setIsFullscreen(document.fullscreenElement === ((_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.parentElement));
8309
8327
  };
8310
8328
  var interval = setInterval(updateStates, 200);
8311
- var handleFullscreenChange = function() {
8329
+ var handleFullscreenChange = function handleFullscreenChange() {
8312
8330
  var _videoRef_current;
8313
8331
  setIsFullscreen(document.fullscreenElement === ((_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.parentElement));
8314
8332
  };
@@ -8320,7 +8338,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8320
8338
  }, []);
8321
8339
  (0, import_react.useEffect)(function() {
8322
8340
  if (!videoRef.current) return;
8323
- var handleLoadedMetadata = function() {
8341
+ var handleLoadedMetadata = function handleLoadedMetadata() {
8324
8342
  if (videoRef.current) {
8325
8343
  var video2 = videoRef.current;
8326
8344
  void video2.offsetHeight;
@@ -8330,19 +8348,19 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8330
8348
  console.log("[StormcloudUI] Video event: loadedmetadata, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState);
8331
8349
  }
8332
8350
  };
8333
- var handleLoadedData = function() {
8351
+ var handleLoadedData = function handleLoadedData() {
8334
8352
  if (debugAdTiming) {
8335
8353
  var _videoRef_current;
8336
8354
  console.log("[StormcloudUI] Video event: loadeddata, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState);
8337
8355
  }
8338
8356
  };
8339
- var handleLoadStart = function() {
8357
+ var handleLoadStart = function handleLoadStart() {
8340
8358
  if (debugAdTiming) {
8341
8359
  var _videoRef_current;
8342
8360
  console.log("[StormcloudUI] Video event: loadstart, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState);
8343
8361
  }
8344
8362
  };
8345
- var handleCanPlay = function() {
8363
+ var handleCanPlay = function handleCanPlay() {
8346
8364
  setIsLoading(false);
8347
8365
  if (bufferingTimeoutRef.current) {
8348
8366
  clearTimeout(bufferingTimeoutRef.current);
@@ -8354,7 +8372,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8354
8372
  console.log("[StormcloudUI] Video event: canplay, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState, "- clearing loading state, isLoading=false");
8355
8373
  }
8356
8374
  };
8357
- var handleCanPlayThrough = function() {
8375
+ var handleCanPlayThrough = function handleCanPlayThrough() {
8358
8376
  setIsLoading(false);
8359
8377
  if (bufferingTimeoutRef.current) {
8360
8378
  clearTimeout(bufferingTimeoutRef.current);
@@ -8366,7 +8384,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8366
8384
  console.log("[StormcloudUI] Video event: canplaythrough, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState, "- clearing loading state, isLoading=false");
8367
8385
  }
8368
8386
  };
8369
- var handleWaiting = function() {
8387
+ var handleWaiting = function handleWaiting() {
8370
8388
  if (bufferingTimeoutRef.current) {
8371
8389
  clearTimeout(bufferingTimeoutRef.current);
8372
8390
  }
@@ -8382,7 +8400,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8382
8400
  console.log("[StormcloudUI] Video event: waiting, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState, "- buffering delay started (300ms)");
8383
8401
  }
8384
8402
  };
8385
- var handlePlaying = function() {
8403
+ var handlePlaying = function handlePlaying() {
8386
8404
  setIsLoading(false);
8387
8405
  if (bufferingTimeoutRef.current) {
8388
8406
  clearTimeout(bufferingTimeoutRef.current);
@@ -8395,7 +8413,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8395
8413
  console.log("[StormcloudUI] Video event: playing, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState, "- playback started, isLoading=false, isBuffering=false");
8396
8414
  }
8397
8415
  };
8398
- var handlePause = function() {
8416
+ var handlePause = function handlePause() {
8399
8417
  var _playerRef_current, _videoRef_current_dataset, _videoRef_current;
8400
8418
  var isAdActive = ((_playerRef_current = playerRef.current) === null || _playerRef_current === void 0 ? void 0 : _playerRef_current.isShowingAds()) || ((_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : (_videoRef_current_dataset = _videoRef_current.dataset) === null || _videoRef_current_dataset === void 0 ? void 0 : _videoRef_current_dataset.stormcloudAdPlaying) === "true";
8401
8419
  if (playerRef.current && !isAdActive) {
@@ -8404,7 +8422,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8404
8422
  setShowCenterPlay(false);
8405
8423
  }
8406
8424
  };
8407
- var handleEnded = function() {
8425
+ var handleEnded = function handleEnded() {
8408
8426
  setShowCenterPlay(true);
8409
8427
  };
8410
8428
  var video = videoRef.current;
@@ -8562,14 +8580,14 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8562
8580
  boxShadow: "0 12px 40px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.3)",
8563
8581
  transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
8564
8582
  },
8565
- onMouseEnter: function(e) {
8583
+ onMouseEnter: function onMouseEnter(e) {
8566
8584
  var target = e.currentTarget;
8567
8585
  target.style.transform = "translate(-50%, -50%)";
8568
8586
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(40, 40, 40, 0.9) 100%)";
8569
8587
  target.style.boxShadow = "0 16px 48px rgba(0, 0, 0, 0.9), inset 0 2px 0 rgba(255, 255, 255, 0.4)";
8570
8588
  target.style.borderColor = "rgba(255, 255, 255, 0.9)";
8571
8589
  },
8572
- onMouseLeave: function(e) {
8590
+ onMouseLeave: function onMouseLeave(e) {
8573
8591
  var target = e.currentTarget;
8574
8592
  target.style.transform = "translate(-50%, -50%)";
8575
8593
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.8) 100%)";
@@ -8676,12 +8694,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8676
8694
  minWidth: "".concat(48 * responsiveScale, "px"),
8677
8695
  minHeight: "".concat(48 * responsiveScale, "px")
8678
8696
  },
8679
- onMouseEnter: function(e) {
8697
+ onMouseEnter: function onMouseEnter(e) {
8680
8698
  var target = e.target;
8681
8699
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
8682
8700
  target.style.boxShadow = "0 12px 48px rgba(0, 0, 0, 0.6), 0 6px 24px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.4)";
8683
8701
  },
8684
- onMouseLeave: function(e) {
8702
+ onMouseLeave: function onMouseLeave(e) {
8685
8703
  var target = e.target;
8686
8704
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
8687
8705
  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)";
@@ -8707,15 +8725,15 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8707
8725
  padding: "8px",
8708
8726
  margin: "-8px"
8709
8727
  },
8710
- onMouseEnter: function() {
8728
+ onMouseEnter: function onMouseEnter() {
8711
8729
  return setShowVolumeSlider(true);
8712
8730
  },
8713
- onMouseLeave: function() {
8731
+ onMouseLeave: function onMouseLeave() {
8714
8732
  return setShowVolumeSlider(false);
8715
8733
  },
8716
8734
  children: [
8717
8735
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
8718
- onClick: function() {
8736
+ onClick: function onClick() {
8719
8737
  if (playerRef.current) {
8720
8738
  playerRef.current.toggleMute();
8721
8739
  }
@@ -8739,12 +8757,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8739
8757
  minWidth: "".concat(44 * responsiveScale, "px"),
8740
8758
  minHeight: "".concat(44 * responsiveScale, "px")
8741
8759
  },
8742
- onMouseEnter: function(e) {
8760
+ onMouseEnter: function onMouseEnter(e) {
8743
8761
  var target = e.target;
8744
8762
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
8745
8763
  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)";
8746
8764
  },
8747
- onMouseLeave: function(e) {
8765
+ onMouseLeave: function onMouseLeave(e) {
8748
8766
  var target = e.target;
8749
8767
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
8750
8768
  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)";
@@ -8780,10 +8798,10 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8780
8798
  marginBottom: "-16px",
8781
8799
  zIndex: 9
8782
8800
  },
8783
- onMouseEnter: function() {
8801
+ onMouseEnter: function onMouseEnter() {
8784
8802
  return setShowVolumeSlider(true);
8785
8803
  },
8786
- onMouseLeave: function() {
8804
+ onMouseLeave: function onMouseLeave() {
8787
8805
  return setShowVolumeSlider(false);
8788
8806
  }
8789
8807
  }),
@@ -8808,12 +8826,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8808
8826
  zIndex: 10,
8809
8827
  transition: "transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out"
8810
8828
  },
8811
- onMouseEnter: function(e) {
8829
+ onMouseEnter: function onMouseEnter(e) {
8812
8830
  setShowVolumeSlider(true);
8813
8831
  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)";
8814
8832
  e.currentTarget.style.borderColor = "rgba(59, 130, 246, 0.4)";
8815
8833
  },
8816
- onMouseLeave: function(e) {
8834
+ onMouseLeave: function onMouseLeave(e) {
8817
8835
  setShowVolumeSlider(false);
8818
8836
  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)";
8819
8837
  e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.15)";
@@ -8826,19 +8844,19 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8826
8844
  cursor: "pointer",
8827
8845
  transition: "transform 0.2s ease-in-out"
8828
8846
  },
8829
- onMouseEnter: function(e) {},
8830
- onMouseLeave: function(e) {},
8831
- onMouseDown: function(e) {
8847
+ onMouseEnter: function onMouseEnter(e) {},
8848
+ onMouseLeave: function onMouseLeave(e) {},
8849
+ onMouseDown: function onMouseDown(e) {
8832
8850
  e.preventDefault();
8833
8851
  var sliderElement = e.currentTarget;
8834
- var handleMouseMove = function(moveEvent) {
8852
+ var handleMouseMove = function handleMouseMove(moveEvent) {
8835
8853
  if (!sliderElement) return;
8836
8854
  var rect2 = sliderElement.getBoundingClientRect();
8837
8855
  var y2 = moveEvent.clientY - rect2.top;
8838
8856
  var percentage2 = 1 - Math.max(0, Math.min(1, y2 / rect2.height));
8839
8857
  handleVolumeChange(percentage2);
8840
8858
  };
8841
- var handleMouseUp = function() {
8859
+ var handleMouseUp = function handleMouseUp1() {
8842
8860
  document.removeEventListener("mousemove", handleMouseMove);
8843
8861
  document.removeEventListener("mouseup", handleMouseUp);
8844
8862
  };
@@ -8849,7 +8867,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8849
8867
  var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
8850
8868
  handleVolumeChange(percentage);
8851
8869
  },
8852
- onClick: function(e) {
8870
+ onClick: function onClick(e) {
8853
8871
  e.stopPropagation();
8854
8872
  var rect = e.currentTarget.getBoundingClientRect();
8855
8873
  var y = e.clientY - rect.top;
@@ -8896,17 +8914,17 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8896
8914
  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",
8897
8915
  cursor: "grab"
8898
8916
  },
8899
- onMouseEnter: function(e) {
8917
+ onMouseEnter: function onMouseEnter(e) {
8900
8918
  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)";
8901
8919
  e.currentTarget.style.cursor = "grab";
8902
8920
  },
8903
- onMouseLeave: function(e) {
8921
+ onMouseLeave: function onMouseLeave(e) {
8904
8922
  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)";
8905
8923
  },
8906
- onMouseDown: function(e) {
8924
+ onMouseDown: function onMouseDown(e) {
8907
8925
  e.currentTarget.style.cursor = "grabbing";
8908
8926
  },
8909
- onMouseUp: function(e) {
8927
+ onMouseUp: function onMouseUp(e) {
8910
8928
  e.currentTarget.style.cursor = "grab";
8911
8929
  }
8912
8930
  })
@@ -8946,7 +8964,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8946
8964
  },
8947
8965
  children: [
8948
8966
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
8949
- onClick: function() {
8967
+ onClick: function onClick() {
8950
8968
  return setShowSpeedMenu(!showSpeedMenu);
8951
8969
  },
8952
8970
  style: {
@@ -8965,12 +8983,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8965
8983
  minWidth: "".concat(56 * responsiveScale, "px"),
8966
8984
  minHeight: "".concat(40 * responsiveScale, "px")
8967
8985
  },
8968
- onMouseEnter: function(e) {
8986
+ onMouseEnter: function onMouseEnter(e) {
8969
8987
  var target = e.target;
8970
8988
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
8971
8989
  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)";
8972
8990
  },
8973
- onMouseLeave: function(e) {
8991
+ onMouseLeave: function onMouseLeave(e) {
8974
8992
  var target = e.target;
8975
8993
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
8976
8994
  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)";
@@ -9006,7 +9024,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9006
9024
  2
9007
9025
  ].map(function(speed) {
9008
9026
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
9009
- onClick: function() {
9027
+ onClick: function onClick() {
9010
9028
  return handlePlaybackRateChange(speed);
9011
9029
  },
9012
9030
  style: {
@@ -9024,12 +9042,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9024
9042
  transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
9025
9043
  borderBottom: speed !== 2 ? "1px solid rgba(255, 255, 255, 0.05)" : "none"
9026
9044
  },
9027
- onMouseEnter: function(e) {
9045
+ onMouseEnter: function onMouseEnter(e) {
9028
9046
  if (playbackRate !== speed) {
9029
9047
  e.target.style.background = "linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%)";
9030
9048
  }
9031
9049
  },
9032
- onMouseLeave: function(e) {
9050
+ onMouseLeave: function onMouseLeave(e) {
9033
9051
  if (playbackRate !== speed) {
9034
9052
  e.target.style.background = "transparent";
9035
9053
  }
@@ -9044,7 +9062,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9044
9062
  ]
9045
9063
  }),
9046
9064
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
9047
- onClick: function() {
9065
+ onClick: function onClick() {
9048
9066
  if (onFullscreenToggle) {
9049
9067
  onFullscreenToggle();
9050
9068
  } else if (playerRef.current) {
@@ -9069,12 +9087,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9069
9087
  minWidth: "".concat(44 * responsiveScale, "px"),
9070
9088
  minHeight: "".concat(44 * responsiveScale, "px")
9071
9089
  },
9072
- onMouseEnter: function(e) {
9090
+ onMouseEnter: function onMouseEnter(e) {
9073
9091
  var target = e.target;
9074
9092
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
9075
9093
  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)";
9076
9094
  },
9077
- onMouseLeave: function(e) {
9095
+ onMouseLeave: function onMouseLeave(e) {
9078
9096
  var target = e.target;
9079
9097
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
9080
9098
  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)";
@@ -9118,15 +9136,15 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9118
9136
  padding: "8px",
9119
9137
  margin: "-8px"
9120
9138
  },
9121
- onMouseEnter: function() {
9139
+ onMouseEnter: function onMouseEnter() {
9122
9140
  return setShowVolumeSlider(true);
9123
9141
  },
9124
- onMouseLeave: function() {
9142
+ onMouseLeave: function onMouseLeave() {
9125
9143
  return setShowVolumeSlider(false);
9126
9144
  },
9127
9145
  children: [
9128
9146
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
9129
- onClick: function() {
9147
+ onClick: function onClick() {
9130
9148
  if (playerRef.current) {
9131
9149
  playerRef.current.toggleMute();
9132
9150
  }
@@ -9134,12 +9152,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9134
9152
  onVolumeToggle();
9135
9153
  }
9136
9154
  },
9137
- onMouseEnter: function(e) {
9155
+ onMouseEnter: function onMouseEnter(e) {
9138
9156
  var target = e.currentTarget;
9139
9157
  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)";
9140
9158
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
9141
9159
  },
9142
- onMouseLeave: function(e) {
9160
+ onMouseLeave: function onMouseLeave(e) {
9143
9161
  var target = e.currentTarget;
9144
9162
  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)";
9145
9163
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
@@ -9194,10 +9212,10 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9194
9212
  marginBottom: "-16px",
9195
9213
  zIndex: 9
9196
9214
  },
9197
- onMouseEnter: function() {
9215
+ onMouseEnter: function onMouseEnter() {
9198
9216
  return setShowVolumeSlider(true);
9199
9217
  },
9200
- onMouseLeave: function() {
9218
+ onMouseLeave: function onMouseLeave() {
9201
9219
  return setShowVolumeSlider(false);
9202
9220
  }
9203
9221
  }),
@@ -9222,12 +9240,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9222
9240
  zIndex: 10,
9223
9241
  transition: "transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out"
9224
9242
  },
9225
- onMouseEnter: function(e) {
9243
+ onMouseEnter: function onMouseEnter(e) {
9226
9244
  setShowVolumeSlider(true);
9227
9245
  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)";
9228
9246
  e.currentTarget.style.borderColor = "rgba(96, 165, 250, 0.8)";
9229
9247
  },
9230
- onMouseLeave: function(e) {
9248
+ onMouseLeave: function onMouseLeave(e) {
9231
9249
  setShowVolumeSlider(false);
9232
9250
  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)";
9233
9251
  e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.7)";
@@ -9240,17 +9258,17 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9240
9258
  cursor: "pointer",
9241
9259
  transition: "transform 0.2s ease-in-out"
9242
9260
  },
9243
- onMouseDown: function(e) {
9261
+ onMouseDown: function onMouseDown(e) {
9244
9262
  e.preventDefault();
9245
9263
  var sliderElement = e.currentTarget;
9246
- var handleMouseMove = function(moveEvent) {
9264
+ var handleMouseMove = function handleMouseMove(moveEvent) {
9247
9265
  if (!sliderElement) return;
9248
9266
  var rect2 = sliderElement.getBoundingClientRect();
9249
9267
  var y2 = moveEvent.clientY - rect2.top;
9250
9268
  var percentage2 = 1 - Math.max(0, Math.min(1, y2 / rect2.height));
9251
9269
  handleVolumeChange(percentage2);
9252
9270
  };
9253
- var handleMouseUp = function() {
9271
+ var handleMouseUp = function handleMouseUp1() {
9254
9272
  document.removeEventListener("mousemove", handleMouseMove);
9255
9273
  document.removeEventListener("mouseup", handleMouseUp);
9256
9274
  };
@@ -9261,7 +9279,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9261
9279
  var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
9262
9280
  handleVolumeChange(percentage);
9263
9281
  },
9264
- onClick: function(e) {
9282
+ onClick: function onClick(e) {
9265
9283
  e.stopPropagation();
9266
9284
  var rect = e.currentTarget.getBoundingClientRect();
9267
9285
  var y = e.clientY - rect.top;
@@ -9310,17 +9328,17 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9310
9328
  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",
9311
9329
  cursor: "grab"
9312
9330
  },
9313
- onMouseEnter: function(e) {
9331
+ onMouseEnter: function onMouseEnter(e) {
9314
9332
  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)";
9315
9333
  e.currentTarget.style.cursor = "grab";
9316
9334
  },
9317
- onMouseLeave: function(e) {
9335
+ onMouseLeave: function onMouseLeave(e) {
9318
9336
  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)";
9319
9337
  },
9320
- onMouseDown: function(e) {
9338
+ onMouseDown: function onMouseDown(e) {
9321
9339
  e.currentTarget.style.cursor = "grabbing";
9322
9340
  },
9323
- onMouseUp: function(e) {
9341
+ onMouseUp: function onMouseUp(e) {
9324
9342
  e.currentTarget.style.cursor = "grab";
9325
9343
  }
9326
9344
  })
@@ -9332,7 +9350,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9332
9350
  ]
9333
9351
  }),
9334
9352
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
9335
- onClick: function() {
9353
+ onClick: function onClick() {
9336
9354
  if (onFullscreenToggle) {
9337
9355
  onFullscreenToggle();
9338
9356
  } else if (playerRef.current) {
@@ -9341,12 +9359,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9341
9359
  });
9342
9360
  }
9343
9361
  },
9344
- onMouseEnter: function(e) {
9362
+ onMouseEnter: function onMouseEnter(e) {
9345
9363
  var target = e.currentTarget;
9346
9364
  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)";
9347
9365
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
9348
9366
  },
9349
- onMouseLeave: function(e) {
9367
+ onMouseLeave: function onMouseLeave(e) {
9350
9368
  var target = e.currentTarget;
9351
9369
  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)";
9352
9370
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
@@ -9492,7 +9510,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9492
9510
  // src/StormcloudPlayer.tsx
9493
9511
  var import_react6 = __toESM(require("react"), 1);
9494
9512
  // src/props.ts
9495
- var noop = function() {};
9513
+ var noop = function noop() {};
9496
9514
  var defaultProps = {
9497
9515
  playing: false,
9498
9516
  loop: false,
@@ -9538,29 +9556,29 @@ var defaultProps = {
9538
9556
  // src/utils.ts
9539
9557
  var import_react2 = require("react");
9540
9558
  var lazy = import_react2.lazy;
9541
- var omit = function(object, keys) {
9559
+ var omit = function omit(object, keys) {
9542
9560
  var result = _object_spread({}, object);
9543
9561
  keys.forEach(function(key) {
9544
9562
  delete result[key];
9545
9563
  });
9546
9564
  return result;
9547
9565
  };
9548
- var isMediaStream = function(url) {
9566
+ var isMediaStream = function isMediaStream(url) {
9549
9567
  return typeof window !== "undefined" && window.MediaStream && _instanceof(url, window.MediaStream);
9550
9568
  };
9551
- var supportsWebKitPresentationMode = function() {
9569
+ var supportsWebKitPresentationMode = function supportsWebKitPresentationMode() {
9552
9570
  if (typeof window === "undefined") return false;
9553
9571
  var video = document.createElement("video");
9554
9572
  return "webkitSupportsPresentationMode" in video;
9555
9573
  };
9556
- var randomString = function() {
9574
+ var randomString = function randomString() {
9557
9575
  return Math.random().toString(36).substr(2, 9);
9558
9576
  };
9559
- var parseQuery = function(url) {
9577
+ var parseQuery = function parseQuery(url) {
9560
9578
  var query = {};
9561
9579
  var queryString = url.split("?")[1] || "";
9562
9580
  if (!queryString) return query;
9563
- var manualParse = function(qs) {
9581
+ var manualParse = function manualParse(qs) {
9564
9582
  qs.split("&").forEach(function(param) {
9565
9583
  var _param_split = _sliced_to_array(param.split("="), 2), key = _param_split[0], value = _param_split[1];
9566
9584
  if (key) {
@@ -9587,7 +9605,7 @@ var parseQuery = function(url) {
9587
9605
  }
9588
9606
  return query;
9589
9607
  };
9590
- var merge = function(target) {
9608
+ var merge = function merge1(target) {
9591
9609
  for(var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
9592
9610
  sources[_key - 1] = arguments[_key];
9593
9611
  }
@@ -9607,19 +9625,19 @@ var merge = function(target) {
9607
9625
  target
9608
9626
  ].concat(_to_consumable_array(sources)));
9609
9627
  };
9610
- var isObject = function(item) {
9628
+ var isObject = function isObject(item) {
9611
9629
  return item && (typeof item === "undefined" ? "undefined" : _type_of(item)) === "object" && !Array.isArray(item);
9612
9630
  };
9613
9631
  var IS_BROWSER = typeof window !== "undefined" && window.document;
9614
9632
  var IS_GLOBAL = typeof globalThis !== "undefined" && globalThis.window && globalThis.window.document;
9615
9633
  var IS_IOS = IS_BROWSER && /iPad|iPhone|iPod/.test(navigator.userAgent);
9616
9634
  var IS_SAFARI = IS_BROWSER && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
9617
- var SUPPORTS_HLS = function() {
9635
+ var SUPPORTS_HLS = function SUPPORTS_HLS() {
9618
9636
  if (!IS_BROWSER) return false;
9619
9637
  var video = document.createElement("video");
9620
9638
  return Boolean(video.canPlayType("application/vnd.apple.mpegurl"));
9621
9639
  };
9622
- var SUPPORTS_DASH = function() {
9640
+ var SUPPORTS_DASH = function SUPPORTS_DASH() {
9623
9641
  if (!IS_BROWSER) return false;
9624
9642
  var video = document.createElement("video");
9625
9643
  return Boolean(video.canPlayType("application/dash+xml"));
@@ -9631,23 +9649,23 @@ var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
9631
9649
  var VIDEO_EXTENSIONS = /\.(mp4|webm|ogg|avi|mov|wmv|flv|mkv)($|\?)/i;
9632
9650
  var AUDIO_EXTENSIONS = /\.(mp3|wav|ogg|aac|wma|flac|m4a)($|\?)/i;
9633
9651
  var canPlay = {
9634
- hls: function(url) {
9652
+ hls: function hls(url) {
9635
9653
  if (!url || typeof url !== "string") return false;
9636
9654
  return HLS_EXTENSIONS.test(url) || HLS_PATHS.test(url);
9637
9655
  },
9638
- dash: function(url) {
9656
+ dash: function dash(url) {
9639
9657
  if (!url || typeof url !== "string") return false;
9640
9658
  return DASH_EXTENSIONS.test(url);
9641
9659
  },
9642
- video: function(url) {
9660
+ video: function video(url) {
9643
9661
  if (!url || typeof url !== "string") return false;
9644
9662
  return VIDEO_EXTENSIONS.test(url);
9645
9663
  },
9646
- audio: function(url) {
9664
+ audio: function audio(url) {
9647
9665
  if (!url || typeof url !== "string") return false;
9648
9666
  return AUDIO_EXTENSIONS.test(url);
9649
9667
  },
9650
- file: function(url) {
9668
+ file: function file(url) {
9651
9669
  if (!url || typeof url !== "string") return false;
9652
9670
  return VIDEO_EXTENSIONS.test(url) || AUDIO_EXTENSIONS.test(url);
9653
9671
  }
@@ -9659,11 +9677,11 @@ var HlsPlayer = /*#__PURE__*/ function(_import_react3_Component) {
9659
9677
  function HlsPlayer() {
9660
9678
  _class_call_check(this, HlsPlayer);
9661
9679
  var _this;
9662
- var _this1, _arguments = arguments;
9663
- _this = _call_super(this, HlsPlayer, _to_consumable_array(_arguments)), _this1 = _this;
9664
- _this1.player = null;
9665
- _this1.mounted = false;
9666
- _this1.load = function() {
9680
+ var _this1;
9681
+ _this = _call_super(this, HlsPlayer, arguments), _this1 = _this;
9682
+ _this.player = null;
9683
+ _this.mounted = false;
9684
+ _this.load = function() {
9667
9685
  return _async_to_generator(function() {
9668
9686
  var _this_props_onMount, _this_props, config, _this_props_onReady, _this_props1, error, _this_props_onError, _this_props2;
9669
9687
  return _ts_generator(this, function(_state) {
@@ -9736,87 +9754,87 @@ var HlsPlayer = /*#__PURE__*/ function(_import_react3_Component) {
9736
9754
  });
9737
9755
  })();
9738
9756
  };
9739
- _this1.play = function() {
9740
- if (_this1.props.videoElement) {
9741
- var video = _this1.props.videoElement;
9757
+ _this.play = function() {
9758
+ if (_this.props.videoElement) {
9759
+ var video = _this.props.videoElement;
9742
9760
  var hasValidSource = video.src || video.currentSrc && video.currentSrc !== "" || video.readyState >= 1;
9743
9761
  if (hasValidSource) {
9744
9762
  var _video_play, _this_props_onPlay, _this_props;
9745
9763
  (_video_play = video.play()) === null || _video_play === void 0 ? void 0 : _video_play.catch(function(error) {
9746
9764
  var _this_props_onError, _this_props;
9747
9765
  console.error("[HlsPlayer] Failed to play:", error);
9748
- (_this_props_onError = (_this_props = _this1.props).onError) === null || _this_props_onError === void 0 ? void 0 : _this_props_onError.call(_this_props, error);
9766
+ (_this_props_onError = (_this_props = _this.props).onError) === null || _this_props_onError === void 0 ? void 0 : _this_props_onError.call(_this_props, error);
9749
9767
  });
9750
- (_this_props_onPlay = (_this_props = _this1.props).onPlay) === null || _this_props_onPlay === void 0 ? void 0 : _this_props_onPlay.call(_this_props);
9768
+ (_this_props_onPlay = (_this_props = _this.props).onPlay) === null || _this_props_onPlay === void 0 ? void 0 : _this_props_onPlay.call(_this_props);
9751
9769
  } else {
9752
9770
  console.warn("[HlsPlayer] Cannot play: video has no valid source");
9753
9771
  }
9754
9772
  }
9755
9773
  };
9756
- _this1.pause = function() {
9757
- if (_this1.props.videoElement) {
9774
+ _this.pause = function() {
9775
+ if (_this.props.videoElement) {
9758
9776
  var _this_props_onPause, _this_props;
9759
- _this1.props.videoElement.pause();
9760
- (_this_props_onPause = (_this_props = _this1.props).onPause) === null || _this_props_onPause === void 0 ? void 0 : _this_props_onPause.call(_this_props);
9777
+ _this.props.videoElement.pause();
9778
+ (_this_props_onPause = (_this_props = _this.props).onPause) === null || _this_props_onPause === void 0 ? void 0 : _this_props_onPause.call(_this_props);
9761
9779
  }
9762
9780
  };
9763
- _this1.stop = function() {
9764
- _this1.pause();
9765
- if (_this1.props.videoElement) {
9766
- _this1.props.videoElement.currentTime = 0;
9781
+ _this.stop = function() {
9782
+ _this.pause();
9783
+ if (_this.props.videoElement) {
9784
+ _this.props.videoElement.currentTime = 0;
9767
9785
  }
9768
9786
  };
9769
- _this1.seekTo = function(seconds, keepPlaying) {
9770
- if (_this1.props.videoElement) {
9771
- _this1.props.videoElement.currentTime = seconds;
9787
+ _this.seekTo = function(seconds, keepPlaying) {
9788
+ if (_this.props.videoElement) {
9789
+ _this.props.videoElement.currentTime = seconds;
9772
9790
  if (!keepPlaying) {
9773
- _this1.pause();
9791
+ _this.pause();
9774
9792
  }
9775
9793
  }
9776
9794
  };
9777
- _this1.setVolume = function(volume) {
9778
- if (_this1.props.videoElement) {
9779
- _this1.props.videoElement.volume = Math.max(0, Math.min(1, volume));
9795
+ _this.setVolume = function(volume) {
9796
+ if (_this.props.videoElement) {
9797
+ _this.props.videoElement.volume = Math.max(0, Math.min(1, volume));
9780
9798
  }
9781
9799
  };
9782
- _this1.mute = function() {
9783
- if (_this1.props.videoElement) {
9784
- _this1.props.videoElement.muted = true;
9800
+ _this.mute = function() {
9801
+ if (_this.props.videoElement) {
9802
+ _this.props.videoElement.muted = true;
9785
9803
  }
9786
9804
  };
9787
- _this1.unmute = function() {
9788
- if (_this1.props.videoElement) {
9789
- _this1.props.videoElement.muted = false;
9805
+ _this.unmute = function() {
9806
+ if (_this.props.videoElement) {
9807
+ _this.props.videoElement.muted = false;
9790
9808
  }
9791
9809
  };
9792
- _this1.setPlaybackRate = function(rate) {
9793
- if (_this1.props.videoElement && rate > 0) {
9794
- _this1.props.videoElement.playbackRate = rate;
9810
+ _this.setPlaybackRate = function(rate) {
9811
+ if (_this.props.videoElement && rate > 0) {
9812
+ _this.props.videoElement.playbackRate = rate;
9795
9813
  }
9796
9814
  };
9797
- _this1.getDuration = function() {
9798
- if (_this1.props.videoElement && isFinite(_this1.props.videoElement.duration)) {
9799
- return _this1.props.videoElement.duration;
9815
+ _this.getDuration = function() {
9816
+ if (_this.props.videoElement && isFinite(_this.props.videoElement.duration)) {
9817
+ return _this.props.videoElement.duration;
9800
9818
  }
9801
9819
  return null;
9802
9820
  };
9803
- _this1.getCurrentTime = function() {
9804
- if (_this1.props.videoElement && isFinite(_this1.props.videoElement.currentTime)) {
9805
- return _this1.props.videoElement.currentTime;
9821
+ _this.getCurrentTime = function() {
9822
+ if (_this.props.videoElement && isFinite(_this.props.videoElement.currentTime)) {
9823
+ return _this.props.videoElement.currentTime;
9806
9824
  }
9807
9825
  return null;
9808
9826
  };
9809
- _this1.getSecondsLoaded = function() {
9810
- if (_this1.props.videoElement && _this1.props.videoElement.buffered.length > 0) {
9811
- return _this1.props.videoElement.buffered.end(_this1.props.videoElement.buffered.length - 1);
9827
+ _this.getSecondsLoaded = function() {
9828
+ if (_this.props.videoElement && _this.props.videoElement.buffered.length > 0) {
9829
+ return _this.props.videoElement.buffered.end(_this.props.videoElement.buffered.length - 1);
9812
9830
  }
9813
9831
  return null;
9814
9832
  };
9815
- _this1.getInternalPlayer = function() {
9833
+ _this.getInternalPlayer = function() {
9816
9834
  var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "player";
9817
- if (key === "player") return _this1.player;
9818
- if (key === "video") return _this1.props.videoElement;
9819
- if (key === "hls" && _this1.player) return _this1.player.hls;
9835
+ if (key === "player") return _this.player;
9836
+ if (key === "video") return _this.props.videoElement;
9837
+ if (key === "hls" && _this.player) return _this.player.hls;
9820
9838
  return null;
9821
9839
  };
9822
9840
  return _this;
@@ -9865,49 +9883,49 @@ var FilePlayer = /*#__PURE__*/ function(_import_react4_Component) {
9865
9883
  function FilePlayer() {
9866
9884
  _class_call_check(this, FilePlayer);
9867
9885
  var _this;
9868
- var _this1, _arguments = arguments;
9869
- _this = _call_super(this, FilePlayer, _to_consumable_array(_arguments)), _this1 = _this;
9870
- _this1.mounted = false;
9871
- _this1.ready = false;
9872
- _this1.load = function() {
9886
+ var _this1;
9887
+ _this = _call_super(this, FilePlayer, arguments), _this1 = _this;
9888
+ _this.mounted = false;
9889
+ _this.ready = false;
9890
+ _this.load = function() {
9873
9891
  var _this_props_onMount, _this_props;
9874
- if (!_this1.props.videoElement || !_this1.props.src) return;
9875
- var video = _this1.props.videoElement;
9876
- var handleLoadedMetadata = function() {
9877
- if (_this1.mounted && !_this1.ready) {
9892
+ if (!_this.props.videoElement || !_this.props.src) return;
9893
+ var video = _this.props.videoElement;
9894
+ var handleLoadedMetadata = function handleLoadedMetadata() {
9895
+ if (_this.mounted && !_this.ready) {
9878
9896
  var _this_props_onReady, _this_props;
9879
- _this1.ready = true;
9880
- (_this_props_onReady = (_this_props = _this1.props).onReady) === null || _this_props_onReady === void 0 ? void 0 : _this_props_onReady.call(_this_props);
9897
+ _this.ready = true;
9898
+ (_this_props_onReady = (_this_props = _this.props).onReady) === null || _this_props_onReady === void 0 ? void 0 : _this_props_onReady.call(_this_props);
9881
9899
  }
9882
9900
  };
9883
- var handlePlay = function() {
9884
- if (_this1.mounted) {
9901
+ var handlePlay = function handlePlay() {
9902
+ if (_this.mounted) {
9885
9903
  var _this_props_onPlay, _this_props;
9886
- (_this_props_onPlay = (_this_props = _this1.props).onPlay) === null || _this_props_onPlay === void 0 ? void 0 : _this_props_onPlay.call(_this_props);
9904
+ (_this_props_onPlay = (_this_props = _this.props).onPlay) === null || _this_props_onPlay === void 0 ? void 0 : _this_props_onPlay.call(_this_props);
9887
9905
  }
9888
9906
  };
9889
- var handlePause = function() {
9890
- if (_this1.mounted) {
9907
+ var handlePause = function handlePause() {
9908
+ if (_this.mounted) {
9891
9909
  var _this_props_onPause, _this_props;
9892
- (_this_props_onPause = (_this_props = _this1.props).onPause) === null || _this_props_onPause === void 0 ? void 0 : _this_props_onPause.call(_this_props);
9910
+ (_this_props_onPause = (_this_props = _this.props).onPause) === null || _this_props_onPause === void 0 ? void 0 : _this_props_onPause.call(_this_props);
9893
9911
  }
9894
9912
  };
9895
- var handleEnded = function() {
9896
- if (_this1.mounted) {
9913
+ var handleEnded = function handleEnded() {
9914
+ if (_this.mounted) {
9897
9915
  var _this_props_onEnded, _this_props;
9898
- (_this_props_onEnded = (_this_props = _this1.props).onEnded) === null || _this_props_onEnded === void 0 ? void 0 : _this_props_onEnded.call(_this_props);
9916
+ (_this_props_onEnded = (_this_props = _this.props).onEnded) === null || _this_props_onEnded === void 0 ? void 0 : _this_props_onEnded.call(_this_props);
9899
9917
  }
9900
9918
  };
9901
- var handleError = function(error) {
9902
- if (_this1.mounted) {
9919
+ var handleError = function handleError(error) {
9920
+ if (_this.mounted) {
9903
9921
  var _this_props_onError, _this_props;
9904
- (_this_props_onError = (_this_props = _this1.props).onError) === null || _this_props_onError === void 0 ? void 0 : _this_props_onError.call(_this_props, error);
9922
+ (_this_props_onError = (_this_props = _this.props).onError) === null || _this_props_onError === void 0 ? void 0 : _this_props_onError.call(_this_props, error);
9905
9923
  }
9906
9924
  };
9907
- var handleLoadedData = function() {
9908
- if (_this1.mounted) {
9925
+ var handleLoadedData = function handleLoadedData() {
9926
+ if (_this.mounted) {
9909
9927
  var _this_props_onLoaded, _this_props;
9910
- (_this_props_onLoaded = (_this_props = _this1.props).onLoaded) === null || _this_props_onLoaded === void 0 ? void 0 : _this_props_onLoaded.call(_this_props);
9928
+ (_this_props_onLoaded = (_this_props = _this.props).onLoaded) === null || _this_props_onLoaded === void 0 ? void 0 : _this_props_onLoaded.call(_this_props);
9911
9929
  }
9912
9930
  };
9913
9931
  video.addEventListener("loadedmetadata", handleLoadedMetadata);
@@ -9916,15 +9934,15 @@ var FilePlayer = /*#__PURE__*/ function(_import_react4_Component) {
9916
9934
  video.addEventListener("ended", handleEnded);
9917
9935
  video.addEventListener("error", handleError);
9918
9936
  video.addEventListener("loadeddata", handleLoadedData);
9919
- video.src = _this1.props.src;
9920
- if (_this1.props.autoplay !== void 0) video.autoplay = _this1.props.autoplay;
9921
- if (_this1.props.muted !== void 0) video.muted = _this1.props.muted;
9922
- if (_this1.props.loop !== void 0) video.loop = _this1.props.loop;
9923
- if (_this1.props.controls !== void 0) video.controls = _this1.props.controls;
9924
- if (_this1.props.playsInline !== void 0) video.playsInline = _this1.props.playsInline;
9925
- if (_this1.props.preload !== void 0) video.preload = _this1.props.preload;
9926
- if (_this1.props.poster !== void 0) video.poster = _this1.props.poster;
9927
- (_this_props_onMount = (_this_props = _this1.props).onMount) === null || _this_props_onMount === void 0 ? void 0 : _this_props_onMount.call(_this_props, _this1);
9937
+ video.src = _this.props.src;
9938
+ if (_this.props.autoplay !== void 0) video.autoplay = _this.props.autoplay;
9939
+ if (_this.props.muted !== void 0) video.muted = _this.props.muted;
9940
+ if (_this.props.loop !== void 0) video.loop = _this.props.loop;
9941
+ if (_this.props.controls !== void 0) video.controls = _this.props.controls;
9942
+ if (_this.props.playsInline !== void 0) video.playsInline = _this.props.playsInline;
9943
+ if (_this.props.preload !== void 0) video.preload = _this.props.preload;
9944
+ if (_this.props.poster !== void 0) video.poster = _this.props.poster;
9945
+ (_this_props_onMount = (_this_props = _this.props).onMount) === null || _this_props_onMount === void 0 ? void 0 : _this_props_onMount.call(_this_props, _this);
9928
9946
  return function() {
9929
9947
  video.removeEventListener("loadedmetadata", handleLoadedMetadata);
9930
9948
  video.removeEventListener("play", handlePlay);
@@ -9934,90 +9952,90 @@ var FilePlayer = /*#__PURE__*/ function(_import_react4_Component) {
9934
9952
  video.removeEventListener("loadeddata", handleLoadedData);
9935
9953
  };
9936
9954
  };
9937
- _this1.play = function() {
9938
- if (_this1.props.videoElement) {
9939
- var video = _this1.props.videoElement;
9955
+ _this.play = function() {
9956
+ if (_this.props.videoElement) {
9957
+ var video = _this.props.videoElement;
9940
9958
  var hasValidSource = video.src || video.currentSrc && video.currentSrc !== "" || video.readyState >= 1;
9941
9959
  if (hasValidSource) {
9942
9960
  var _video_play;
9943
9961
  (_video_play = video.play()) === null || _video_play === void 0 ? void 0 : _video_play.catch(function(error) {
9944
9962
  var _this_props_onError, _this_props;
9945
9963
  console.error("[FilePlayer] Failed to play:", error);
9946
- (_this_props_onError = (_this_props = _this1.props).onError) === null || _this_props_onError === void 0 ? void 0 : _this_props_onError.call(_this_props, error);
9964
+ (_this_props_onError = (_this_props = _this.props).onError) === null || _this_props_onError === void 0 ? void 0 : _this_props_onError.call(_this_props, error);
9947
9965
  });
9948
9966
  } else {
9949
9967
  console.warn("[FilePlayer] Cannot play: video has no valid source");
9950
9968
  }
9951
9969
  }
9952
9970
  };
9953
- _this1.pause = function() {
9954
- if (_this1.props.videoElement) {
9955
- _this1.props.videoElement.pause();
9971
+ _this.pause = function() {
9972
+ if (_this.props.videoElement) {
9973
+ _this.props.videoElement.pause();
9956
9974
  }
9957
9975
  };
9958
- _this1.stop = function() {
9959
- _this1.pause();
9960
- if (_this1.props.videoElement) {
9961
- _this1.props.videoElement.currentTime = 0;
9976
+ _this.stop = function() {
9977
+ _this.pause();
9978
+ if (_this.props.videoElement) {
9979
+ _this.props.videoElement.currentTime = 0;
9962
9980
  }
9963
9981
  };
9964
- _this1.seekTo = function(seconds, keepPlaying) {
9965
- if (_this1.props.videoElement) {
9966
- _this1.props.videoElement.currentTime = seconds;
9982
+ _this.seekTo = function(seconds, keepPlaying) {
9983
+ if (_this.props.videoElement) {
9984
+ _this.props.videoElement.currentTime = seconds;
9967
9985
  if (!keepPlaying) {
9968
- _this1.pause();
9986
+ _this.pause();
9969
9987
  }
9970
9988
  }
9971
9989
  };
9972
- _this1.setVolume = function(volume) {
9973
- if (_this1.props.videoElement) {
9974
- _this1.props.videoElement.volume = Math.max(0, Math.min(1, volume));
9990
+ _this.setVolume = function(volume) {
9991
+ if (_this.props.videoElement) {
9992
+ _this.props.videoElement.volume = Math.max(0, Math.min(1, volume));
9975
9993
  }
9976
9994
  };
9977
- _this1.mute = function() {
9978
- if (_this1.props.videoElement) {
9979
- _this1.props.videoElement.muted = true;
9995
+ _this.mute = function() {
9996
+ if (_this.props.videoElement) {
9997
+ _this.props.videoElement.muted = true;
9980
9998
  }
9981
9999
  };
9982
- _this1.unmute = function() {
9983
- if (_this1.props.videoElement) {
9984
- _this1.props.videoElement.muted = false;
10000
+ _this.unmute = function() {
10001
+ if (_this.props.videoElement) {
10002
+ _this.props.videoElement.muted = false;
9985
10003
  }
9986
10004
  };
9987
- _this1.setPlaybackRate = function(rate) {
9988
- if (_this1.props.videoElement && rate > 0) {
9989
- _this1.props.videoElement.playbackRate = rate;
10005
+ _this.setPlaybackRate = function(rate) {
10006
+ if (_this.props.videoElement && rate > 0) {
10007
+ _this.props.videoElement.playbackRate = rate;
9990
10008
  }
9991
10009
  };
9992
- _this1.setLoop = function(loop) {
9993
- if (_this1.props.videoElement) {
9994
- _this1.props.videoElement.loop = loop;
10010
+ _this.setLoop = function(loop) {
10011
+ if (_this.props.videoElement) {
10012
+ _this.props.videoElement.loop = loop;
9995
10013
  }
9996
10014
  };
9997
- _this1.getDuration = function() {
9998
- if (_this1.props.videoElement && isFinite(_this1.props.videoElement.duration)) {
9999
- return _this1.props.videoElement.duration;
10015
+ _this.getDuration = function() {
10016
+ if (_this.props.videoElement && isFinite(_this.props.videoElement.duration)) {
10017
+ return _this.props.videoElement.duration;
10000
10018
  }
10001
10019
  return null;
10002
10020
  };
10003
- _this1.getCurrentTime = function() {
10004
- if (_this1.props.videoElement && isFinite(_this1.props.videoElement.currentTime)) {
10005
- return _this1.props.videoElement.currentTime;
10021
+ _this.getCurrentTime = function() {
10022
+ if (_this.props.videoElement && isFinite(_this.props.videoElement.currentTime)) {
10023
+ return _this.props.videoElement.currentTime;
10006
10024
  }
10007
10025
  return null;
10008
10026
  };
10009
- _this1.getSecondsLoaded = function() {
10010
- if (_this1.props.videoElement && _this1.props.videoElement.buffered.length > 0) {
10011
- return _this1.props.videoElement.buffered.end(_this1.props.videoElement.buffered.length - 1);
10027
+ _this.getSecondsLoaded = function() {
10028
+ if (_this.props.videoElement && _this.props.videoElement.buffered.length > 0) {
10029
+ return _this.props.videoElement.buffered.end(_this.props.videoElement.buffered.length - 1);
10012
10030
  }
10013
10031
  return null;
10014
10032
  };
10015
- _this1.getInternalPlayer = function() {
10033
+ _this.getInternalPlayer = function() {
10016
10034
  var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "player";
10017
- if (key === "video") return _this1.props.videoElement;
10035
+ if (key === "video") return _this.props.videoElement;
10018
10036
  return null;
10019
10037
  };
10020
- _this1.enablePIP = function() {
10038
+ _this.enablePIP = function() {
10021
10039
  return _async_to_generator(function() {
10022
10040
  var error;
10023
10041
  return _ts_generator(this, function(_state) {
@@ -10060,7 +10078,7 @@ var FilePlayer = /*#__PURE__*/ function(_import_react4_Component) {
10060
10078
  });
10061
10079
  })();
10062
10080
  };
10063
- _this1.disablePIP = function() {
10081
+ _this.disablePIP = function() {
10064
10082
  return _async_to_generator(function() {
10065
10083
  var error;
10066
10084
  return _ts_generator(this, function(_state) {
@@ -10154,7 +10172,7 @@ var players = [
10154
10172
  key: "file",
10155
10173
  name: "File Player",
10156
10174
  canPlay: canPlay.file,
10157
- canEnablePIP: function(url) {
10175
+ canEnablePIP: function canEnablePIP(url) {
10158
10176
  return canPlay.file(url) && (document.pictureInPictureEnabled || typeof document.webkitSupportsPresentationMode === "function");
10159
10177
  },
10160
10178
  lazyPlayer: lazy(function() {
@@ -10480,7 +10498,7 @@ var SUPPORTED_PROPS = [
10480
10498
  "onControlClick"
10481
10499
  ];
10482
10500
  var customPlayers = [];
10483
- var createStormcloudPlayer = function(playerList, fallback) {
10501
+ var createStormcloudPlayer = function createStormcloudPlayer(playerList, fallback) {
10484
10502
  var _a;
10485
10503
  return _a = /*#__PURE__*/ function(_import_react6_Component) {
10486
10504
  _inherits(_a, _import_react6_Component);
@@ -10492,10 +10510,10 @@ var createStormcloudPlayer = function(playerList, fallback) {
10492
10510
  showPreview: false
10493
10511
  };
10494
10512
  _this.references = {
10495
- wrapper: function(wrapper) {
10513
+ wrapper: function wrapper(wrapper) {
10496
10514
  _this.wrapper = wrapper;
10497
10515
  },
10498
- player: function(player) {
10516
+ player: function player(player) {
10499
10517
  _this.player = player;
10500
10518
  }
10501
10519
  };