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.d.mts CHANGED
@@ -2853,6 +2853,7 @@ export declare interface ManifestLoadedData {
2853
2853
  subtitles?: MediaPlaylist[];
2854
2854
  url: string;
2855
2855
  variableList: VariableMap | null;
2856
+ isMediaPlaylist?: boolean;
2856
2857
  }
2857
2858
 
2858
2859
  export declare interface ManifestLoadingData {
package/dist/hls.d.ts CHANGED
@@ -2853,6 +2853,7 @@ export declare interface ManifestLoadedData {
2853
2853
  subtitles?: MediaPlaylist[];
2854
2854
  url: string;
2855
2855
  variableList: VariableMap | null;
2856
+ isMediaPlaylist?: boolean;
2856
2857
  }
2857
2858
 
2858
2859
  export declare interface ManifestLoadingData {
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.10812");
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.10812";
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
@@ -33877,7 +33881,11 @@
33877
33881
  startTimeOffset: startTimeOffset,
33878
33882
  variableList: variableList
33879
33883
  });
33880
- this.checkAutostartLoad();
33884
+ };
33885
+ _proto.onManifestLoaded = function onManifestLoaded(event, data) {
33886
+ if (!data.isMediaPlaylist) {
33887
+ this.checkAutostartLoad();
33888
+ }
33881
33889
  };
33882
33890
  _proto.handleTrackOrLevelPlaylist = function handleTrackOrLevelPlaylist(response, stats, context, networkDetails, loader) {
33883
33891
  var hls = this.hls;
@@ -33911,7 +33919,8 @@
33911
33919
  sessionKeys: null,
33912
33920
  contentSteering: null,
33913
33921
  startTimeOffset: null,
33914
- variableList: null
33922
+ variableList: null,
33923
+ isMediaPlaylist: true
33915
33924
  });
33916
33925
  }
33917
33926
 
@@ -34208,6 +34217,8 @@
34208
34217
  if (typeof onErrorOut === 'function') {
34209
34218
  this.on(Events.ERROR, onErrorOut, errorController);
34210
34219
  }
34220
+ // Autostart load handler
34221
+ this.on(Events.MANIFEST_LOADED, playListLoader.onManifestLoaded, playListLoader);
34211
34222
  }
34212
34223
  /**
34213
34224
  * Check if the required MediaSource Extensions are available.
package/dist/hls.js.d.ts CHANGED
@@ -2853,6 +2853,7 @@ export declare interface ManifestLoadedData {
2853
2853
  subtitles?: MediaPlaylist[];
2854
2854
  url: string;
2855
2855
  variableList: VariableMap | null;
2856
+ isMediaPlaylist?: boolean;
2856
2857
  }
2857
2858
 
2858
2859
  export declare interface ManifestLoadingData {