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.
@@ -512,7 +512,7 @@ function enableLogs(debugConfig, context, id) {
512
512
  // Some browsers don't allow to use bind on console object anyway
513
513
  // fallback to default if needed
514
514
  try {
515
- newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.5-0.canary.9984"}`);
515
+ newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.5-0.canary.9985"}`);
516
516
  } catch (e) {
517
517
  /* log fn threw an exception. All logger methods are no-ops. */
518
518
  return createLogger();
@@ -5713,7 +5713,12 @@ class BasePlaylistController extends Logger {
5713
5713
  const cdnAge = lastAdvanced + details.ageHeader;
5714
5714
  let currentGoal = Math.min(cdnAge - details.partTarget, details.targetduration * 1.5);
5715
5715
  if (currentGoal > 0) {
5716
- if (previousDetails && currentGoal > previousDetails.tuneInGoal) {
5716
+ if (cdnAge > details.targetduration * 3) {
5717
+ // Omit segment and part directives when the last response was more than 3 target durations ago,
5718
+ this.log(`Playlist last advanced ${lastAdvanced.toFixed(2)}s ago. Omitting segment and part directives.`);
5719
+ msn = undefined;
5720
+ part = undefined;
5721
+ } else if (previousDetails != null && previousDetails.tuneInGoal && cdnAge - details.partTarget > previousDetails.tuneInGoal) {
5717
5722
  // If we attempted to get the next or latest playlist update, but currentGoal increased,
5718
5723
  // then we either can't catchup, or the "age" header cannot be trusted.
5719
5724
  this.warn(`CDN Tune-in goal increased from: ${previousDetails.tuneInGoal} to: ${currentGoal} with playlist age: ${details.age}`);
@@ -10059,7 +10064,12 @@ class LevelController extends BasePlaylistController {
10059
10064
  if (curLevel.fragmentError === 0) {
10060
10065
  curLevel.loadError = 0;
10061
10066
  }
10062
- this.playlistLoaded(level, data, curLevel.details);
10067
+ // Ignore matching details populated by loading a Media Playlist directly
10068
+ let previousDetails = curLevel.details;
10069
+ if (previousDetails === data.details && previousDetails.advanced) {
10070
+ previousDetails = undefined;
10071
+ }
10072
+ this.playlistLoaded(level, data, previousDetails);
10063
10073
  } else if ((_data$deliveryDirecti2 = data.deliveryDirectives) != null && _data$deliveryDirecti2.skip) {
10064
10074
  // received a delta playlist update that cannot be merged
10065
10075
  details.deltaUpdateFailed = true;
@@ -19924,7 +19934,7 @@ class Hls {
19924
19934
  * Get the video-dev/hls.js package version.
19925
19935
  */
19926
19936
  static get version() {
19927
- return "1.5.5-0.canary.9984";
19937
+ return "1.5.5-0.canary.9985";
19928
19938
  }
19929
19939
 
19930
19940
  /**