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

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.10812");
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.10812";
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
@@ -22014,7 +22018,11 @@
22014
22018
  startTimeOffset: startTimeOffset,
22015
22019
  variableList: variableList
22016
22020
  });
22017
- this.checkAutostartLoad();
22021
+ };
22022
+ _proto.onManifestLoaded = function onManifestLoaded(event, data) {
22023
+ if (!data.isMediaPlaylist) {
22024
+ this.checkAutostartLoad();
22025
+ }
22018
22026
  };
22019
22027
  _proto.handleTrackOrLevelPlaylist = function handleTrackOrLevelPlaylist(response, stats, context, networkDetails, loader) {
22020
22028
  var hls = this.hls;
@@ -22048,7 +22056,8 @@
22048
22056
  sessionKeys: null,
22049
22057
  contentSteering: null,
22050
22058
  startTimeOffset: null,
22051
- variableList: null
22059
+ variableList: null,
22060
+ isMediaPlaylist: true
22052
22061
  });
22053
22062
  }
22054
22063
 
@@ -22447,6 +22456,8 @@
22447
22456
  if (typeof onErrorOut === 'function') {
22448
22457
  this.on(Events.ERROR, onErrorOut, errorController);
22449
22458
  }
22459
+ // Autostart load handler
22460
+ this.on(Events.MANIFEST_LOADED, playListLoader.onManifestLoaded, playListLoader);
22450
22461
  }
22451
22462
  /**
22452
22463
  * Check if the required MediaSource Extensions are available.