hls.js 1.5.17-0.canary.10681 → 1.5.17-0.canary.10684

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.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.17-0.canary.10681");
545
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.17-0.canary.10684");
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.17-0.canary.10681";
17087
+ var version = "1.5.17-0.canary.10684";
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
@@ -31077,7 +31077,7 @@
31077
31077
  return event.appendInPlace = false;
31078
31078
  });
31079
31079
  }
31080
- _this.log("Interstitial events (" + interstitialEvents.length + "): " + interstitialEvents + "\nSchedule: " + scheduleItems.map(function (seg) {
31080
+ _this.log("INTERSTITIALS_UPDATED (" + interstitialEvents.length + "): " + interstitialEvents + "\nSchedule: " + scheduleItems.map(function (seg) {
31081
31081
  return segmentToString(seg);
31082
31082
  }));
31083
31083
  }
@@ -31519,7 +31519,7 @@
31519
31519
  });
31520
31520
  }
31521
31521
  var assetListLength = _interstitial.assetList.length;
31522
- if (assetListLength === 0) {
31522
+ if (assetListLength === 0 && !_interstitial.assetListResponse) {
31523
31523
  // Waiting at end of primary content segment
31524
31524
  // Expect setSchedulePosition to be called again once ASSET-LIST is loaded
31525
31525
  this.log("Waiting for ASSET-LIST to complete loading " + _interstitial);
@@ -31536,19 +31536,20 @@
31536
31536
  // Update schedule and asset list position now that it can start
31537
31537
  this.waitingItem = null;
31538
31538
  this.playingItem = scheduledItem;
31539
- // Start Interstitial Playback
31539
+
31540
+ // If asset-list is empty or missing asset index, advance to next item
31540
31541
  var assetItem = _interstitial.assetList[assetListIndex];
31541
31542
  if (!assetItem) {
31542
- var error = new Error("ASSET-LIST index " + assetListIndex + " out of bounds [0-" + (assetListLength - 1) + "] " + _interstitial);
31543
- var errorData = {
31544
- fatal: true,
31545
- type: ErrorTypes.OTHER_ERROR,
31546
- details: ErrorDetails.INTERSTITIAL_ASSET_ITEM_ERROR,
31547
- error: error
31548
- };
31549
- this.handleAssetItemError(errorData, _interstitial, index, assetListIndex, error.message);
31543
+ var nextItem = scheduleItems[index + 1];
31544
+ var _media = this.media;
31545
+ if (nextItem && _media && !this.isInterstitial(nextItem) && _media.currentTime < nextItem.start) {
31546
+ _media.currentTime = this.timelinePos = nextItem.start;
31547
+ }
31548
+ this.advanceAfterAssetEnded(_interstitial, index, assetListIndex || 0);
31550
31549
  return;
31551
31550
  }
31551
+
31552
+ // Start Interstitial Playback
31552
31553
  if (!_player) {
31553
31554
  _player = this.getAssetPlayer(assetItem.identifier);
31554
31555
  }
@@ -32508,9 +32509,9 @@
32508
32509
  }
32509
32510
  var targetIsPrimary = !c.isInterstitial(targetItem);
32510
32511
  if (!c.isInterstitial(playingItem) && (targetIsPrimary || targetItem.event.appendInPlace)) {
32511
- var _media = c.hls.media;
32512
- if (_media) {
32513
- _media.currentTime = _seekToTime;
32512
+ var _media2 = c.hls.media;
32513
+ if (_media2) {
32514
+ _media2.currentTime = _seekToTime;
32514
32515
  }
32515
32516
  } else if (playingItem) {
32516
32517
  // check if an Interstitial between the current item and target item has an X-RESTRICT JUMP restriction
@@ -32676,7 +32677,7 @@
32676
32677
  }, {
32677
32678
  key: "currentTime",
32678
32679
  get: function get() {
32679
- var _this$bufferingItem2, _this$bufferingItem2$, _media2;
32680
+ var _this$bufferingItem2, _this$bufferingItem2$, _media3;
32680
32681
  if (this.mediaSelection === null) {
32681
32682
  // Do not advance before schedule is known
32682
32683
  return undefined;
@@ -32691,7 +32692,7 @@
32691
32692
  // Observe detached media currentTime when appending in place
32692
32693
  media = this.primaryMedia;
32693
32694
  }
32694
- var currentTime = (_media2 = media) == null ? void 0 : _media2.currentTime;
32695
+ var currentTime = (_media3 = media) == null ? void 0 : _media3.currentTime;
32695
32696
  if (currentTime === undefined || !isFiniteNumber(currentTime)) {
32696
32697
  return undefined;
32697
32698
  }