hls.js 1.5.8-0.canary.10044 → 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/package.json CHANGED
@@ -122,7 +122,7 @@
122
122
  "rollup": "4.12.0",
123
123
  "rollup-plugin-istanbul": "5.0.0",
124
124
  "sauce-connect-launcher": "1.3.2",
125
- "selenium-webdriver": "4.17.0",
125
+ "selenium-webdriver": "4.18.1",
126
126
  "semver": "7.6.0",
127
127
  "sinon": "17.0.1",
128
128
  "sinon-chai": "3.7.0",
@@ -130,5 +130,5 @@
130
130
  "url-toolkit": "2.2.5",
131
131
  "wrangler": "3.29.0"
132
132
  },
133
- "version": "1.5.8-0.canary.10044"
133
+ "version": "1.5.8-0.canary.10049"
134
134
  }
@@ -350,7 +350,6 @@ export default class BaseStreamController
350
350
  }
351
351
 
352
352
  protected onHandlerDestroying() {
353
- this.hls.off(Events.MANIFEST_LOADED, this.onManifestLoaded, this);
354
353
  this.stopLoad();
355
354
  super.onHandlerDestroying();
356
355
  // @ts-ignore
@@ -581,7 +580,9 @@ export default class BaseStreamController
581
580
  throw new Error('init load aborted, missing levels');
582
581
  }
583
582
  const stats = data.frag.stats;
584
- this.state = State.IDLE;
583
+ if (this.state !== State.STOPPED) {
584
+ this.state = State.IDLE;
585
+ }
585
586
  data.frag.data = new Uint8Array(data.payload);
586
587
  stats.parsing.start = stats.buffering.start = self.performance.now();
587
588
  stats.parsing.end = stats.buffering.end = self.performance.now();
@@ -138,6 +138,7 @@ class CapLevelController implements ComponentAPI {
138
138
 
139
139
  protected onMediaDetaching() {
140
140
  this.stopCapping();
141
+ this.media = null;
141
142
  }
142
143
 
143
144
  detectPlayerSize() {
@@ -64,7 +64,7 @@ function consolePrintFn(type: string, id: string | undefined): ILogFunction {
64
64
  function getLoggerFn(
65
65
  key: string,
66
66
  debugConfig: boolean | Partial<ILogger>,
67
- id: string | undefined,
67
+ id?: string,
68
68
  ): ILogFunction {
69
69
  return debugConfig[key]
70
70
  ? debugConfig[key].bind(debugConfig)
@@ -106,9 +106,14 @@ export function enableLogs(
106
106
  /* log fn threw an exception. All logger methods are no-ops. */
107
107
  return createLogger();
108
108
  }
109
+ // global exported logger uses the same functions as new logger without `id`
110
+ keys.forEach((key) => {
111
+ exportedLogger[key] = getLoggerFn(key, debugConfig);
112
+ });
113
+ } else {
114
+ // Reset global exported logger
115
+ Object.assign(exportedLogger, newLogger);
109
116
  }
110
- // global exported logger uses the log methods from last call to `enableLogs`
111
- Object.assign(exportedLogger, newLogger);
112
117
  return newLogger;
113
118
  }
114
119