hls.js 1.6.0-rc.2.0.canary.11081 → 1.6.0

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.
@@ -402,7 +402,7 @@ function enableLogs(debugConfig, context, id) {
402
402
  // Some browsers don't allow to use bind on console object anyway
403
403
  // fallback to default if needed
404
404
  try {
405
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-rc.2.0.canary.11081"}`);
405
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0"}`);
406
406
  } catch (e) {
407
407
  /* log fn threw an exception. All logger methods are no-ops. */
408
408
  return createLogger();
@@ -2895,6 +2895,7 @@ class AbrController extends Logger {
2895
2895
  this.fragCurrent = null;
2896
2896
  this.partCurrent = null;
2897
2897
  this.bitrateTestDelay = 0;
2898
+ this.rebufferNotice = -1;
2898
2899
  this.bwEstimator = void 0;
2899
2900
  /*
2900
2901
  This method monitors the download rate of the current fragment, and will downswitch if that fragment will not load
@@ -3360,6 +3361,7 @@ class AbrController extends Logger {
3360
3361
  if (bufferStarvationDelay) {
3361
3362
  const _bestLevel = this.findBestLevel(avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, 0, bwFactor, bwUpFactor);
3362
3363
  if (_bestLevel >= 0) {
3364
+ this.rebufferNotice = -1;
3363
3365
  return _bestLevel;
3364
3366
  }
3365
3367
  }
@@ -3382,7 +3384,10 @@ class AbrController extends Logger {
3382
3384
  }
3383
3385
  }
3384
3386
  const bestLevel = this.findBestLevel(avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, maxStarvationDelay, bwFactor, bwUpFactor);
3385
- this.info(`${bufferStarvationDelay ? 'rebuffering expected' : 'buffer is empty'}, optimal quality level ${bestLevel}`);
3387
+ if (this.rebufferNotice !== bestLevel) {
3388
+ this.rebufferNotice = bestLevel;
3389
+ this.info(`${bufferStarvationDelay ? 'rebuffering expected' : 'buffer is empty'}, optimal quality level ${bestLevel}`);
3390
+ }
3386
3391
  if (bestLevel > -1) {
3387
3392
  return bestLevel;
3388
3393
  }
@@ -8667,7 +8672,11 @@ class BaseStreamController extends TaskLoop {
8667
8672
  const end = this.loadingParts ? levelDetails.partEnd : levelDetails.fragmentEnd;
8668
8673
  frag = this.getFragmentAtPosition(pos, end, levelDetails);
8669
8674
  }
8670
- const programFrag = this.filterReplacedPrimary(frag, levelDetails);
8675
+ let programFrag = this.filterReplacedPrimary(frag, levelDetails);
8676
+ if (!programFrag && frag) {
8677
+ const curSNIdx = frag.sn - levelDetails.startSN;
8678
+ programFrag = this.filterReplacedPrimary(fragments[curSNIdx + 1] || null, levelDetails);
8679
+ }
8671
8680
  return this.mapToInitFragWhenRequired(programFrag);
8672
8681
  }
8673
8682
  isLoopLoading(frag, targetBufferTime) {
@@ -19666,7 +19675,7 @@ function assignTrackIdsByGroup(tracks) {
19666
19675
  });
19667
19676
  }
19668
19677
 
19669
- const version = "1.6.0-rc.2.0.canary.11081";
19678
+ const version = "1.6.0";
19670
19679
 
19671
19680
  // ensure the worker ends up in the bundle
19672
19681
  // If the worker should not be included this gets aliased to empty.js
@@ -23283,5 +23292,5 @@ var KeySystems = emptyEsExports.KeySystems;
23283
23292
  var SubtitleStreamController = emptyEsExports.SubtitleStreamController;
23284
23293
  var TimelineController = emptyEsExports.TimelineController;
23285
23294
  var requestMediaKeySystemAccess = emptyEsExports.requestMediaKeySystemAccess;
23286
- export { AbrController, AttrList, Cues as AudioStreamController, Cues as AudioTrackController, BasePlaylistController, BaseSegment, BaseStreamController, BufferController, Cues as CMCDController, CapLevelController, ChunkMetadata, ContentSteeringController, Cues, DateRange, Cues as EMEController, ErrorActionFlags, ErrorController, ErrorDetails, ErrorTypes, Events, FPSController, FetchLoader, Fragment, Hls, HlsSkip, HlsUrlParameters, KeySystemFormats, KeySystems, Level, LevelDetails, LevelKey, LoadStats, MetadataSchema, NetworkErrorAction, Part, PlaylistLevelType, SubtitleStreamController, Cues as SubtitleTrackController, TimelineController, XhrLoader, Hls as default, fetchSupported, getMediaSource, isMSESupported, isSupported, requestMediaKeySystemAccess };
23295
+ export { AbrController, AttrList, Cues as AudioStreamController, Cues as AudioTrackController, BasePlaylistController, BaseSegment, BaseStreamController, BufferController, Cues as CMCDController, CapLevelController, ChunkMetadata, ContentSteeringController, Cues, DateRange, Cues as EMEController, ErrorActionFlags, ErrorController, ErrorDetails, ErrorTypes, Events, FPSController, FetchLoader, Fragment, Hls, HlsSkip, HlsUrlParameters, KeySystemFormats, KeySystems, Level, LevelDetails, LevelKey, LoadStats, M3U8Parser, MetadataSchema, NetworkErrorAction, Part, PlaylistLevelType, SubtitleStreamController, Cues as SubtitleTrackController, TimelineController, XhrLoader, Hls as default, fetchSupported, getMediaSource, isMSESupported, isSupported, requestMediaKeySystemAccess };
23287
23296
  //# sourceMappingURL=hls.light.mjs.map