hls.js 1.5.5-0.canary.9984 → 1.5.5-0.canary.9985

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
@@ -644,7 +644,7 @@
644
644
  // Some browsers don't allow to use bind on console object anyway
645
645
  // fallback to default if needed
646
646
  try {
647
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.5-0.canary.9984");
647
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.5-0.canary.9985");
648
648
  } catch (e) {
649
649
  /* log fn threw an exception. All logger methods are no-ops. */
650
650
  return createLogger();
@@ -6502,7 +6502,12 @@
6502
6502
  var cdnAge = lastAdvanced + details.ageHeader;
6503
6503
  var currentGoal = Math.min(cdnAge - details.partTarget, details.targetduration * 1.5);
6504
6504
  if (currentGoal > 0) {
6505
- if (previousDetails && currentGoal > previousDetails.tuneInGoal) {
6505
+ if (cdnAge > details.targetduration * 3) {
6506
+ // Omit segment and part directives when the last response was more than 3 target durations ago,
6507
+ this.log("Playlist last advanced " + lastAdvanced.toFixed(2) + "s ago. Omitting segment and part directives.");
6508
+ msn = undefined;
6509
+ part = undefined;
6510
+ } else if (previousDetails != null && previousDetails.tuneInGoal && cdnAge - details.partTarget > previousDetails.tuneInGoal) {
6506
6511
  // If we attempted to get the next or latest playlist update, but currentGoal increased,
6507
6512
  // then we either can't catchup, or the "age" header cannot be trusted.
6508
6513
  this.warn("CDN Tune-in goal increased from: " + previousDetails.tuneInGoal + " to: " + currentGoal + " with playlist age: " + details.age);
@@ -27203,7 +27208,12 @@
27203
27208
  if (curLevel.fragmentError === 0) {
27204
27209
  curLevel.loadError = 0;
27205
27210
  }
27206
- this.playlistLoaded(level, data, curLevel.details);
27211
+ // Ignore matching details populated by loading a Media Playlist directly
27212
+ var previousDetails = curLevel.details;
27213
+ if (previousDetails === data.details && previousDetails.advanced) {
27214
+ previousDetails = undefined;
27215
+ }
27216
+ this.playlistLoaded(level, data, previousDetails);
27207
27217
  } else if ((_data$deliveryDirecti2 = data.deliveryDirectives) != null && _data$deliveryDirecti2.skip) {
27208
27218
  // received a delta playlist update that cannot be merged
27209
27219
  details.deltaUpdateFailed = true;
@@ -30024,7 +30034,7 @@
30024
30034
  * Get the video-dev/hls.js package version.
30025
30035
  */
30026
30036
  function get() {
30027
- return "1.5.5-0.canary.9984";
30037
+ return "1.5.5-0.canary.9985";
30028
30038
  }
30029
30039
  }, {
30030
30040
  key: "Events",