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.light.js CHANGED
@@ -1028,7 +1028,7 @@
1028
1028
  // Some browsers don't allow to use bind on console object anyway
1029
1029
  // fallback to default if needed
1030
1030
  try {
1031
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.1.0.canary.10810");
1031
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.1.0.canary.10811");
1032
1032
  } catch (e) {
1033
1033
  /* log fn threw an exception. All logger methods are no-ops. */
1034
1034
  return createLogger();
@@ -13007,19 +13007,23 @@
13007
13007
  this.videoTrackConfig = undefined;
13008
13008
  };
13009
13009
  _proto.getVideoStartPts = function getVideoStartPts(videoSamples) {
13010
+ // Get the minimum PTS value relative to the first sample's PTS, normalized for 33-bit wrapping
13010
13011
  var rolloverDetected = false;
13012
+ var firstPts = videoSamples[0].pts;
13011
13013
  var startPTS = videoSamples.reduce(function (minPTS, sample) {
13012
- var delta = sample.pts - minPTS;
13014
+ var pts = sample.pts;
13015
+ var delta = pts - minPTS;
13013
13016
  if (delta < -4294967296) {
13014
13017
  // 2^32, see PTSNormalize for reasoning, but we're hitting a rollover here, and we don't want that to impact the timeOffset calculation
13015
13018
  rolloverDetected = true;
13016
- return normalizePts(minPTS, sample.pts);
13017
- } else if (delta > 0) {
13019
+ pts = normalizePts(pts, firstPts);
13020
+ delta = pts - minPTS;
13021
+ }
13022
+ if (delta > 0) {
13018
13023
  return minPTS;
13019
- } else {
13020
- return sample.pts;
13021
13024
  }
13022
- }, videoSamples[0].pts);
13025
+ return pts;
13026
+ }, firstPts);
13023
13027
  if (rolloverDetected) {
13024
13028
  this.logger.debug('PTS rollover detected');
13025
13029
  }
@@ -19762,7 +19766,7 @@
19762
19766
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
19763
19767
  }
19764
19768
 
19765
- var version = "1.6.0-beta.1.0.canary.10810";
19769
+ var version = "1.6.0-beta.1.0.canary.10811";
19766
19770
 
19767
19771
  // ensure the worker ends up in the bundle
19768
19772
  // If the worker should not be included this gets aliased to empty.js