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.light.js CHANGED
@@ -613,7 +613,7 @@
613
613
  // Some browsers don't allow to use bind on console object anyway
614
614
  // fallback to default if needed
615
615
  try {
616
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.5-0.canary.9984");
616
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.5-0.canary.9985");
617
617
  } catch (e) {
618
618
  /* log fn threw an exception. All logger methods are no-ops. */
619
619
  return createLogger();
@@ -5976,7 +5976,12 @@
5976
5976
  var cdnAge = lastAdvanced + details.ageHeader;
5977
5977
  var currentGoal = Math.min(cdnAge - details.partTarget, details.targetduration * 1.5);
5978
5978
  if (currentGoal > 0) {
5979
- if (previousDetails && currentGoal > previousDetails.tuneInGoal) {
5979
+ if (cdnAge > details.targetduration * 3) {
5980
+ // Omit segment and part directives when the last response was more than 3 target durations ago,
5981
+ this.log("Playlist last advanced " + lastAdvanced.toFixed(2) + "s ago. Omitting segment and part directives.");
5982
+ msn = undefined;
5983
+ part = undefined;
5984
+ } else if (previousDetails != null && previousDetails.tuneInGoal && cdnAge - details.partTarget > previousDetails.tuneInGoal) {
5980
5985
  // If we attempted to get the next or latest playlist update, but currentGoal increased,
5981
5986
  // then we either can't catchup, or the "age" header cannot be trusted.
5982
5987
  this.warn("CDN Tune-in goal increased from: " + previousDetails.tuneInGoal + " to: " + currentGoal + " with playlist age: " + details.age);
@@ -10240,7 +10245,12 @@
10240
10245
  if (curLevel.fragmentError === 0) {
10241
10246
  curLevel.loadError = 0;
10242
10247
  }
10243
- this.playlistLoaded(level, data, curLevel.details);
10248
+ // Ignore matching details populated by loading a Media Playlist directly
10249
+ var previousDetails = curLevel.details;
10250
+ if (previousDetails === data.details && previousDetails.advanced) {
10251
+ previousDetails = undefined;
10252
+ }
10253
+ this.playlistLoaded(level, data, previousDetails);
10244
10254
  } else if ((_data$deliveryDirecti2 = data.deliveryDirectives) != null && _data$deliveryDirecti2.skip) {
10245
10255
  // received a delta playlist update that cannot be merged
10246
10256
  details.deltaUpdateFailed = true;
@@ -21258,7 +21268,7 @@
21258
21268
  * Get the video-dev/hls.js package version.
21259
21269
  */
21260
21270
  function get() {
21261
- return "1.5.5-0.canary.9984";
21271
+ return "1.5.5-0.canary.9985";
21262
21272
  }
21263
21273
  }, {
21264
21274
  key: "Events",