hls.js 1.5.13-0.canary.10410 → 1.5.13-0.canary.10411

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
@@ -522,7 +522,7 @@
522
522
  // Some browsers don't allow to use bind on console object anyway
523
523
  // fallback to default if needed
524
524
  try {
525
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.13-0.canary.10410");
525
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.13-0.canary.10411");
526
526
  } catch (e) {
527
527
  /* log fn threw an exception. All logger methods are no-ops. */
528
528
  return createLogger();
@@ -17847,6 +17847,7 @@
17847
17847
  this.lastCurrentTime = media.currentTime;
17848
17848
  };
17849
17849
  _proto.doTickIdle = function doTickIdle() {
17850
+ var _this$mainFragLoading;
17850
17851
  var hls = this.hls,
17851
17852
  levels = this.levels,
17852
17853
  media = this.media,
@@ -17921,12 +17922,24 @@
17921
17922
  this.bufferFlushed = true;
17922
17923
  return;
17923
17924
  }
17924
- if (this.startFragRequested && (!trackDetails.live || targetBufferTime < this.hls.liveSyncPosition)) {
17925
- // Request audio segments up to one fragment ahead of main buffer
17926
- var mainFragLoading = this.mainFragLoading;
17927
- var mainTargetBufferEnd = mainFragLoading ? (mainFragLoading.part || mainFragLoading.frag).end : null;
17928
- var atBufferSyncLimit = mainTargetBufferEnd !== null && frag.start > mainTargetBufferEnd;
17929
- if (atBufferSyncLimit && !frag.endList) {
17925
+
17926
+ // Request audio segments up to one fragment ahead of main stream-controller
17927
+ var mainFragLoading = (_this$mainFragLoading = this.mainFragLoading) == null ? void 0 : _this$mainFragLoading.frag;
17928
+ if (this.startFragRequested && mainFragLoading && mainFragLoading.sn !== 'initSegment' && frag.sn !== 'initSegment' && !frag.endList && (!trackDetails.live || !this.loadingParts && targetBufferTime < this.hls.liveSyncPosition)) {
17929
+ var mainFrag = mainFragLoading;
17930
+ if (frag.start > mainFrag.end) {
17931
+ // Get buffered frag at target position from tracker (loaded out of sequence)
17932
+ var mainFragAtPos = this.fragmentTracker.getFragAtPos(targetBufferTime, PlaylistLevelType.MAIN);
17933
+ if (mainFragAtPos && mainFragAtPos.end > mainFragLoading.end) {
17934
+ mainFrag = mainFragAtPos;
17935
+ this.mainFragLoading = {
17936
+ frag: mainFragAtPos,
17937
+ targetBufferTime: null
17938
+ };
17939
+ }
17940
+ }
17941
+ var atBufferSyncLimit = frag.start > mainFrag.end;
17942
+ if (atBufferSyncLimit) {
17930
17943
  return;
17931
17944
  }
17932
17945
  }
@@ -30775,7 +30788,7 @@
30775
30788
  * Get the video-dev/hls.js package version.
30776
30789
  */
30777
30790
  function get() {
30778
- return "1.5.13-0.canary.10410";
30791
+ return "1.5.13-0.canary.10411";
30779
30792
  }
30780
30793
  }, {
30781
30794
  key: "Events",
package/dist/hls.js.d.ts CHANGED
@@ -253,7 +253,7 @@ export declare class BaseStreamController extends TaskLoop implements NetworkCom
253
253
  protected decrypter: Decrypter;
254
254
  protected initPTS: RationalTimestamp[];
255
255
  protected buffering: boolean;
256
- private loadingParts;
256
+ protected loadingParts: boolean;
257
257
  private loopSn?;
258
258
  constructor(hls: Hls, fragmentTracker: FragmentTracker, keyLoader: KeyLoader, logPrefix: string, playlistType: PlaylistLevelType);
259
259
  protected registerListeners(): void;