hls.js 1.5.8-0.canary.10046 → 1.5.8-0.canary.10049

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hls.mjs CHANGED
@@ -512,14 +512,19 @@ function enableLogs(debugConfig, context, id) {
512
512
  // Some browsers don't allow to use bind on console object anyway
513
513
  // fallback to default if needed
514
514
  try {
515
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.8-0.canary.10046"}`);
515
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.8-0.canary.10049"}`);
516
516
  } catch (e) {
517
517
  /* log fn threw an exception. All logger methods are no-ops. */
518
518
  return createLogger();
519
519
  }
520
+ // global exported logger uses the same functions as new logger without `id`
521
+ keys.forEach(key => {
522
+ exportedLogger[key] = getLoggerFn(key, debugConfig);
523
+ });
524
+ } else {
525
+ // Reset global exported logger
526
+ _extends(exportedLogger, newLogger);
520
527
  }
521
- // global exported logger uses the log methods from last call to `enableLogs`
522
- _extends(exportedLogger, newLogger);
523
528
  return newLogger;
524
529
  }
525
530
  const logger = exportedLogger;
@@ -9370,7 +9375,6 @@ class BaseStreamController extends TaskLoop {
9370
9375
  this.initPTS = [];
9371
9376
  }
9372
9377
  onHandlerDestroying() {
9373
- this.hls.off(Events.MANIFEST_LOADED, this.onManifestLoaded, this);
9374
9378
  this.stopLoad();
9375
9379
  super.onHandlerDestroying();
9376
9380
  // @ts-ignore
@@ -9549,7 +9553,9 @@ class BaseStreamController extends TaskLoop {
9549
9553
  throw new Error('init load aborted, missing levels');
9550
9554
  }
9551
9555
  const stats = data.frag.stats;
9552
- this.state = State.IDLE;
9556
+ if (this.state !== State.STOPPED) {
9557
+ this.state = State.IDLE;
9558
+ }
9553
9559
  data.frag.data = new Uint8Array(data.payload);
9554
9560
  stats.parsing.start = stats.buffering.start = self.performance.now();
9555
9561
  stats.parsing.end = stats.buffering.end = self.performance.now();
@@ -22662,6 +22668,7 @@ class CapLevelController {
22662
22668
  }
22663
22669
  onMediaDetaching() {
22664
22670
  this.stopCapping();
22671
+ this.media = null;
22665
22672
  }
22666
22673
  detectPlayerSize() {
22667
22674
  if (this.media) {
@@ -28707,7 +28714,7 @@ class Hls {
28707
28714
  * Get the video-dev/hls.js package version.
28708
28715
  */
28709
28716
  static get version() {
28710
- return "1.5.8-0.canary.10046";
28717
+ return "1.5.8-0.canary.10049";
28711
28718
  }
28712
28719
 
28713
28720
  /**