hls.js 1.6.0-beta.3.0.canary.10960 → 1.6.0-beta.3.0.canary.10963

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
@@ -2258,6 +2258,7 @@ export declare class InterstitialEvent {
2258
2258
  get assetUrl(): string | undefined;
2259
2259
  get assetListUrl(): string | undefined;
2260
2260
  get baseUrl(): string;
2261
+ get assetListLoaded(): boolean;
2261
2262
  toString(): string;
2262
2263
  }
2263
2264
 
package/dist/hls.d.ts CHANGED
@@ -2258,6 +2258,7 @@ export declare class InterstitialEvent {
2258
2258
  get assetUrl(): string | undefined;
2259
2259
  get assetListUrl(): string | undefined;
2260
2260
  get baseUrl(): string;
2261
+ get assetListLoaded(): boolean;
2261
2262
  toString(): string;
2262
2263
  }
2263
2264
 
package/dist/hls.js CHANGED
@@ -1059,7 +1059,7 @@
1059
1059
  // Some browsers don't allow to use bind on console object anyway
1060
1060
  // fallback to default if needed
1061
1061
  try {
1062
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.3.0.canary.10960");
1062
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.3.0.canary.10963");
1063
1063
  } catch (e) {
1064
1064
  /* log fn threw an exception. All logger methods are no-ops. */
1065
1065
  return createLogger();
@@ -16358,7 +16358,7 @@
16358
16358
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16359
16359
  }
16360
16360
 
16361
- var version = "1.6.0-beta.3.0.canary.10960";
16361
+ var version = "1.6.0-beta.3.0.canary.10963";
16362
16362
 
16363
16363
  // ensure the worker ends up in the bundle
16364
16364
  // If the worker should not be included this gets aliased to empty.js
@@ -23010,7 +23010,7 @@
23010
23010
  get: function get() {
23011
23011
  var playoutLimit = this.playoutLimit;
23012
23012
  var duration;
23013
- if (this._duration) {
23013
+ if (this._duration !== null) {
23014
23014
  duration = this._duration;
23015
23015
  } else if (this.dateRange.duration) {
23016
23016
  duration = this.dateRange.duration;
@@ -23063,6 +23063,11 @@
23063
23063
  get: function get() {
23064
23064
  return this.base.url;
23065
23065
  }
23066
+ }, {
23067
+ key: "assetListLoaded",
23068
+ get: function get() {
23069
+ return this.assetList.length > 0 || this.assetListResponse !== null;
23070
+ }
23066
23071
  }]);
23067
23072
  }();
23068
23073
  function getSnapToFragmentTime(time, frag) {
@@ -23728,6 +23733,9 @@
23728
23733
  });
23729
23734
  };
23730
23735
  _proto.updateAssetDurations = function updateAssetDurations(interstitial) {
23736
+ if (!interstitial.assetListLoaded) {
23737
+ return;
23738
+ }
23731
23739
  var eventStart = interstitial.timelineStart;
23732
23740
  var sumDuration = 0;
23733
23741
  var hasUnknownDuration = false;
@@ -24495,8 +24503,7 @@
24495
24503
  scheduleIndex: index
24496
24504
  });
24497
24505
  }
24498
- var assetListLength = interstitial.assetList.length;
24499
- if (assetListLength === 0 && !interstitial.assetListResponse) {
24506
+ if (!interstitial.assetListLoaded) {
24500
24507
  // Waiting at end of primary content segment
24501
24508
  // Expect setSchedulePosition to be called again once ASSET-LIST is loaded
24502
24509
  this.log("Waiting for ASSET-LIST to complete loading " + interstitial);
@@ -24531,6 +24538,7 @@
24531
24538
  player = this.getAssetPlayer(assetItem.identifier);
24532
24539
  }
24533
24540
  if (player === null || player.destroyed) {
24541
+ var assetListLength = interstitial.assetList.length;
24534
24542
  this.warn("asset " + (assetListIndex + 1) + "/" + assetListLength + " player destroyed " + interstitial);
24535
24543
  player = this.createAssetPlayer(interstitial, assetItem, assetListIndex);
24536
24544
  }
@@ -24634,8 +24642,11 @@
24634
24642
  }
24635
24643
  };
24636
24644
  _proto.startLoadingPrimaryAt = function startLoadingPrimaryAt(timelinePos, skipSeekToStartPosition) {
24637
- if (this.hls.loadingEnabled) {
24638
- this.hls.startLoad(timelinePos, skipSeekToStartPosition);
24645
+ var hls = this.hls;
24646
+ if (!hls.loadingEnabled || !hls.media || Math.abs(hls.media.currentTime - timelinePos) > 0.5) {
24647
+ hls.startLoad(timelinePos, skipSeekToStartPosition);
24648
+ } else if (!hls.bufferingEnabled) {
24649
+ hls.resumeBuffering();
24639
24650
  }
24640
24651
  }
24641
24652
 
@@ -24938,6 +24949,7 @@
24938
24949
  liveStartPosition = this.hls.liveSyncPosition || 0;
24939
24950
  }
24940
24951
  }
24952
+ interstitial.assetListResponse = null;
24941
24953
  var assetListLoader = this.assetListLoader.loadAssetList(interstitial, liveStartPosition);
24942
24954
  if (assetListLoader) {
24943
24955
  interstitial.assetListLoader = assetListLoader;
package/dist/hls.js.d.ts CHANGED
@@ -2258,6 +2258,7 @@ export declare class InterstitialEvent {
2258
2258
  get assetUrl(): string | undefined;
2259
2259
  get assetListUrl(): string | undefined;
2260
2260
  get baseUrl(): string;
2261
+ get assetListLoaded(): boolean;
2261
2262
  toString(): string;
2262
2263
  }
2263
2264