hls.js 1.6.6-0.canary.11333 → 1.6.6-0.canary.11334

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
@@ -1165,7 +1165,7 @@
1165
1165
  // Some browsers don't allow to use bind on console object anyway
1166
1166
  // fallback to default if needed
1167
1167
  try {
1168
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.6-0.canary.11333");
1168
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.6-0.canary.11334");
1169
1169
  } catch (e) {
1170
1170
  /* log fn threw an exception. All logger methods are no-ops. */
1171
1171
  return createLogger();
@@ -16690,7 +16690,7 @@
16690
16690
  return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
16691
16691
  }
16692
16692
 
16693
- var version = "1.6.6-0.canary.11333";
16693
+ var version = "1.6.6-0.canary.11334";
16694
16694
 
16695
16695
  // ensure the worker ends up in the bundle
16696
16696
  // If the worker should not be included this gets aliased to empty.js
@@ -26637,10 +26637,12 @@
26637
26637
  _proto.onSubtitleFragProcessed = function onSubtitleFragProcessed(event, data) {
26638
26638
  var frag = data.frag,
26639
26639
  success = data.success;
26640
- if (isMediaFragment(frag)) {
26641
- this.fragPrevious = frag;
26640
+ if (!this.fragContextChanged(frag)) {
26641
+ if (isMediaFragment(frag)) {
26642
+ this.fragPrevious = frag;
26643
+ }
26644
+ this.state = State.IDLE;
26642
26645
  }
26643
- this.state = State.IDLE;
26644
26646
  if (!success) {
26645
26647
  return;
26646
26648
  }
@@ -26779,8 +26781,12 @@
26779
26781
  this.mediaBuffer = this.mediaBufferTimeRanges;
26780
26782
  var sliding = 0;
26781
26783
  if (newDetails.live || (_track$details = track.details) != null && _track$details.live) {
26784
+ if (newDetails.deltaUpdateFailed) {
26785
+ return;
26786
+ }
26782
26787
  var mainDetails = this.mainDetails;
26783
- if (newDetails.deltaUpdateFailed || !mainDetails) {
26788
+ if (!mainDetails) {
26789
+ this.startFragRequested = false;
26784
26790
  return;
26785
26791
  }
26786
26792
  var mainSlidingStartFragment = mainDetails.fragments[0];
@@ -26802,6 +26808,10 @@
26802
26808
  addSliding(newDetails, sliding);
26803
26809
  }
26804
26810
  }
26811
+ // compute start position if we are aligned with the main playlist
26812
+ if (mainDetails && !this.startFragRequested) {
26813
+ this.setStartPosition(mainDetails, sliding);
26814
+ }
26805
26815
  }
26806
26816
  track.details = newDetails;
26807
26817
  this.levelLastLoaded = track;
@@ -30039,8 +30049,16 @@
30039
30049
  // Parse any unparsed fragments upon receiving the initial PTS.
30040
30050
  if (unparsedVttFrags.length) {
30041
30051
  this.unparsedVttFrags = [];
30042
- unparsedVttFrags.forEach(function (frag) {
30043
- _this.onFragLoaded(Events.FRAG_LOADED, frag);
30052
+ unparsedVttFrags.forEach(function (data) {
30053
+ if (_this.initPTS[data.frag.cc]) {
30054
+ _this.onFragLoaded(Events.FRAG_LOADED, data);
30055
+ } else {
30056
+ _this.hls.trigger(Events.SUBTITLE_FRAG_PROCESSED, {
30057
+ success: false,
30058
+ frag: data.frag,
30059
+ error: new Error('Subtitle discontinuity domain does not match main')
30060
+ });
30061
+ }
30044
30062
  });
30045
30063
  }
30046
30064
  };