hls.js 1.6.0-beta.1.0.canary.10770 → 1.6.0-beta.1.0.canary.10773

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.
@@ -400,7 +400,7 @@ function enableLogs(debugConfig, context, id) {
400
400
  // Some browsers don't allow to use bind on console object anyway
401
401
  // fallback to default if needed
402
402
  try {
403
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.1.0.canary.10770"}`);
403
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-beta.1.0.canary.10773"}`);
404
404
  } catch (e) {
405
405
  /* log fn threw an exception. All logger methods are no-ops. */
406
406
  return createLogger();
@@ -4886,7 +4886,7 @@ class M3U8Parser {
4886
4886
  break;
4887
4887
  }
4888
4888
  case 'DISCONTINUITY-SEQUENCE':
4889
- discontinuityCounter = parseInt(value1);
4889
+ level.startCC = discontinuityCounter = parseInt(value1);
4890
4890
  break;
4891
4891
  case 'KEY':
4892
4892
  {
@@ -5016,7 +5016,7 @@ class M3U8Parser {
5016
5016
  if (!level.live) {
5017
5017
  lastFragment.endList = true;
5018
5018
  }
5019
- if (firstFragment) {
5019
+ if (firstFragment && !level.startCC) {
5020
5020
  level.startCC = firstFragment.cc;
5021
5021
  }
5022
5022
  /**
@@ -5350,7 +5350,9 @@ function mergeDetails(oldDetails, newDetails) {
5350
5350
  newDetails.fragments.shift();
5351
5351
  }
5352
5352
  newDetails.startSN = newDetails.fragments[0].sn;
5353
- newDetails.startCC = newDetails.fragments[0].cc;
5353
+ if (!newDetails.startCC) {
5354
+ newDetails.startCC = newDetails.fragments[0].cc;
5355
+ }
5354
5356
  } else {
5355
5357
  if (newDetails.canSkipDateRanges) {
5356
5358
  newDetails.dateRanges = mergeDateRanges(oldDetails.dateRanges, newDetails);
@@ -7360,11 +7362,10 @@ function adjustSlidingStart(sliding, details) {
7360
7362
  * The PTS of a fragment lets Hls.js know where it fits into a stream - by knowing every PTS, we know which fragment to
7361
7363
  * download at any given time. PTS is normally computed when the fragment is demuxed, so taking this step saves us time
7362
7364
  * and an extra download.
7363
- * @param lastFrag
7364
7365
  * @param lastLevel
7365
7366
  * @param details
7366
7367
  */
7367
- function alignStream(lastFrag, switchDetails, details) {
7368
+ function alignStream(switchDetails, details) {
7368
7369
  if (!switchDetails) {
7369
7370
  return;
7370
7371
  }
@@ -8554,12 +8555,9 @@ class BaseStreamController extends TaskLoop {
8554
8555
  const firstLevelLoad = !previousDetails;
8555
8556
  const aligned = details.alignedSliding && isFiniteNumber(slidingStart);
8556
8557
  if (firstLevelLoad || !aligned && !slidingStart) {
8557
- const {
8558
- fragPrevious
8559
- } = this;
8560
- alignStream(fragPrevious, switchDetails, details);
8558
+ alignStream(switchDetails, details);
8561
8559
  const alignedSlidingStart = details.fragmentStart;
8562
- this.log(`Live playlist sliding: ${alignedSlidingStart.toFixed(2)} start-sn: ${previousDetails ? previousDetails.startSN : 'na'}->${details.startSN} prev-sn: ${fragPrevious ? fragPrevious.sn : 'na'} fragments: ${length}`);
8560
+ this.log(`Live playlist sliding: ${alignedSlidingStart.toFixed(2)} start-sn: ${previousDetails ? previousDetails.startSN : 'na'}->${details.startSN} fragments: ${length}`);
8563
8561
  return alignedSlidingStart;
8564
8562
  }
8565
8563
  return slidingStart;
@@ -19113,7 +19111,7 @@ class GapController extends Logger {
19113
19111
  }
19114
19112
  }
19115
19113
 
19116
- const version = "1.6.0-beta.1.0.canary.10770";
19114
+ const version = "1.6.0-beta.1.0.canary.10773";
19117
19115
 
19118
19116
  // ensure the worker ends up in the bundle
19119
19117
  // If the worker should not be included this gets aliased to empty.js