stormcloud-video-player 0.5.2 → 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.
Files changed (43) hide show
  1. package/dist/stormcloud-vp.min.js +1 -1
  2. package/lib/index.cjs +370 -447
  3. package/lib/index.cjs.map +1 -1
  4. package/lib/index.d.cts +355 -267
  5. package/lib/index.d.ts +355 -267
  6. package/lib/index.js +329 -406
  7. package/lib/index.js.map +1 -1
  8. package/lib/player/StormcloudVideoPlayer.cjs +96 -178
  9. package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
  10. package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
  11. package/lib/players/FilePlayer.cjs +99 -116
  12. package/lib/players/FilePlayer.cjs.map +1 -1
  13. package/lib/players/HlsPlayer.cjs +148 -230
  14. package/lib/players/HlsPlayer.cjs.map +1 -1
  15. package/lib/players/HlsPlayer.d.cts +1 -1
  16. package/lib/players/index.cjs +227 -309
  17. package/lib/players/index.cjs.map +1 -1
  18. package/lib/sdk/hlsAdPlayer.cjs +17 -9
  19. package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
  20. package/lib/sdk/hlsAdPlayer.d.cts +1 -1
  21. package/lib/sdk/ima.cjs +28 -20
  22. package/lib/sdk/ima.cjs.map +1 -1
  23. package/lib/sdk/ima.d.cts +1 -1
  24. package/lib/sdk/prebid.cjs +27 -85
  25. package/lib/sdk/prebid.cjs.map +1 -1
  26. package/lib/sdk/prebid.d.cts +6 -3
  27. package/lib/sdk/prebidController.cjs +35 -108
  28. package/lib/sdk/prebidController.cjs.map +1 -1
  29. package/lib/sdk/prebidController.d.cts +3 -2
  30. package/lib/sdk/vastParser.cjs +19 -11
  31. package/lib/sdk/vastParser.cjs.map +1 -1
  32. package/lib/{types-g2d4Akez.d.cts → types-CRi_KrjM.d.cts} +1 -45
  33. package/lib/ui/StormcloudVideoPlayer.cjs +190 -267
  34. package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
  35. package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
  36. package/lib/utils/browserCompat.cjs +11 -11
  37. package/lib/utils/browserCompat.cjs.map +1 -1
  38. package/lib/utils/polyfills.cjs +13 -13
  39. package/lib/utils/polyfills.cjs.map +1 -1
  40. package/lib/utils/tracking.cjs +19 -11
  41. package/lib/utils/tracking.cjs.map +1 -1
  42. package/lib/utils/tracking.d.cts +1 -1
  43. package/package.json +1 -1
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() {
@@ -2637,12 +2654,12 @@ function createHlsAdPlayer(contentVideo, options) {
2637
2654
  }
2638
2655
  // src/sdk/prebid.ts
2639
2656
  var DEFAULT_TIMEOUT_MS = 3e3;
2640
- var AUCTION_PATH = "/openrtb2/auction";
2641
- function createPrebidManager(config) {
2657
+ var AUCTION_URL = "https://sspproxy.adstorm.co/openrtb2/auction/adstorm";
2658
+ function createPrebidManager() {
2659
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2660
+ var _options_debug;
2642
2661
  var initialized = false;
2643
- var serverUrl = "";
2644
- var _config_debug;
2645
- var debug = (_config_debug = config.debug) !== null && _config_debug !== void 0 ? _config_debug : false;
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++){
2648
2665
  args[_key] = arguments[_key];
@@ -2663,49 +2680,6 @@ function createPrebidManager(config) {
2663
2680
  "[Prebid]"
2664
2681
  ].concat(_to_consumable_array(args)));
2665
2682
  }
2666
- function resolveServerUrl() {
2667
- var _config_ortbRequest_ext_prebid_server, _config_ortbRequest_ext_prebid, _config_ortbRequest_ext, _config_ortbRequest;
2668
- if (config.serverUrl) {
2669
- return config.serverUrl.replace(/\/$/, "");
2670
- }
2671
- var extUrl = (_config_ortbRequest = config.ortbRequest) === null || _config_ortbRequest === void 0 ? void 0 : (_config_ortbRequest_ext = _config_ortbRequest.ext) === null || _config_ortbRequest_ext === void 0 ? void 0 : (_config_ortbRequest_ext_prebid = _config_ortbRequest_ext.prebid) === null || _config_ortbRequest_ext_prebid === void 0 ? void 0 : (_config_ortbRequest_ext_prebid_server = _config_ortbRequest_ext_prebid.server) === null || _config_ortbRequest_ext_prebid_server === void 0 ? void 0 : _config_ortbRequest_ext_prebid_server.externalurl;
2672
- if (typeof extUrl === "string" && extUrl.length > 0) {
2673
- return extUrl.replace(/\/$/, "");
2674
- }
2675
- throw new Error("Prebid Server URL not configured. Provide serverUrl in PrebidConfig or ext.prebid.server.externalurl in the OpenRTB request.");
2676
- }
2677
- function buildRequest() {
2678
- var req = JSON.parse(JSON.stringify(config.ortbRequest));
2679
- req.id = "".concat(req.id || "prebid", "-").concat(Date.now(), "-").concat(Math.random().toString(36).slice(2, 8));
2680
- if (!req.ext) req.ext = {};
2681
- if (!req.ext.prebid) req.ext.prebid = {};
2682
- if (!req.ext.prebid.cache) req.ext.prebid.cache = {};
2683
- if (!req.ext.prebid.cache.vastxml) req.ext.prebid.cache.vastxml = {};
2684
- if (!req.ext.prebid.targeting) {
2685
- req.ext.prebid.targeting = {
2686
- includewinners: true,
2687
- includebidderkeys: false
2688
- };
2689
- }
2690
- if (!req.device) req.device = {};
2691
- if (typeof navigator !== "undefined") {
2692
- if (!req.device.ua) req.device.ua = navigator.userAgent;
2693
- if (!req.device.language) {
2694
- req.device.language = (navigator.language || "").split("-")[0] || "en";
2695
- }
2696
- }
2697
- if (typeof window !== "undefined") {
2698
- var _window_screen, _window_screen1;
2699
- if (!req.device.w) req.device.w = ((_window_screen = window.screen) === null || _window_screen === void 0 ? void 0 : _window_screen.width) || window.innerWidth;
2700
- if (!req.device.h) req.device.h = ((_window_screen1 = window.screen) === null || _window_screen1 === void 0 ? void 0 : _window_screen1.height) || window.innerHeight;
2701
- }
2702
- if (!req.site) req.site = {};
2703
- if (typeof window !== "undefined") {
2704
- if (!req.site.page) req.site.page = window.location.href;
2705
- if (!req.site.domain) req.site.domain = window.location.hostname;
2706
- }
2707
- return req;
2708
- }
2709
2683
  function parseResponse(data) {
2710
2684
  var bids = [];
2711
2685
  var seatbids = (data === null || data === void 0 ? void 0 : data.seatbid) || [];
@@ -2775,12 +2749,6 @@ function createPrebidManager(config) {
2775
2749
  function extractVastUrl(bids) {
2776
2750
  if (bids.length === 0) return null;
2777
2751
  var winner = bids[0];
2778
- var _config_cpmFloor;
2779
- var cpmFloor = (_config_cpmFloor = config.cpmFloor) !== null && _config_cpmFloor !== void 0 ? _config_cpmFloor : 0;
2780
- if (cpmFloor > 0 && winner.cpm < cpmFloor) {
2781
- log("Winning bid $".concat(winner.cpm.toFixed(2), " below CPM floor $").concat(cpmFloor.toFixed(2), ", rejecting"));
2782
- return null;
2783
- }
2784
2752
  if (winner.vastUrl) {
2785
2753
  log("Using cached VAST URL from ".concat(winner.bidder, " ($").concat(winner.cpm.toFixed(2), " ").concat(winner.currency, ")"));
2786
2754
  return winner.vastUrl;
@@ -2802,22 +2770,12 @@ function createPrebidManager(config) {
2802
2770
  }
2803
2771
  function initialize() {
2804
2772
  return _async_to_generator(function() {
2805
- var _config_ortbRequest;
2806
2773
  return _ts_generator(this, function(_state) {
2807
2774
  if (initialized) return [
2808
2775
  2
2809
2776
  ];
2810
- serverUrl = resolveServerUrl();
2811
- if (!((_config_ortbRequest = config.ortbRequest) === null || _config_ortbRequest === void 0 ? void 0 : _config_ortbRequest.imp) || config.ortbRequest.imp.length === 0) {
2812
- throw new Error("No impressions (imp) defined in the OpenRTB request.");
2813
- }
2814
2777
  initialized = true;
2815
- log("Initialized with server:", serverUrl);
2816
- log("Bidders:", config.ortbRequest.imp.map(function(imp) {
2817
- var _imp_ext_prebid, _imp_ext;
2818
- var bidders = (_imp_ext = imp.ext) === null || _imp_ext === void 0 ? void 0 : (_imp_ext_prebid = _imp_ext.prebid) === null || _imp_ext_prebid === void 0 ? void 0 : _imp_ext_prebid.bidder;
2819
- return bidders ? Object.keys(bidders).join(", ") : "none";
2820
- }).join("; "));
2778
+ log("Initialized, auction URL:", AUCTION_URL);
2821
2779
  return [
2822
2780
  2
2823
2781
  ];
@@ -2826,17 +2784,15 @@ function createPrebidManager(config) {
2826
2784
  }
2827
2785
  function requestBids() {
2828
2786
  return _async_to_generator(function() {
2829
- var auctionUrl, request, _config_timeout, _ref, timeout, controller, timeoutId, _data_ext, _data_ext1, fetchOptions, response, body, data, bids, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, b, error;
2787
+ var timeout, controller, timeoutId, _data_ext, _data_ext1, fetchOptions, response, body, data, bids, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, b, error;
2830
2788
  return _ts_generator(this, function(_state) {
2831
2789
  switch(_state.label){
2832
2790
  case 0:
2833
2791
  if (!initialized) {
2834
2792
  throw new Error("Prebid not initialized. Call initialize() first.");
2835
2793
  }
2836
- auctionUrl = "".concat(serverUrl).concat(AUCTION_PATH);
2837
- request = buildRequest();
2838
- timeout = (_ref = (_config_timeout = config.timeout) !== null && _config_timeout !== void 0 ? _config_timeout : config.ortbRequest.tmax) !== null && _ref !== void 0 ? _ref : DEFAULT_TIMEOUT_MS;
2839
- log("Sending auction request to:", auctionUrl);
2794
+ timeout = DEFAULT_TIMEOUT_MS;
2795
+ log("Fetching auction response from:", AUCTION_URL);
2840
2796
  controller = typeof AbortController !== "undefined" ? new AbortController() : null;
2841
2797
  timeoutId = setTimeout(function() {
2842
2798
  controller === null || controller === void 0 ? void 0 : controller.abort();
@@ -2850,18 +2806,14 @@ function createPrebidManager(config) {
2850
2806
  7
2851
2807
  ]);
2852
2808
  fetchOptions = {
2853
- method: "POST",
2854
- headers: {
2855
- "Content-Type": "application/json"
2856
- },
2857
- body: JSON.stringify(request)
2809
+ method: "POST"
2858
2810
  };
2859
2811
  if (controller) {
2860
2812
  fetchOptions.signal = controller.signal;
2861
2813
  }
2862
2814
  return [
2863
2815
  4,
2864
- fetch(auctionUrl, fetchOptions)
2816
+ fetch(AUCTION_URL, fetchOptions)
2865
2817
  ];
2866
2818
  case 2:
2867
2819
  response = _state.sent();
@@ -2978,7 +2930,6 @@ function createPrebidManager(config) {
2978
2930
  }
2979
2931
  function destroy() {
2980
2932
  initialized = false;
2981
- serverUrl = "";
2982
2933
  log("Destroyed");
2983
2934
  }
2984
2935
  return {
@@ -2994,7 +2945,7 @@ function createPrebidManager(config) {
2994
2945
  // src/sdk/prebidController.ts
2995
2946
  var import_hls2 = __toESM(require("hls.js"), 1);
2996
2947
  var LOG = "[PrebidController]";
2997
- function createPrebidController(contentVideo, prebidConfig, options) {
2948
+ function createPrebidController(contentVideo, options) {
2998
2949
  var adPlaying = false;
2999
2950
  var originalMutedState = false;
3000
2951
  var originalVolume = Math.max(0, Math.min(1, contentVideo.volume || 1));
@@ -3008,11 +2959,9 @@ function createPrebidController(contentVideo, prebidConfig, options) {
3008
2959
  var sessionId;
3009
2960
  var destroyed = false;
3010
2961
  var trackingFired = createEmptyTrackingState();
3011
- var _prebidConfig_debug;
3012
- var prebidDebug = (_prebidConfig_debug = prebidConfig.debug) !== null && _prebidConfig_debug !== void 0 ? _prebidConfig_debug : false;
3013
- var prebidManager = createPrebidManager(_object_spread_props(_object_spread({}, prebidConfig), {
3014
- debug: prebidDebug
3015
- }));
2962
+ var prebidManager = createPrebidManager((options === null || options === void 0 ? void 0 : options.debug) !== void 0 ? {
2963
+ debug: options.debug
2964
+ } : {});
3016
2965
  var prebidInitialized = false;
3017
2966
  function emit(event, payload) {
3018
2967
  var set = listeners.get(event);
@@ -3211,6 +3160,8 @@ function createPrebidController(contentVideo, prebidConfig, options) {
3211
3160
  adContainerEl.style.display = "none";
3212
3161
  adContainerEl.style.pointerEvents = "none";
3213
3162
  }
3163
+ contentVideo.style.visibility = "visible";
3164
+ contentVideo.style.opacity = "1";
3214
3165
  if (options === null || options === void 0 ? void 0 : options.continueLiveStreamDuringAds) {
3215
3166
  if (contentVideo.paused) {
3216
3167
  console.log("".concat(LOG, " Content video paused in live mode, resuming playback"));
@@ -3235,19 +3186,12 @@ function createPrebidController(contentVideo, prebidConfig, options) {
3235
3186
  }
3236
3187
  function ensurePrebidInitialized() {
3237
3188
  return _async_to_generator(function() {
3238
- var _prebidConfig_ortbRequest_imp, _prebidConfig_ortbRequest;
3239
3189
  return _ts_generator(this, function(_state) {
3240
3190
  switch(_state.label){
3241
3191
  case 0:
3242
3192
  if (prebidInitialized) return [
3243
3193
  2
3244
3194
  ];
3245
- if (prebidConfig.enabled === false) {
3246
- throw new Error("Prebid is disabled in config");
3247
- }
3248
- if (!((_prebidConfig_ortbRequest = prebidConfig.ortbRequest) === null || _prebidConfig_ortbRequest === void 0 ? void 0 : (_prebidConfig_ortbRequest_imp = _prebidConfig_ortbRequest.imp) === null || _prebidConfig_ortbRequest_imp === void 0 ? void 0 : _prebidConfig_ortbRequest_imp.length)) {
3249
- throw new Error("No impressions configured in ortbRequest");
3250
- }
3251
3195
  return [
3252
3196
  4,
3253
3197
  prebidManager.initialize()
@@ -3265,7 +3209,7 @@ function createPrebidController(contentVideo, prebidConfig, options) {
3265
3209
  }
3266
3210
  function runPrebidAuction() {
3267
3211
  return _async_to_generator(function() {
3268
- var bids, _prebidConfig_cpmFloor, cpmFloor, winner;
3212
+ var bids, winner;
3269
3213
  return _ts_generator(this, function(_state) {
3270
3214
  switch(_state.label){
3271
3215
  case 0:
@@ -3288,15 +3232,7 @@ function createPrebidController(contentVideo, prebidConfig, options) {
3288
3232
  null
3289
3233
  ];
3290
3234
  }
3291
- cpmFloor = (_prebidConfig_cpmFloor = prebidConfig.cpmFloor) !== null && _prebidConfig_cpmFloor !== void 0 ? _prebidConfig_cpmFloor : 0;
3292
3235
  winner = bids[0];
3293
- if (cpmFloor > 0 && winner.cpm < cpmFloor) {
3294
- console.log("".concat(LOG, " Winning bid $").concat(winner.cpm.toFixed(2), " below CPM floor $").concat(cpmFloor.toFixed(2), ", rejecting"));
3295
- return [
3296
- 2,
3297
- null
3298
- ];
3299
- }
3300
3236
  console.log("".concat(LOG, " Winning bid: ").concat(winner.bidder, " $").concat(winner.cpm.toFixed(2), " ").concat(winner.currency));
3301
3237
  if (winner.vastXml) {
3302
3238
  console.log("".concat(LOG, " Parsing VAST XML from bid response (inline)"));
@@ -4401,22 +4337,14 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4401
4337
  adPlayerType = "hls";
4402
4338
  }
4403
4339
  if (adPlayerType === "prebid") {
4404
- if (!this.config.prebid) {
4405
- console.warn("[StormcloudVideoPlayer] adPlayerType is 'prebid' but no prebid config provided, falling back to HLS ad player");
4406
- return createHlsAdPlayer(this.video, _object_spread({
4407
- continueLiveStreamDuringAds: continueLiveStreamDuringAds
4408
- }, this.config.licenseKey ? {
4409
- licenseKey: this.config.licenseKey
4410
- } : {}, this.hls ? {
4411
- mainHlsInstance: this.hls
4412
- } : {}));
4413
- }
4414
4340
  if (this.config.debugAdTiming) {
4415
4341
  console.log("[StormcloudVideoPlayer] Creating Prebid ad controller (standalone, no IMA SDK)");
4416
4342
  }
4417
- return createPrebidController(this.video, this.config.prebid, _object_spread({
4343
+ return createPrebidController(this.video, _object_spread({
4418
4344
  continueLiveStreamDuringAds: continueLiveStreamDuringAds
4419
- }, this.config.licenseKey ? {
4345
+ }, this.config.debugAdTiming !== void 0 ? {
4346
+ debug: this.config.debugAdTiming
4347
+ } : {}, this.config.licenseKey ? {
4420
4348
  licenseKey: this.config.licenseKey
4421
4349
  } : {}, this.hls ? {
4422
4350
  mainHlsInstance: this.hls
@@ -4542,7 +4470,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4542
4470
  });
4543
4471
  this.hls.on(import_hls3.default.Events.MANIFEST_PARSED, function(_, data) {
4544
4472
  return _async_to_generator(function() {
4545
- 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;
4546
4474
  return _ts_generator(this, function(_state) {
4547
4475
  switch(_state.label){
4548
4476
  case 0:
@@ -4551,10 +4479,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4551
4479
  } else {
4552
4480
  ;
4553
4481
  ;
4554
- 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) {
4555
4483
  var _level_details, _level_details1;
4556
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";
4557
- })) !== null && _this_hls_levels_some !== void 0 ? _this_hls_levels_some : false;
4485
+ })) !== null && _ref !== void 0 ? _ref : false;
4558
4486
  }
4559
4487
  if (this.config.debugAdTiming) {
4560
4488
  adBehavior = this.shouldContinueLiveStreamDuringAds() ? "live (main video continues muted during ads)" : "vod (main video pauses during ads)";
@@ -4618,9 +4546,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4618
4546
  var tag = "";
4619
4547
  var value = "";
4620
4548
  if (Array.isArray(entry)) {
4621
- var _entry_;
4549
+ var _entry_, _entry_1;
4622
4550
  tag = String((_entry_ = entry[0]) !== null && _entry_ !== void 0 ? _entry_ : "");
4623
- var _entry_1;
4624
4551
  value = String((_entry_1 = entry[1]) !== null && _entry_1 !== void 0 ? _entry_1 : "");
4625
4552
  } else if (typeof entry === "string") {
4626
4553
  var idx = entry.indexOf(":");
@@ -4743,9 +4670,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4743
4670
  var tag = "";
4744
4671
  var value = "";
4745
4672
  if (Array.isArray(entry)) {
4746
- var _entry_;
4673
+ var _entry_, _entry_1;
4747
4674
  tag = String((_entry_ = entry[0]) !== null && _entry_ !== void 0 ? _entry_ : "");
4748
- var _entry_1;
4749
4675
  value = String((_entry_1 = entry[1]) !== null && _entry_1 !== void 0 ? _entry_1 : "");
4750
4676
  } else if (typeof entry === "string") {
4751
4677
  var idx = entry.indexOf(":");
@@ -4795,10 +4721,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4795
4721
  }
4796
4722
  });
4797
4723
  } else if (tag.includes("EXT-X-DATERANGE")) {
4724
+ var _attrs_CLASS;
4798
4725
  var attrs = _this.parseAttributeList(value);
4799
4726
  var hasScteOut = "SCTE35-OUT" in attrs || attrs["SCTE35-OUT"] !== void 0;
4800
4727
  var hasScteIn = "SCTE35-IN" in attrs || attrs["SCTE35-IN"] !== void 0;
4801
- var _attrs_CLASS;
4802
4728
  var klass = String((_attrs_CLASS = attrs["CLASS"]) !== null && _attrs_CLASS !== void 0 ? _attrs_CLASS : "");
4803
4729
  var duration = _this.toNumber(attrs["DURATION"]);
4804
4730
  if (hasScteOut || /com\.apple\.hls\.cue/i.test(klass)) {
@@ -5200,11 +5126,10 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5200
5126
  }
5201
5127
  var daterangeMatch = text.match(/EXT-X-DATERANGE:([^\r\n]*)/i);
5202
5128
  if (daterangeMatch) {
5203
- var _daterangeMatch_;
5129
+ var _daterangeMatch_, _attrs_CLASS;
5204
5130
  var attrs = this.parseAttributeList((_daterangeMatch_ = daterangeMatch[1]) !== null && _daterangeMatch_ !== void 0 ? _daterangeMatch_ : "");
5205
5131
  var hasScteOut = "SCTE35-OUT" in attrs || attrs["SCTE35-OUT"] !== void 0;
5206
5132
  var hasScteIn = "SCTE35-IN" in attrs || attrs["SCTE35-IN"] !== void 0;
5207
- var _attrs_CLASS;
5208
5133
  var klass = String((_attrs_CLASS = attrs["CLASS"]) !== null && _attrs_CLASS !== void 0 ? _attrs_CLASS : "");
5209
5134
  var duration = this.toNumber(attrs["DURATION"]);
5210
5135
  if (hasScteOut || /com\.apple\.hls\.cue/i.test(klass)) {
@@ -5280,7 +5205,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5280
5205
  var out = "";
5281
5206
  for(var i = 0; i < value.length; i++)out += String.fromCharCode(value[i]);
5282
5207
  return out;
5283
- } catch (e) {
5208
+ } catch (unused) {
5284
5209
  return void 0;
5285
5210
  }
5286
5211
  }
@@ -5299,6 +5224,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5299
5224
  });
5300
5225
  }
5301
5226
  if (marker.type === "start") {
5227
+ var _this_config_immediateManifestAds;
5302
5228
  var _this_pendingAdBreak;
5303
5229
  if (!this.video.muted) {
5304
5230
  this.video.muted = true;
@@ -5323,7 +5249,6 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5323
5249
  this.expectedAdBreakDurationMs = durationMs;
5324
5250
  this.currentAdBreakStartWallClockMs = Date.now();
5325
5251
  var isManifestMarker = this.isManifestBasedMarker(marker);
5326
- var _this_config_immediateManifestAds;
5327
5252
  var forceImmediate = (_this_config_immediateManifestAds = this.config.immediateManifestAds) !== null && _this_config_immediateManifestAds !== void 0 ? _this_config_immediateManifestAds : true;
5328
5253
  if (this.config.debugAdTiming) {
5329
5254
  console.log("[StormcloudVideoPlayer] Ad start decision:", {
@@ -5478,9 +5403,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5478
5403
  var regex = /([A-Z0-9-]+)=(("[^"]*")|([^",]*))(?:,|$)/gi;
5479
5404
  var match;
5480
5405
  while((match = regex.exec(value)) !== null){
5481
- var _match_;
5406
+ var _match_, _ref, _match_1;
5482
5407
  var key = (_match_ = match[1]) !== null && _match_ !== void 0 ? _match_ : "";
5483
- var _match_1, _ref;
5484
5408
  var rawVal = (_ref = (_match_1 = match[3]) !== null && _match_1 !== void 0 ? _match_1 : match[4]) !== null && _ref !== void 0 ? _ref : "";
5485
5409
  if (rawVal.startsWith('"') && rawVal.endsWith('"')) {
5486
5410
  rawVal = rawVal.slice(1, -1);
@@ -5839,13 +5763,13 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5839
5763
  {
5840
5764
  key: "shouldShowNativeControls",
5841
5765
  value: function shouldShowNativeControls() {
5766
+ var _this_config_showCustomControls;
5842
5767
  var streamType = this.getStreamType();
5843
5768
  if (streamType === "other") {
5844
- var _this_config_showCustomControls;
5845
- 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);
5846
5771
  }
5847
- var _this_config_showCustomControls1;
5848
- 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));
5849
5773
  }
5850
5774
  },
5851
5775
  {
@@ -6004,12 +5928,12 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
6004
5928
  continueLiveStreamDuringAds = this.shouldContinueLiveStreamDuringAds();
6005
5929
  preloadIma = this.createAdPlayer(continueLiveStreamDuringAds);
6006
5930
  preloadIma.initialize();
6007
- errorListener = function(payload) {
5931
+ errorListener = function errorListener(payload) {
6008
5932
  hasAdError = true;
6009
5933
  adErrorPayload = payload;
6010
5934
  };
6011
5935
  preloadIma.on("ad_error", errorListener);
6012
- errorListenerCleanup = function() {
5936
+ errorListenerCleanup = function errorListenerCleanup() {
6013
5937
  return preloadIma.off("ad_error", errorListener);
6014
5938
  };
6015
5939
  return [
@@ -6060,7 +5984,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
6060
5984
  isReady: true,
6061
5985
  loadPromise: Promise.resolve()
6062
5986
  };
6063
- lateErrorListener = function(payload) {
5987
+ lateErrorListener = function lateErrorListener(payload) {
6064
5988
  var index = _this.preloadPool.findIndex(function(entry) {
6065
5989
  return entry.vastUrl === vastUrl;
6066
5990
  });
@@ -6071,7 +5995,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
6071
5995
  }
6072
5996
  try {
6073
5997
  preloadIma.destroy();
6074
- } catch (e) {}
5998
+ } catch (unused) {}
6075
5999
  }
6076
6000
  };
6077
6001
  preloadIma.on("ad_error", lateErrorListener);
@@ -6896,7 +6820,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
6896
6820
  10
6897
6821
  ];
6898
6822
  nextAdUrl = this.adRequestQueue.shift();
6899
- if (!nextAdUrl) {
6823
+ if (nextAdUrl == null) {
6900
6824
  return [
6901
6825
  3,
6902
6826
  4
@@ -7082,7 +7006,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7082
7006
  9
7083
7007
  ];
7084
7008
  nextAdUrl = this.adRequestQueue.shift();
7085
- if (!nextAdUrl) {
7009
+ if (nextAdUrl == null) {
7086
7010
  return [
7087
7011
  3,
7088
7012
  3
@@ -7287,11 +7211,11 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7287
7211
  {
7288
7212
  key: "ensureAdStoppedByTimer",
7289
7213
  value: function ensureAdStoppedByTimer() {
7214
+ var _this_config_adBreakCheckIntervalMs, _this_expectedAdBreakDurationMs;
7290
7215
  if (!this.inAdBreak) return;
7291
7216
  this.adStopTimerId = void 0;
7292
7217
  var adPlaying = this.ima.isAdPlaying();
7293
7218
  var pendingAds = this.adPodQueue.length > 0;
7294
- var _this_config_adBreakCheckIntervalMs;
7295
7219
  var checkIntervalMs = Math.max(250, Math.floor((_this_config_adBreakCheckIntervalMs = this.config.adBreakCheckIntervalMs) !== null && _this_config_adBreakCheckIntervalMs !== void 0 ? _this_config_adBreakCheckIntervalMs : 1e3));
7296
7220
  var maxExtensionMsConfig = this.config.maxAdBreakExtensionMs;
7297
7221
  var maxExtensionMs = typeof maxExtensionMsConfig === "number" && maxExtensionMsConfig > 0 ? maxExtensionMsConfig : 6e4;
@@ -7299,7 +7223,6 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7299
7223
  if (this.currentAdBreakStartWallClockMs != null) {
7300
7224
  elapsedSinceStartMs = Date.now() - this.currentAdBreakStartWallClockMs;
7301
7225
  }
7302
- var _this_expectedAdBreakDurationMs;
7303
7226
  var expectedDurationMs = (_this_expectedAdBreakDurationMs = this.expectedAdBreakDurationMs) !== null && _this_expectedAdBreakDurationMs !== void 0 ? _this_expectedAdBreakDurationMs : 0;
7304
7227
  var overrunMs = Math.max(0, elapsedSinceStartMs - expectedDurationMs);
7305
7228
  var shouldExtendAdBreak = (adPlaying || pendingAds || this.showAds) && overrunMs < maxExtensionMs;
@@ -7556,15 +7479,17 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7556
7479
  9
7557
7480
  ];
7558
7481
  case 9:
7559
- if (this.isTemporaryAdError(playError)) {
7560
- this.temporaryFailureUrls.set(vastTagUrl, Date.now());
7561
- if (this.config.debugAdTiming) {
7562
- console.log("[AD-ERROR] Temporary play error - URL can be retried after cooldown");
7563
- }
7564
- } else {
7565
- this.failedVastUrls.add(vastTagUrl);
7566
- if (this.config.debugAdTiming) {
7567
- 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
+ }
7568
7493
  }
7569
7494
  }
7570
7495
  this.clearAdFailsafeTimer();
@@ -7633,15 +7558,17 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7633
7558
  15
7634
7559
  ];
7635
7560
  case 15:
7636
- if (this.isTemporaryAdError(error)) {
7637
- this.temporaryFailureUrls.set(vastTagUrl, Date.now());
7638
- if (this.config.debugAdTiming) {
7639
- console.log("[AD-ERROR] Temporary error (no-fill/timeout) - URL can be retried after cooldown");
7640
- }
7641
- } else {
7642
- this.failedVastUrls.add(vastTagUrl);
7643
- if (this.config.debugAdTiming) {
7644
- 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
+ }
7645
7572
  }
7646
7573
  }
7647
7574
  this.clearAdRequestWatchdog();
@@ -7744,8 +7671,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7744
7671
  key: "startAdRequestWatchdog",
7745
7672
  value: function startAdRequestWatchdog(token) {
7746
7673
  var _this = this;
7747
- this.clearAdRequestWatchdog();
7748
7674
  var _this_config_adFailsafeTimeoutMs;
7675
+ this.clearAdRequestWatchdog();
7749
7676
  var timeoutMs = (_this_config_adFailsafeTimeoutMs = this.config.adFailsafeTimeoutMs) !== null && _this_config_adFailsafeTimeoutMs !== void 0 ? _this_config_adFailsafeTimeoutMs : 1e4;
7750
7677
  this.adRequestWatchdogToken = token;
7751
7678
  this.adRequestWatchdogId = window.setTimeout(function() {
@@ -7788,8 +7715,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
7788
7715
  key: "startAdFailsafeTimer",
7789
7716
  value: function startAdFailsafeTimer(token) {
7790
7717
  var _this = this;
7791
- this.clearAdFailsafeTimer();
7792
7718
  var _this_config_adFailsafeTimeoutMs;
7719
+ this.clearAdFailsafeTimer();
7793
7720
  var failsafeMs = (_this_config_adFailsafeTimeoutMs = this.config.adFailsafeTimeoutMs) !== null && _this_config_adFailsafeTimeoutMs !== void 0 ? _this_config_adFailsafeTimeoutMs : 1e4;
7794
7721
  this.adFailsafeToken = token;
7795
7722
  this.adFailsafeTimerId = window.setTimeout(function() {
@@ -8113,11 +8040,10 @@ var CRITICAL_PROPS = [
8113
8040
  "lowLatencyMode",
8114
8041
  "driftToleranceMs",
8115
8042
  "vastMode",
8116
- "adPlayerType",
8117
- "prebid"
8043
+ "adPlayerType"
8118
8044
  ];
8119
8045
  var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8120
- 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, prebid = props.prebid, minSegmentsBeforePlay = props.minSegmentsBeforePlay, restVideoAttrs = _object_without_properties(props, [
8046
+ 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, [
8121
8047
  "src",
8122
8048
  "autoplay",
8123
8049
  "muted",
@@ -8145,7 +8071,6 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8145
8071
  "vastMode",
8146
8072
  "vastTagUrl",
8147
8073
  "adPlayerType",
8148
- "prebid",
8149
8074
  "minSegmentsBeforePlay"
8150
8075
  ]);
8151
8076
  var videoRef = (0, import_react.useRef)(null);
@@ -8172,21 +8097,21 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8172
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];
8173
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];
8174
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];
8175
- var getResponsiveScale = function() {
8100
+ var getResponsiveScale = function getResponsiveScale() {
8176
8101
  if (viewportWidth < 480) return 0.7;
8177
8102
  if (viewportWidth < 768) return 0.8;
8178
8103
  if (viewportWidth < 1024) return 0.9;
8179
8104
  return 1;
8180
8105
  };
8181
8106
  var responsiveScale = getResponsiveScale();
8182
- var formatTime = function(seconds) {
8107
+ var formatTime = function formatTime(seconds) {
8183
8108
  if (!isFinite(seconds)) return "0:00:00";
8184
8109
  var hours = Math.floor(seconds / 3600);
8185
8110
  var minutes = Math.floor(seconds % 3600 / 60);
8186
8111
  var remainingSeconds = Math.floor(seconds % 60);
8187
8112
  return "".concat(hours, ":").concat(minutes.toString().padStart(2, "0"), ":").concat(remainingSeconds.toString().padStart(2, "0"));
8188
8113
  };
8189
- var handlePlayPause = function() {
8114
+ var handlePlayPause = function handlePlayPause() {
8190
8115
  if (videoRef.current) {
8191
8116
  if (videoRef.current.paused) {
8192
8117
  var hasValidSource = videoRef.current.src || videoRef.current.currentSrc && videoRef.current.currentSrc !== "" || videoRef.current.readyState >= 1;
@@ -8205,7 +8130,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8205
8130
  }
8206
8131
  }
8207
8132
  };
8208
- var handleCenterPlayClick = function() {
8133
+ var handleCenterPlayClick = function handleCenterPlayClick() {
8209
8134
  if (videoRef.current && videoRef.current.paused) {
8210
8135
  var hasValidSource = videoRef.current.src || videoRef.current.currentSrc && videoRef.current.currentSrc !== "" || videoRef.current.readyState >= 1;
8211
8136
  if (hasValidSource) {
@@ -8219,7 +8144,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8219
8144
  }
8220
8145
  }
8221
8146
  };
8222
- var handleTimelineSeek = function(e) {
8147
+ var handleTimelineSeek = function handleTimelineSeek(e) {
8223
8148
  if (videoRef.current && duration > 0 && isFinite(duration)) {
8224
8149
  var rect = e.currentTarget.getBoundingClientRect();
8225
8150
  var clickX = e.clientX - rect.left;
@@ -8230,13 +8155,13 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8230
8155
  }
8231
8156
  }
8232
8157
  };
8233
- var handleVolumeChange = function(newVolume) {
8158
+ var handleVolumeChange = function handleVolumeChange(newVolume) {
8234
8159
  if (playerRef.current && isFinite(newVolume)) {
8235
8160
  var clampedVolume = Math.max(0, Math.min(1, newVolume));
8236
8161
  playerRef.current.setVolume(clampedVolume);
8237
8162
  }
8238
8163
  };
8239
- var handlePlaybackRateChange = function(rate) {
8164
+ var handlePlaybackRateChange = function handlePlaybackRateChange(rate) {
8240
8165
  if (videoRef.current && isFinite(rate) && rate > 0) {
8241
8166
  videoRef.current.playbackRate = rate;
8242
8167
  }
@@ -8255,8 +8180,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8255
8180
  lowLatencyMode,
8256
8181
  driftToleranceMs,
8257
8182
  vastMode,
8258
- adPlayerType,
8259
- prebid
8183
+ adPlayerType
8260
8184
  ]);
8261
8185
  (0, import_react.useEffect)(function() {
8262
8186
  if (typeof window === "undefined") return;
@@ -8275,7 +8199,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8275
8199
  if (playerRef.current) {
8276
8200
  try {
8277
8201
  playerRef.current.destroy();
8278
- } catch (e) {}
8202
+ } catch (unused) {}
8279
8203
  playerRef.current = null;
8280
8204
  }
8281
8205
  var cfg = {
@@ -8297,7 +8221,6 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8297
8221
  if (vastMode !== void 0) cfg.vastMode = vastMode;
8298
8222
  if (vastTagUrl !== void 0) cfg.vastTagUrl = vastTagUrl;
8299
8223
  if (adPlayerType !== void 0) cfg.adPlayerType = adPlayerType;
8300
- if (prebid !== void 0) cfg.prebid = prebid;
8301
8224
  if (minSegmentsBeforePlay !== void 0) cfg.minSegmentsBeforePlay = minSegmentsBeforePlay;
8302
8225
  var player = new StormcloudVideoPlayer(cfg);
8303
8226
  playerRef.current = player;
@@ -8316,7 +8239,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8316
8239
  return function() {
8317
8240
  try {
8318
8241
  player.destroy();
8319
- } catch (e) {}
8242
+ } catch (unused) {}
8320
8243
  playerRef.current = null;
8321
8244
  };
8322
8245
  }, [
@@ -8340,7 +8263,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8340
8263
  ]);
8341
8264
  (0, import_react.useEffect)(function() {
8342
8265
  if (!playerRef.current) return;
8343
- var checkAdStatus = function() {
8266
+ var checkAdStatus = function checkAdStatus() {
8344
8267
  if (playerRef.current) {
8345
8268
  var _videoRef_current_dataset, _videoRef_current;
8346
8269
  var showAdsFromMethod = playerRef.current.isShowingAds();
@@ -8370,7 +8293,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8370
8293
  }, []);
8371
8294
  (0, import_react.useEffect)(function() {
8372
8295
  if (typeof window === "undefined" || !playerRef.current) return;
8373
- var handleResize = function() {
8296
+ var handleResize = function handleResize() {
8374
8297
  if (playerRef.current && videoRef.current) {
8375
8298
  if (typeof playerRef.current.resize === "function") {
8376
8299
  playerRef.current.resize();
@@ -8386,7 +8309,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8386
8309
  }, []);
8387
8310
  (0, import_react.useEffect)(function() {
8388
8311
  if (!playerRef.current || !videoRef.current) return;
8389
- var updateStates = function() {
8312
+ var updateStates = function updateStates() {
8390
8313
  var _videoRef_current;
8391
8314
  if (playerRef.current && videoRef.current) {
8392
8315
  setIsMuted(playerRef.current.isMuted());
@@ -8403,7 +8326,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8403
8326
  setIsFullscreen(document.fullscreenElement === ((_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.parentElement));
8404
8327
  };
8405
8328
  var interval = setInterval(updateStates, 200);
8406
- var handleFullscreenChange = function() {
8329
+ var handleFullscreenChange = function handleFullscreenChange() {
8407
8330
  var _videoRef_current;
8408
8331
  setIsFullscreen(document.fullscreenElement === ((_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.parentElement));
8409
8332
  };
@@ -8415,7 +8338,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8415
8338
  }, []);
8416
8339
  (0, import_react.useEffect)(function() {
8417
8340
  if (!videoRef.current) return;
8418
- var handleLoadedMetadata = function() {
8341
+ var handleLoadedMetadata = function handleLoadedMetadata() {
8419
8342
  if (videoRef.current) {
8420
8343
  var video2 = videoRef.current;
8421
8344
  void video2.offsetHeight;
@@ -8425,19 +8348,19 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8425
8348
  console.log("[StormcloudUI] Video event: loadedmetadata, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState);
8426
8349
  }
8427
8350
  };
8428
- var handleLoadedData = function() {
8351
+ var handleLoadedData = function handleLoadedData() {
8429
8352
  if (debugAdTiming) {
8430
8353
  var _videoRef_current;
8431
8354
  console.log("[StormcloudUI] Video event: loadeddata, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState);
8432
8355
  }
8433
8356
  };
8434
- var handleLoadStart = function() {
8357
+ var handleLoadStart = function handleLoadStart() {
8435
8358
  if (debugAdTiming) {
8436
8359
  var _videoRef_current;
8437
8360
  console.log("[StormcloudUI] Video event: loadstart, readyState:", (_videoRef_current = videoRef.current) === null || _videoRef_current === void 0 ? void 0 : _videoRef_current.readyState);
8438
8361
  }
8439
8362
  };
8440
- var handleCanPlay = function() {
8363
+ var handleCanPlay = function handleCanPlay() {
8441
8364
  setIsLoading(false);
8442
8365
  if (bufferingTimeoutRef.current) {
8443
8366
  clearTimeout(bufferingTimeoutRef.current);
@@ -8449,7 +8372,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8449
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");
8450
8373
  }
8451
8374
  };
8452
- var handleCanPlayThrough = function() {
8375
+ var handleCanPlayThrough = function handleCanPlayThrough() {
8453
8376
  setIsLoading(false);
8454
8377
  if (bufferingTimeoutRef.current) {
8455
8378
  clearTimeout(bufferingTimeoutRef.current);
@@ -8461,7 +8384,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8461
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");
8462
8385
  }
8463
8386
  };
8464
- var handleWaiting = function() {
8387
+ var handleWaiting = function handleWaiting() {
8465
8388
  if (bufferingTimeoutRef.current) {
8466
8389
  clearTimeout(bufferingTimeoutRef.current);
8467
8390
  }
@@ -8477,7 +8400,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8477
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)");
8478
8401
  }
8479
8402
  };
8480
- var handlePlaying = function() {
8403
+ var handlePlaying = function handlePlaying() {
8481
8404
  setIsLoading(false);
8482
8405
  if (bufferingTimeoutRef.current) {
8483
8406
  clearTimeout(bufferingTimeoutRef.current);
@@ -8490,7 +8413,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8490
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");
8491
8414
  }
8492
8415
  };
8493
- var handlePause = function() {
8416
+ var handlePause = function handlePause() {
8494
8417
  var _playerRef_current, _videoRef_current_dataset, _videoRef_current;
8495
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";
8496
8419
  if (playerRef.current && !isAdActive) {
@@ -8499,7 +8422,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8499
8422
  setShowCenterPlay(false);
8500
8423
  }
8501
8424
  };
8502
- var handleEnded = function() {
8425
+ var handleEnded = function handleEnded() {
8503
8426
  setShowCenterPlay(true);
8504
8427
  };
8505
8428
  var video = videoRef.current;
@@ -8657,14 +8580,14 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8657
8580
  boxShadow: "0 12px 40px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.3)",
8658
8581
  transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
8659
8582
  },
8660
- onMouseEnter: function(e) {
8583
+ onMouseEnter: function onMouseEnter(e) {
8661
8584
  var target = e.currentTarget;
8662
8585
  target.style.transform = "translate(-50%, -50%)";
8663
8586
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(40, 40, 40, 0.9) 100%)";
8664
8587
  target.style.boxShadow = "0 16px 48px rgba(0, 0, 0, 0.9), inset 0 2px 0 rgba(255, 255, 255, 0.4)";
8665
8588
  target.style.borderColor = "rgba(255, 255, 255, 0.9)";
8666
8589
  },
8667
- onMouseLeave: function(e) {
8590
+ onMouseLeave: function onMouseLeave(e) {
8668
8591
  var target = e.currentTarget;
8669
8592
  target.style.transform = "translate(-50%, -50%)";
8670
8593
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.8) 100%)";
@@ -8771,12 +8694,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8771
8694
  minWidth: "".concat(48 * responsiveScale, "px"),
8772
8695
  minHeight: "".concat(48 * responsiveScale, "px")
8773
8696
  },
8774
- onMouseEnter: function(e) {
8697
+ onMouseEnter: function onMouseEnter(e) {
8775
8698
  var target = e.target;
8776
8699
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
8777
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)";
8778
8701
  },
8779
- onMouseLeave: function(e) {
8702
+ onMouseLeave: function onMouseLeave(e) {
8780
8703
  var target = e.target;
8781
8704
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
8782
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)";
@@ -8802,15 +8725,15 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8802
8725
  padding: "8px",
8803
8726
  margin: "-8px"
8804
8727
  },
8805
- onMouseEnter: function() {
8728
+ onMouseEnter: function onMouseEnter() {
8806
8729
  return setShowVolumeSlider(true);
8807
8730
  },
8808
- onMouseLeave: function() {
8731
+ onMouseLeave: function onMouseLeave() {
8809
8732
  return setShowVolumeSlider(false);
8810
8733
  },
8811
8734
  children: [
8812
8735
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
8813
- onClick: function() {
8736
+ onClick: function onClick() {
8814
8737
  if (playerRef.current) {
8815
8738
  playerRef.current.toggleMute();
8816
8739
  }
@@ -8834,12 +8757,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8834
8757
  minWidth: "".concat(44 * responsiveScale, "px"),
8835
8758
  minHeight: "".concat(44 * responsiveScale, "px")
8836
8759
  },
8837
- onMouseEnter: function(e) {
8760
+ onMouseEnter: function onMouseEnter(e) {
8838
8761
  var target = e.target;
8839
8762
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
8840
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)";
8841
8764
  },
8842
- onMouseLeave: function(e) {
8765
+ onMouseLeave: function onMouseLeave(e) {
8843
8766
  var target = e.target;
8844
8767
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
8845
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)";
@@ -8875,10 +8798,10 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8875
8798
  marginBottom: "-16px",
8876
8799
  zIndex: 9
8877
8800
  },
8878
- onMouseEnter: function() {
8801
+ onMouseEnter: function onMouseEnter() {
8879
8802
  return setShowVolumeSlider(true);
8880
8803
  },
8881
- onMouseLeave: function() {
8804
+ onMouseLeave: function onMouseLeave() {
8882
8805
  return setShowVolumeSlider(false);
8883
8806
  }
8884
8807
  }),
@@ -8903,12 +8826,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8903
8826
  zIndex: 10,
8904
8827
  transition: "transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out"
8905
8828
  },
8906
- onMouseEnter: function(e) {
8829
+ onMouseEnter: function onMouseEnter(e) {
8907
8830
  setShowVolumeSlider(true);
8908
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)";
8909
8832
  e.currentTarget.style.borderColor = "rgba(59, 130, 246, 0.4)";
8910
8833
  },
8911
- onMouseLeave: function(e) {
8834
+ onMouseLeave: function onMouseLeave(e) {
8912
8835
  setShowVolumeSlider(false);
8913
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)";
8914
8837
  e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.15)";
@@ -8921,19 +8844,19 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8921
8844
  cursor: "pointer",
8922
8845
  transition: "transform 0.2s ease-in-out"
8923
8846
  },
8924
- onMouseEnter: function(e) {},
8925
- onMouseLeave: function(e) {},
8926
- onMouseDown: function(e) {
8847
+ onMouseEnter: function onMouseEnter(e) {},
8848
+ onMouseLeave: function onMouseLeave(e) {},
8849
+ onMouseDown: function onMouseDown(e) {
8927
8850
  e.preventDefault();
8928
8851
  var sliderElement = e.currentTarget;
8929
- var handleMouseMove = function(moveEvent) {
8852
+ var handleMouseMove = function handleMouseMove(moveEvent) {
8930
8853
  if (!sliderElement) return;
8931
8854
  var rect2 = sliderElement.getBoundingClientRect();
8932
8855
  var y2 = moveEvent.clientY - rect2.top;
8933
8856
  var percentage2 = 1 - Math.max(0, Math.min(1, y2 / rect2.height));
8934
8857
  handleVolumeChange(percentage2);
8935
8858
  };
8936
- var handleMouseUp = function() {
8859
+ var handleMouseUp = function handleMouseUp1() {
8937
8860
  document.removeEventListener("mousemove", handleMouseMove);
8938
8861
  document.removeEventListener("mouseup", handleMouseUp);
8939
8862
  };
@@ -8944,7 +8867,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8944
8867
  var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
8945
8868
  handleVolumeChange(percentage);
8946
8869
  },
8947
- onClick: function(e) {
8870
+ onClick: function onClick(e) {
8948
8871
  e.stopPropagation();
8949
8872
  var rect = e.currentTarget.getBoundingClientRect();
8950
8873
  var y = e.clientY - rect.top;
@@ -8991,17 +8914,17 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
8991
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",
8992
8915
  cursor: "grab"
8993
8916
  },
8994
- onMouseEnter: function(e) {
8917
+ onMouseEnter: function onMouseEnter(e) {
8995
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)";
8996
8919
  e.currentTarget.style.cursor = "grab";
8997
8920
  },
8998
- onMouseLeave: function(e) {
8921
+ onMouseLeave: function onMouseLeave(e) {
8999
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)";
9000
8923
  },
9001
- onMouseDown: function(e) {
8924
+ onMouseDown: function onMouseDown(e) {
9002
8925
  e.currentTarget.style.cursor = "grabbing";
9003
8926
  },
9004
- onMouseUp: function(e) {
8927
+ onMouseUp: function onMouseUp(e) {
9005
8928
  e.currentTarget.style.cursor = "grab";
9006
8929
  }
9007
8930
  })
@@ -9041,7 +8964,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9041
8964
  },
9042
8965
  children: [
9043
8966
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
9044
- onClick: function() {
8967
+ onClick: function onClick() {
9045
8968
  return setShowSpeedMenu(!showSpeedMenu);
9046
8969
  },
9047
8970
  style: {
@@ -9060,12 +8983,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9060
8983
  minWidth: "".concat(56 * responsiveScale, "px"),
9061
8984
  minHeight: "".concat(40 * responsiveScale, "px")
9062
8985
  },
9063
- onMouseEnter: function(e) {
8986
+ onMouseEnter: function onMouseEnter(e) {
9064
8987
  var target = e.target;
9065
8988
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
9066
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)";
9067
8990
  },
9068
- onMouseLeave: function(e) {
8991
+ onMouseLeave: function onMouseLeave(e) {
9069
8992
  var target = e.target;
9070
8993
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
9071
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)";
@@ -9101,7 +9024,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9101
9024
  2
9102
9025
  ].map(function(speed) {
9103
9026
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
9104
- onClick: function() {
9027
+ onClick: function onClick() {
9105
9028
  return handlePlaybackRateChange(speed);
9106
9029
  },
9107
9030
  style: {
@@ -9119,12 +9042,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9119
9042
  transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
9120
9043
  borderBottom: speed !== 2 ? "1px solid rgba(255, 255, 255, 0.05)" : "none"
9121
9044
  },
9122
- onMouseEnter: function(e) {
9045
+ onMouseEnter: function onMouseEnter(e) {
9123
9046
  if (playbackRate !== speed) {
9124
9047
  e.target.style.background = "linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%)";
9125
9048
  }
9126
9049
  },
9127
- onMouseLeave: function(e) {
9050
+ onMouseLeave: function onMouseLeave(e) {
9128
9051
  if (playbackRate !== speed) {
9129
9052
  e.target.style.background = "transparent";
9130
9053
  }
@@ -9139,7 +9062,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9139
9062
  ]
9140
9063
  }),
9141
9064
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
9142
- onClick: function() {
9065
+ onClick: function onClick() {
9143
9066
  if (onFullscreenToggle) {
9144
9067
  onFullscreenToggle();
9145
9068
  } else if (playerRef.current) {
@@ -9164,12 +9087,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9164
9087
  minWidth: "".concat(44 * responsiveScale, "px"),
9165
9088
  minHeight: "".concat(44 * responsiveScale, "px")
9166
9089
  },
9167
- onMouseEnter: function(e) {
9090
+ onMouseEnter: function onMouseEnter(e) {
9168
9091
  var target = e.target;
9169
9092
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%)";
9170
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)";
9171
9094
  },
9172
- onMouseLeave: function(e) {
9095
+ onMouseLeave: function onMouseLeave(e) {
9173
9096
  var target = e.target;
9174
9097
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%)";
9175
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)";
@@ -9213,15 +9136,15 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9213
9136
  padding: "8px",
9214
9137
  margin: "-8px"
9215
9138
  },
9216
- onMouseEnter: function() {
9139
+ onMouseEnter: function onMouseEnter() {
9217
9140
  return setShowVolumeSlider(true);
9218
9141
  },
9219
- onMouseLeave: function() {
9142
+ onMouseLeave: function onMouseLeave() {
9220
9143
  return setShowVolumeSlider(false);
9221
9144
  },
9222
9145
  children: [
9223
9146
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
9224
- onClick: function() {
9147
+ onClick: function onClick() {
9225
9148
  if (playerRef.current) {
9226
9149
  playerRef.current.toggleMute();
9227
9150
  }
@@ -9229,12 +9152,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9229
9152
  onVolumeToggle();
9230
9153
  }
9231
9154
  },
9232
- onMouseEnter: function(e) {
9155
+ onMouseEnter: function onMouseEnter(e) {
9233
9156
  var target = e.currentTarget;
9234
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)";
9235
9158
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
9236
9159
  },
9237
- onMouseLeave: function(e) {
9160
+ onMouseLeave: function onMouseLeave(e) {
9238
9161
  var target = e.currentTarget;
9239
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)";
9240
9163
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
@@ -9289,10 +9212,10 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9289
9212
  marginBottom: "-16px",
9290
9213
  zIndex: 9
9291
9214
  },
9292
- onMouseEnter: function() {
9215
+ onMouseEnter: function onMouseEnter() {
9293
9216
  return setShowVolumeSlider(true);
9294
9217
  },
9295
- onMouseLeave: function() {
9218
+ onMouseLeave: function onMouseLeave() {
9296
9219
  return setShowVolumeSlider(false);
9297
9220
  }
9298
9221
  }),
@@ -9317,12 +9240,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9317
9240
  zIndex: 10,
9318
9241
  transition: "transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out"
9319
9242
  },
9320
- onMouseEnter: function(e) {
9243
+ onMouseEnter: function onMouseEnter(e) {
9321
9244
  setShowVolumeSlider(true);
9322
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)";
9323
9246
  e.currentTarget.style.borderColor = "rgba(96, 165, 250, 0.8)";
9324
9247
  },
9325
- onMouseLeave: function(e) {
9248
+ onMouseLeave: function onMouseLeave(e) {
9326
9249
  setShowVolumeSlider(false);
9327
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)";
9328
9251
  e.currentTarget.style.borderColor = "rgba(255, 255, 255, 0.7)";
@@ -9335,17 +9258,17 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9335
9258
  cursor: "pointer",
9336
9259
  transition: "transform 0.2s ease-in-out"
9337
9260
  },
9338
- onMouseDown: function(e) {
9261
+ onMouseDown: function onMouseDown(e) {
9339
9262
  e.preventDefault();
9340
9263
  var sliderElement = e.currentTarget;
9341
- var handleMouseMove = function(moveEvent) {
9264
+ var handleMouseMove = function handleMouseMove(moveEvent) {
9342
9265
  if (!sliderElement) return;
9343
9266
  var rect2 = sliderElement.getBoundingClientRect();
9344
9267
  var y2 = moveEvent.clientY - rect2.top;
9345
9268
  var percentage2 = 1 - Math.max(0, Math.min(1, y2 / rect2.height));
9346
9269
  handleVolumeChange(percentage2);
9347
9270
  };
9348
- var handleMouseUp = function() {
9271
+ var handleMouseUp = function handleMouseUp1() {
9349
9272
  document.removeEventListener("mousemove", handleMouseMove);
9350
9273
  document.removeEventListener("mouseup", handleMouseUp);
9351
9274
  };
@@ -9356,7 +9279,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9356
9279
  var percentage = 1 - Math.max(0, Math.min(1, y / rect.height));
9357
9280
  handleVolumeChange(percentage);
9358
9281
  },
9359
- onClick: function(e) {
9282
+ onClick: function onClick(e) {
9360
9283
  e.stopPropagation();
9361
9284
  var rect = e.currentTarget.getBoundingClientRect();
9362
9285
  var y = e.clientY - rect.top;
@@ -9405,17 +9328,17 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9405
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",
9406
9329
  cursor: "grab"
9407
9330
  },
9408
- onMouseEnter: function(e) {
9331
+ onMouseEnter: function onMouseEnter(e) {
9409
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)";
9410
9333
  e.currentTarget.style.cursor = "grab";
9411
9334
  },
9412
- onMouseLeave: function(e) {
9335
+ onMouseLeave: function onMouseLeave(e) {
9413
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)";
9414
9337
  },
9415
- onMouseDown: function(e) {
9338
+ onMouseDown: function onMouseDown(e) {
9416
9339
  e.currentTarget.style.cursor = "grabbing";
9417
9340
  },
9418
- onMouseUp: function(e) {
9341
+ onMouseUp: function onMouseUp(e) {
9419
9342
  e.currentTarget.style.cursor = "grab";
9420
9343
  }
9421
9344
  })
@@ -9427,7 +9350,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9427
9350
  ]
9428
9351
  }),
9429
9352
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
9430
- onClick: function() {
9353
+ onClick: function onClick() {
9431
9354
  if (onFullscreenToggle) {
9432
9355
  onFullscreenToggle();
9433
9356
  } else if (playerRef.current) {
@@ -9436,12 +9359,12 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9436
9359
  });
9437
9360
  }
9438
9361
  },
9439
- onMouseEnter: function(e) {
9362
+ onMouseEnter: function onMouseEnter(e) {
9440
9363
  var target = e.currentTarget;
9441
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)";
9442
9365
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%)";
9443
9366
  },
9444
- onMouseLeave: function(e) {
9367
+ onMouseLeave: function onMouseLeave(e) {
9445
9368
  var target = e.currentTarget;
9446
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)";
9447
9370
  target.style.background = "linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.65) 100%)";
@@ -9587,7 +9510,7 @@ var StormcloudVideoPlayerComponent = import_react.default.memo(function(props) {
9587
9510
  // src/StormcloudPlayer.tsx
9588
9511
  var import_react6 = __toESM(require("react"), 1);
9589
9512
  // src/props.ts
9590
- var noop = function() {};
9513
+ var noop = function noop() {};
9591
9514
  var defaultProps = {
9592
9515
  playing: false,
9593
9516
  loop: false,
@@ -9633,29 +9556,29 @@ var defaultProps = {
9633
9556
  // src/utils.ts
9634
9557
  var import_react2 = require("react");
9635
9558
  var lazy = import_react2.lazy;
9636
- var omit = function(object, keys) {
9559
+ var omit = function omit(object, keys) {
9637
9560
  var result = _object_spread({}, object);
9638
9561
  keys.forEach(function(key) {
9639
9562
  delete result[key];
9640
9563
  });
9641
9564
  return result;
9642
9565
  };
9643
- var isMediaStream = function(url) {
9566
+ var isMediaStream = function isMediaStream(url) {
9644
9567
  return typeof window !== "undefined" && window.MediaStream && _instanceof(url, window.MediaStream);
9645
9568
  };
9646
- var supportsWebKitPresentationMode = function() {
9569
+ var supportsWebKitPresentationMode = function supportsWebKitPresentationMode() {
9647
9570
  if (typeof window === "undefined") return false;
9648
9571
  var video = document.createElement("video");
9649
9572
  return "webkitSupportsPresentationMode" in video;
9650
9573
  };
9651
- var randomString = function() {
9574
+ var randomString = function randomString() {
9652
9575
  return Math.random().toString(36).substr(2, 9);
9653
9576
  };
9654
- var parseQuery = function(url) {
9577
+ var parseQuery = function parseQuery(url) {
9655
9578
  var query = {};
9656
9579
  var queryString = url.split("?")[1] || "";
9657
9580
  if (!queryString) return query;
9658
- var manualParse = function(qs) {
9581
+ var manualParse = function manualParse(qs) {
9659
9582
  qs.split("&").forEach(function(param) {
9660
9583
  var _param_split = _sliced_to_array(param.split("="), 2), key = _param_split[0], value = _param_split[1];
9661
9584
  if (key) {
@@ -9682,7 +9605,7 @@ var parseQuery = function(url) {
9682
9605
  }
9683
9606
  return query;
9684
9607
  };
9685
- var merge = function(target) {
9608
+ var merge = function merge1(target) {
9686
9609
  for(var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
9687
9610
  sources[_key - 1] = arguments[_key];
9688
9611
  }
@@ -9702,19 +9625,19 @@ var merge = function(target) {
9702
9625
  target
9703
9626
  ].concat(_to_consumable_array(sources)));
9704
9627
  };
9705
- var isObject = function(item) {
9628
+ var isObject = function isObject(item) {
9706
9629
  return item && (typeof item === "undefined" ? "undefined" : _type_of(item)) === "object" && !Array.isArray(item);
9707
9630
  };
9708
9631
  var IS_BROWSER = typeof window !== "undefined" && window.document;
9709
9632
  var IS_GLOBAL = typeof globalThis !== "undefined" && globalThis.window && globalThis.window.document;
9710
9633
  var IS_IOS = IS_BROWSER && /iPad|iPhone|iPod/.test(navigator.userAgent);
9711
9634
  var IS_SAFARI = IS_BROWSER && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
9712
- var SUPPORTS_HLS = function() {
9635
+ var SUPPORTS_HLS = function SUPPORTS_HLS() {
9713
9636
  if (!IS_BROWSER) return false;
9714
9637
  var video = document.createElement("video");
9715
9638
  return Boolean(video.canPlayType("application/vnd.apple.mpegurl"));
9716
9639
  };
9717
- var SUPPORTS_DASH = function() {
9640
+ var SUPPORTS_DASH = function SUPPORTS_DASH() {
9718
9641
  if (!IS_BROWSER) return false;
9719
9642
  var video = document.createElement("video");
9720
9643
  return Boolean(video.canPlayType("application/dash+xml"));
@@ -9726,23 +9649,23 @@ var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
9726
9649
  var VIDEO_EXTENSIONS = /\.(mp4|webm|ogg|avi|mov|wmv|flv|mkv)($|\?)/i;
9727
9650
  var AUDIO_EXTENSIONS = /\.(mp3|wav|ogg|aac|wma|flac|m4a)($|\?)/i;
9728
9651
  var canPlay = {
9729
- hls: function(url) {
9652
+ hls: function hls(url) {
9730
9653
  if (!url || typeof url !== "string") return false;
9731
9654
  return HLS_EXTENSIONS.test(url) || HLS_PATHS.test(url);
9732
9655
  },
9733
- dash: function(url) {
9656
+ dash: function dash(url) {
9734
9657
  if (!url || typeof url !== "string") return false;
9735
9658
  return DASH_EXTENSIONS.test(url);
9736
9659
  },
9737
- video: function(url) {
9660
+ video: function video(url) {
9738
9661
  if (!url || typeof url !== "string") return false;
9739
9662
  return VIDEO_EXTENSIONS.test(url);
9740
9663
  },
9741
- audio: function(url) {
9664
+ audio: function audio(url) {
9742
9665
  if (!url || typeof url !== "string") return false;
9743
9666
  return AUDIO_EXTENSIONS.test(url);
9744
9667
  },
9745
- file: function(url) {
9668
+ file: function file(url) {
9746
9669
  if (!url || typeof url !== "string") return false;
9747
9670
  return VIDEO_EXTENSIONS.test(url) || AUDIO_EXTENSIONS.test(url);
9748
9671
  }
@@ -9754,11 +9677,11 @@ var HlsPlayer = /*#__PURE__*/ function(_import_react3_Component) {
9754
9677
  function HlsPlayer() {
9755
9678
  _class_call_check(this, HlsPlayer);
9756
9679
  var _this;
9757
- var _this1, _arguments = arguments;
9758
- _this = _call_super(this, HlsPlayer, _to_consumable_array(_arguments)), _this1 = _this;
9759
- _this1.player = null;
9760
- _this1.mounted = false;
9761
- _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() {
9762
9685
  return _async_to_generator(function() {
9763
9686
  var _this_props_onMount, _this_props, config, _this_props_onReady, _this_props1, error, _this_props_onError, _this_props2;
9764
9687
  return _ts_generator(this, function(_state) {
@@ -9831,87 +9754,87 @@ var HlsPlayer = /*#__PURE__*/ function(_import_react3_Component) {
9831
9754
  });
9832
9755
  })();
9833
9756
  };
9834
- _this1.play = function() {
9835
- if (_this1.props.videoElement) {
9836
- var video = _this1.props.videoElement;
9757
+ _this.play = function() {
9758
+ if (_this.props.videoElement) {
9759
+ var video = _this.props.videoElement;
9837
9760
  var hasValidSource = video.src || video.currentSrc && video.currentSrc !== "" || video.readyState >= 1;
9838
9761
  if (hasValidSource) {
9839
9762
  var _video_play, _this_props_onPlay, _this_props;
9840
9763
  (_video_play = video.play()) === null || _video_play === void 0 ? void 0 : _video_play.catch(function(error) {
9841
9764
  var _this_props_onError, _this_props;
9842
9765
  console.error("[HlsPlayer] Failed to play:", error);
9843
- (_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);
9844
9767
  });
9845
- (_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);
9846
9769
  } else {
9847
9770
  console.warn("[HlsPlayer] Cannot play: video has no valid source");
9848
9771
  }
9849
9772
  }
9850
9773
  };
9851
- _this1.pause = function() {
9852
- if (_this1.props.videoElement) {
9774
+ _this.pause = function() {
9775
+ if (_this.props.videoElement) {
9853
9776
  var _this_props_onPause, _this_props;
9854
- _this1.props.videoElement.pause();
9855
- (_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);
9856
9779
  }
9857
9780
  };
9858
- _this1.stop = function() {
9859
- _this1.pause();
9860
- if (_this1.props.videoElement) {
9861
- _this1.props.videoElement.currentTime = 0;
9781
+ _this.stop = function() {
9782
+ _this.pause();
9783
+ if (_this.props.videoElement) {
9784
+ _this.props.videoElement.currentTime = 0;
9862
9785
  }
9863
9786
  };
9864
- _this1.seekTo = function(seconds, keepPlaying) {
9865
- if (_this1.props.videoElement) {
9866
- _this1.props.videoElement.currentTime = seconds;
9787
+ _this.seekTo = function(seconds, keepPlaying) {
9788
+ if (_this.props.videoElement) {
9789
+ _this.props.videoElement.currentTime = seconds;
9867
9790
  if (!keepPlaying) {
9868
- _this1.pause();
9791
+ _this.pause();
9869
9792
  }
9870
9793
  }
9871
9794
  };
9872
- _this1.setVolume = function(volume) {
9873
- if (_this1.props.videoElement) {
9874
- _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));
9875
9798
  }
9876
9799
  };
9877
- _this1.mute = function() {
9878
- if (_this1.props.videoElement) {
9879
- _this1.props.videoElement.muted = true;
9800
+ _this.mute = function() {
9801
+ if (_this.props.videoElement) {
9802
+ _this.props.videoElement.muted = true;
9880
9803
  }
9881
9804
  };
9882
- _this1.unmute = function() {
9883
- if (_this1.props.videoElement) {
9884
- _this1.props.videoElement.muted = false;
9805
+ _this.unmute = function() {
9806
+ if (_this.props.videoElement) {
9807
+ _this.props.videoElement.muted = false;
9885
9808
  }
9886
9809
  };
9887
- _this1.setPlaybackRate = function(rate) {
9888
- if (_this1.props.videoElement && rate > 0) {
9889
- _this1.props.videoElement.playbackRate = rate;
9810
+ _this.setPlaybackRate = function(rate) {
9811
+ if (_this.props.videoElement && rate > 0) {
9812
+ _this.props.videoElement.playbackRate = rate;
9890
9813
  }
9891
9814
  };
9892
- _this1.getDuration = function() {
9893
- if (_this1.props.videoElement && isFinite(_this1.props.videoElement.duration)) {
9894
- 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;
9895
9818
  }
9896
9819
  return null;
9897
9820
  };
9898
- _this1.getCurrentTime = function() {
9899
- if (_this1.props.videoElement && isFinite(_this1.props.videoElement.currentTime)) {
9900
- 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;
9901
9824
  }
9902
9825
  return null;
9903
9826
  };
9904
- _this1.getSecondsLoaded = function() {
9905
- if (_this1.props.videoElement && _this1.props.videoElement.buffered.length > 0) {
9906
- 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);
9907
9830
  }
9908
9831
  return null;
9909
9832
  };
9910
- _this1.getInternalPlayer = function() {
9833
+ _this.getInternalPlayer = function() {
9911
9834
  var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "player";
9912
- if (key === "player") return _this1.player;
9913
- if (key === "video") return _this1.props.videoElement;
9914
- 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;
9915
9838
  return null;
9916
9839
  };
9917
9840
  return _this;
@@ -9960,49 +9883,49 @@ var FilePlayer = /*#__PURE__*/ function(_import_react4_Component) {
9960
9883
  function FilePlayer() {
9961
9884
  _class_call_check(this, FilePlayer);
9962
9885
  var _this;
9963
- var _this1, _arguments = arguments;
9964
- _this = _call_super(this, FilePlayer, _to_consumable_array(_arguments)), _this1 = _this;
9965
- _this1.mounted = false;
9966
- _this1.ready = false;
9967
- _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() {
9968
9891
  var _this_props_onMount, _this_props;
9969
- if (!_this1.props.videoElement || !_this1.props.src) return;
9970
- var video = _this1.props.videoElement;
9971
- var handleLoadedMetadata = function() {
9972
- 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) {
9973
9896
  var _this_props_onReady, _this_props;
9974
- _this1.ready = true;
9975
- (_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);
9976
9899
  }
9977
9900
  };
9978
- var handlePlay = function() {
9979
- if (_this1.mounted) {
9901
+ var handlePlay = function handlePlay() {
9902
+ if (_this.mounted) {
9980
9903
  var _this_props_onPlay, _this_props;
9981
- (_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);
9982
9905
  }
9983
9906
  };
9984
- var handlePause = function() {
9985
- if (_this1.mounted) {
9907
+ var handlePause = function handlePause() {
9908
+ if (_this.mounted) {
9986
9909
  var _this_props_onPause, _this_props;
9987
- (_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);
9988
9911
  }
9989
9912
  };
9990
- var handleEnded = function() {
9991
- if (_this1.mounted) {
9913
+ var handleEnded = function handleEnded() {
9914
+ if (_this.mounted) {
9992
9915
  var _this_props_onEnded, _this_props;
9993
- (_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);
9994
9917
  }
9995
9918
  };
9996
- var handleError = function(error) {
9997
- if (_this1.mounted) {
9919
+ var handleError = function handleError(error) {
9920
+ if (_this.mounted) {
9998
9921
  var _this_props_onError, _this_props;
9999
- (_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);
10000
9923
  }
10001
9924
  };
10002
- var handleLoadedData = function() {
10003
- if (_this1.mounted) {
9925
+ var handleLoadedData = function handleLoadedData() {
9926
+ if (_this.mounted) {
10004
9927
  var _this_props_onLoaded, _this_props;
10005
- (_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);
10006
9929
  }
10007
9930
  };
10008
9931
  video.addEventListener("loadedmetadata", handleLoadedMetadata);
@@ -10011,15 +9934,15 @@ var FilePlayer = /*#__PURE__*/ function(_import_react4_Component) {
10011
9934
  video.addEventListener("ended", handleEnded);
10012
9935
  video.addEventListener("error", handleError);
10013
9936
  video.addEventListener("loadeddata", handleLoadedData);
10014
- video.src = _this1.props.src;
10015
- if (_this1.props.autoplay !== void 0) video.autoplay = _this1.props.autoplay;
10016
- if (_this1.props.muted !== void 0) video.muted = _this1.props.muted;
10017
- if (_this1.props.loop !== void 0) video.loop = _this1.props.loop;
10018
- if (_this1.props.controls !== void 0) video.controls = _this1.props.controls;
10019
- if (_this1.props.playsInline !== void 0) video.playsInline = _this1.props.playsInline;
10020
- if (_this1.props.preload !== void 0) video.preload = _this1.props.preload;
10021
- if (_this1.props.poster !== void 0) video.poster = _this1.props.poster;
10022
- (_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);
10023
9946
  return function() {
10024
9947
  video.removeEventListener("loadedmetadata", handleLoadedMetadata);
10025
9948
  video.removeEventListener("play", handlePlay);
@@ -10029,90 +9952,90 @@ var FilePlayer = /*#__PURE__*/ function(_import_react4_Component) {
10029
9952
  video.removeEventListener("loadeddata", handleLoadedData);
10030
9953
  };
10031
9954
  };
10032
- _this1.play = function() {
10033
- if (_this1.props.videoElement) {
10034
- var video = _this1.props.videoElement;
9955
+ _this.play = function() {
9956
+ if (_this.props.videoElement) {
9957
+ var video = _this.props.videoElement;
10035
9958
  var hasValidSource = video.src || video.currentSrc && video.currentSrc !== "" || video.readyState >= 1;
10036
9959
  if (hasValidSource) {
10037
9960
  var _video_play;
10038
9961
  (_video_play = video.play()) === null || _video_play === void 0 ? void 0 : _video_play.catch(function(error) {
10039
9962
  var _this_props_onError, _this_props;
10040
9963
  console.error("[FilePlayer] Failed to play:", error);
10041
- (_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);
10042
9965
  });
10043
9966
  } else {
10044
9967
  console.warn("[FilePlayer] Cannot play: video has no valid source");
10045
9968
  }
10046
9969
  }
10047
9970
  };
10048
- _this1.pause = function() {
10049
- if (_this1.props.videoElement) {
10050
- _this1.props.videoElement.pause();
9971
+ _this.pause = function() {
9972
+ if (_this.props.videoElement) {
9973
+ _this.props.videoElement.pause();
10051
9974
  }
10052
9975
  };
10053
- _this1.stop = function() {
10054
- _this1.pause();
10055
- if (_this1.props.videoElement) {
10056
- _this1.props.videoElement.currentTime = 0;
9976
+ _this.stop = function() {
9977
+ _this.pause();
9978
+ if (_this.props.videoElement) {
9979
+ _this.props.videoElement.currentTime = 0;
10057
9980
  }
10058
9981
  };
10059
- _this1.seekTo = function(seconds, keepPlaying) {
10060
- if (_this1.props.videoElement) {
10061
- _this1.props.videoElement.currentTime = seconds;
9982
+ _this.seekTo = function(seconds, keepPlaying) {
9983
+ if (_this.props.videoElement) {
9984
+ _this.props.videoElement.currentTime = seconds;
10062
9985
  if (!keepPlaying) {
10063
- _this1.pause();
9986
+ _this.pause();
10064
9987
  }
10065
9988
  }
10066
9989
  };
10067
- _this1.setVolume = function(volume) {
10068
- if (_this1.props.videoElement) {
10069
- _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));
10070
9993
  }
10071
9994
  };
10072
- _this1.mute = function() {
10073
- if (_this1.props.videoElement) {
10074
- _this1.props.videoElement.muted = true;
9995
+ _this.mute = function() {
9996
+ if (_this.props.videoElement) {
9997
+ _this.props.videoElement.muted = true;
10075
9998
  }
10076
9999
  };
10077
- _this1.unmute = function() {
10078
- if (_this1.props.videoElement) {
10079
- _this1.props.videoElement.muted = false;
10000
+ _this.unmute = function() {
10001
+ if (_this.props.videoElement) {
10002
+ _this.props.videoElement.muted = false;
10080
10003
  }
10081
10004
  };
10082
- _this1.setPlaybackRate = function(rate) {
10083
- if (_this1.props.videoElement && rate > 0) {
10084
- _this1.props.videoElement.playbackRate = rate;
10005
+ _this.setPlaybackRate = function(rate) {
10006
+ if (_this.props.videoElement && rate > 0) {
10007
+ _this.props.videoElement.playbackRate = rate;
10085
10008
  }
10086
10009
  };
10087
- _this1.setLoop = function(loop) {
10088
- if (_this1.props.videoElement) {
10089
- _this1.props.videoElement.loop = loop;
10010
+ _this.setLoop = function(loop) {
10011
+ if (_this.props.videoElement) {
10012
+ _this.props.videoElement.loop = loop;
10090
10013
  }
10091
10014
  };
10092
- _this1.getDuration = function() {
10093
- if (_this1.props.videoElement && isFinite(_this1.props.videoElement.duration)) {
10094
- 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;
10095
10018
  }
10096
10019
  return null;
10097
10020
  };
10098
- _this1.getCurrentTime = function() {
10099
- if (_this1.props.videoElement && isFinite(_this1.props.videoElement.currentTime)) {
10100
- 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;
10101
10024
  }
10102
10025
  return null;
10103
10026
  };
10104
- _this1.getSecondsLoaded = function() {
10105
- if (_this1.props.videoElement && _this1.props.videoElement.buffered.length > 0) {
10106
- 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);
10107
10030
  }
10108
10031
  return null;
10109
10032
  };
10110
- _this1.getInternalPlayer = function() {
10033
+ _this.getInternalPlayer = function() {
10111
10034
  var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "player";
10112
- if (key === "video") return _this1.props.videoElement;
10035
+ if (key === "video") return _this.props.videoElement;
10113
10036
  return null;
10114
10037
  };
10115
- _this1.enablePIP = function() {
10038
+ _this.enablePIP = function() {
10116
10039
  return _async_to_generator(function() {
10117
10040
  var error;
10118
10041
  return _ts_generator(this, function(_state) {
@@ -10155,7 +10078,7 @@ var FilePlayer = /*#__PURE__*/ function(_import_react4_Component) {
10155
10078
  });
10156
10079
  })();
10157
10080
  };
10158
- _this1.disablePIP = function() {
10081
+ _this.disablePIP = function() {
10159
10082
  return _async_to_generator(function() {
10160
10083
  var error;
10161
10084
  return _ts_generator(this, function(_state) {
@@ -10249,7 +10172,7 @@ var players = [
10249
10172
  key: "file",
10250
10173
  name: "File Player",
10251
10174
  canPlay: canPlay.file,
10252
- canEnablePIP: function(url) {
10175
+ canEnablePIP: function canEnablePIP(url) {
10253
10176
  return canPlay.file(url) && (document.pictureInPictureEnabled || typeof document.webkitSupportsPresentationMode === "function");
10254
10177
  },
10255
10178
  lazyPlayer: lazy(function() {
@@ -10575,7 +10498,7 @@ var SUPPORTED_PROPS = [
10575
10498
  "onControlClick"
10576
10499
  ];
10577
10500
  var customPlayers = [];
10578
- var createStormcloudPlayer = function(playerList, fallback) {
10501
+ var createStormcloudPlayer = function createStormcloudPlayer(playerList, fallback) {
10579
10502
  var _a;
10580
10503
  return _a = /*#__PURE__*/ function(_import_react6_Component) {
10581
10504
  _inherits(_a, _import_react6_Component);
@@ -10587,10 +10510,10 @@ var createStormcloudPlayer = function(playerList, fallback) {
10587
10510
  showPreview: false
10588
10511
  };
10589
10512
  _this.references = {
10590
- wrapper: function(wrapper) {
10513
+ wrapper: function wrapper(wrapper) {
10591
10514
  _this.wrapper = wrapper;
10592
10515
  },
10593
- player: function(player) {
10516
+ player: function player(player) {
10594
10517
  _this.player = player;
10595
10518
  }
10596
10519
  };