hls.js 1.6.0-beta.1.0.canary.10810 → 1.6.0-beta.1.0.canary.10811

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
@@ -1057,7 +1057,7 @@
1057
1057
  // Some browsers don't allow to use bind on console object anyway
1058
1058
  // fallback to default if needed
1059
1059
  try {
1060
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.1.0.canary.10810");
1060
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.1.0.canary.10811");
1061
1061
  } catch (e) {
1062
1062
  /* log fn threw an exception. All logger methods are no-ops. */
1063
1063
  return createLogger();
@@ -14747,19 +14747,23 @@
14747
14747
  this.videoTrackConfig = undefined;
14748
14748
  };
14749
14749
  _proto.getVideoStartPts = function getVideoStartPts(videoSamples) {
14750
+ // Get the minimum PTS value relative to the first sample's PTS, normalized for 33-bit wrapping
14750
14751
  var rolloverDetected = false;
14752
+ var firstPts = videoSamples[0].pts;
14751
14753
  var startPTS = videoSamples.reduce(function (minPTS, sample) {
14752
- var delta = sample.pts - minPTS;
14754
+ var pts = sample.pts;
14755
+ var delta = pts - minPTS;
14753
14756
  if (delta < -4294967296) {
14754
14757
  // 2^32, see PTSNormalize for reasoning, but we're hitting a rollover here, and we don't want that to impact the timeOffset calculation
14755
14758
  rolloverDetected = true;
14756
- return normalizePts(minPTS, sample.pts);
14757
- } else if (delta > 0) {
14759
+ pts = normalizePts(pts, firstPts);
14760
+ delta = pts - minPTS;
14761
+ }
14762
+ if (delta > 0) {
14758
14763
  return minPTS;
14759
- } else {
14760
- return sample.pts;
14761
14764
  }
14762
- }, videoSamples[0].pts);
14765
+ return pts;
14766
+ }, firstPts);
14763
14767
  if (rolloverDetected) {
14764
14768
  this.logger.debug('PTS rollover detected');
14765
14769
  }
@@ -16292,7 +16296,7 @@
16292
16296
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16293
16297
  }
16294
16298
 
16295
- var version = "1.6.0-beta.1.0.canary.10810";
16299
+ var version = "1.6.0-beta.1.0.canary.10811";
16296
16300
 
16297
16301
  // ensure the worker ends up in the bundle
16298
16302
  // If the worker should not be included this gets aliased to empty.js