eb-player 2.5.0 → 2.5.1

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.
@@ -4,7 +4,7 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EBPlayer = {}));
5
5
  })(this, (function (exports) { 'use strict';
6
6
 
7
- var __EB_PLAYER_VERSION__ = "2.5.0";
7
+ var __EB_PLAYER_VERSION__ = "2.5.1";
8
8
 
9
9
  /**
10
10
  * Finite State Machine for player playback state transitions.
@@ -7435,6 +7435,12 @@
7435
7435
  if (!config.lib || !config.manager)
7436
7436
  return;
7437
7437
  const sdk = await loadScript(config.lib, 'Easybroadcast');
7438
+ // The abort listener below is only registered after this await, so a
7439
+ // signal that already aborted during loadScript would otherwise be
7440
+ // missed entirely (AbortSignal only notifies listeners registered
7441
+ // before it fires) and lib.start() would run with no way to stop it.
7442
+ if (signal.aborted)
7443
+ return;
7438
7444
  this.lib = new sdk.eblib.EBLibrary(config.manager);
7439
7445
  const contentId = removeTokenAndCdnPath(config.src ?? '');
7440
7446
  const libSettings = config.libSettings ?? {};
@@ -7820,6 +7826,7 @@
7820
7826
  inst.engine.detach();
7821
7827
  inst.engine = null;
7822
7828
  }
7829
+ inst.p2p?.stop();
7823
7830
  inst.p2p = null;
7824
7831
  inst.controller.dispose();
7825
7832
  }