hls.js 1.5.14-0.canary.10674 → 1.5.14-0.canary.10676

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.d.mts CHANGED
@@ -1884,7 +1884,7 @@ export declare type HlsConfig = {
1884
1884
  };
1885
1885
  fLoader?: FragmentLoaderConstructor;
1886
1886
  pLoader?: PlaylistLoaderConstructor;
1887
- fetchSetup?: (context: LoaderContext, initParams: any) => Request;
1887
+ fetchSetup?: (context: LoaderContext, initParams: any) => Promise<Request> | Request;
1888
1888
  xhrSetup?: (xhr: XMLHttpRequest, url: string) => Promise<void> | void;
1889
1889
  audioStreamController?: typeof AudioStreamController;
1890
1890
  audioTrackController?: typeof AudioTrackController;
package/dist/hls.d.ts CHANGED
@@ -1884,7 +1884,7 @@ export declare type HlsConfig = {
1884
1884
  };
1885
1885
  fLoader?: FragmentLoaderConstructor;
1886
1886
  pLoader?: PlaylistLoaderConstructor;
1887
- fetchSetup?: (context: LoaderContext, initParams: any) => Request;
1887
+ fetchSetup?: (context: LoaderContext, initParams: any) => Promise<Request> | Request;
1888
1888
  xhrSetup?: (xhr: XMLHttpRequest, url: string) => Promise<void> | void;
1889
1889
  audioStreamController?: typeof AudioStreamController;
1890
1890
  audioTrackController?: typeof AudioTrackController;
package/dist/hls.js CHANGED
@@ -542,7 +542,7 @@
542
542
  // Some browsers don't allow to use bind on console object anyway
543
543
  // fallback to default if needed
544
544
  try {
545
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.10674");
545
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.14-0.canary.10676");
546
546
  } catch (e) {
547
547
  /* log fn threw an exception. All logger methods are no-ops. */
548
548
  return createLogger();
@@ -17084,7 +17084,7 @@
17084
17084
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
17085
17085
  }
17086
17086
 
17087
- var version = "1.5.14-0.canary.10674";
17087
+ var version = "1.5.14-0.canary.10676";
17088
17088
 
17089
17089
  // ensure the worker ends up in the bundle
17090
17090
  // If the worker should not be included this gets aliased to empty.js
@@ -18354,6 +18354,10 @@
18354
18354
  return;
18355
18355
  }
18356
18356
  var currentLevel = levels[frag.level];
18357
+ if (!currentLevel) {
18358
+ this.warn("Level " + frag.level + " not found on progress");
18359
+ return;
18360
+ }
18357
18361
  var details = currentLevel.details;
18358
18362
  if (!details) {
18359
18363
  this.warn("Dropping fragment " + frag.sn + " of level " + frag.level + " after level details were reset");
@@ -32981,7 +32985,7 @@
32981
32985
  }
32982
32986
  var BYTERANGE = /(\d+)-(\d+)\/(\d+)/;
32983
32987
  var FetchLoader = /*#__PURE__*/function () {
32984
- function FetchLoader(config /* HlsConfig */) {
32988
+ function FetchLoader(config) {
32985
32989
  this.fetchSetup = void 0;
32986
32990
  this.requestTimeout = void 0;
32987
32991
  this.request = null;
@@ -33041,7 +33045,8 @@
33041
33045
  _this.abortInternal();
33042
33046
  callbacks.onTimeout(stats, context, _this.response);
33043
33047
  }, config.timeout);
33044
- self.fetch(this.request).then(function (response) {
33048
+ var fetchPromise = isPromise(this.request) ? this.request.then(self.fetch) : self.fetch(this.request);
33049
+ fetchPromise.then(function (response) {
33045
33050
  _this.response = _this.loader = response;
33046
33051
  var first = Math.max(self.performance.now(), stats.loading.start);
33047
33052
  self.clearTimeout(_this.requestTimeout);
package/dist/hls.js.d.ts CHANGED
@@ -1884,7 +1884,7 @@ export declare type HlsConfig = {
1884
1884
  };
1885
1885
  fLoader?: FragmentLoaderConstructor;
1886
1886
  pLoader?: PlaylistLoaderConstructor;
1887
- fetchSetup?: (context: LoaderContext, initParams: any) => Request;
1887
+ fetchSetup?: (context: LoaderContext, initParams: any) => Promise<Request> | Request;
1888
1888
  xhrSetup?: (xhr: XMLHttpRequest, url: string) => Promise<void> | void;
1889
1889
  audioStreamController?: typeof AudioStreamController;
1890
1890
  audioTrackController?: typeof AudioTrackController;