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

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.
@@ -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.10052"}`);
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;
@@ -8187,6 +8192,7 @@ class CapLevelController {
8187
8192
  }
8188
8193
  onMediaDetaching() {
8189
8194
  this.stopCapping();
8195
+ this.media = null;
8190
8196
  }
8191
8197
  detectPlayerSize() {
8192
8198
  if (this.media) {
@@ -12262,7 +12268,6 @@ class BaseStreamController extends TaskLoop {
12262
12268
  this.initPTS = [];
12263
12269
  }
12264
12270
  onHandlerDestroying() {
12265
- this.hls.off(Events.MANIFEST_LOADED, this.onManifestLoaded, this);
12266
12271
  this.stopLoad();
12267
12272
  super.onHandlerDestroying();
12268
12273
  // @ts-ignore
@@ -12441,7 +12446,9 @@ class BaseStreamController extends TaskLoop {
12441
12446
  throw new Error('init load aborted, missing levels');
12442
12447
  }
12443
12448
  const stats = data.frag.stats;
12444
- this.state = State.IDLE;
12449
+ if (this.state !== State.STOPPED) {
12450
+ this.state = State.IDLE;
12451
+ }
12445
12452
  data.frag.data = new Uint8Array(data.payload);
12446
12453
  stats.parsing.start = stats.buffering.start = self.performance.now();
12447
12454
  stats.parsing.end = stats.buffering.end = self.performance.now();
@@ -20116,7 +20123,7 @@ class Hls {
20116
20123
  * Get the video-dev/hls.js package version.
20117
20124
  */
20118
20125
  static get version() {
20119
- return "1.5.8-0.canary.10046";
20126
+ return "1.5.8-0.canary.10052";
20120
20127
  }
20121
20128
 
20122
20129
  /**