@mebius-io/web 0.4.8 → 0.4.9

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.
@@ -42922,6 +42922,9 @@ Schedule: ${scheduleItems.map((seg) => segmentToString(seg))} pos: ${this.timeli
42922
42922
  };
42923
42923
 
42924
42924
  // src/internal/scale-view-transport.ts
42925
+ function retryWarmupNotFound(cfg, retryCount, res, retry) {
42926
+ return retry || retryCount < (cfg?.maxNumRetry ?? 0) && res?.code === 404;
42927
+ }
42925
42928
  var HlsViewTransport = class {
42926
42929
  /**
42927
42930
  * deliveryPath, when given, is a gateway-relative path from the gateway's own
@@ -42969,7 +42972,22 @@ Schedule: ${scheduleItems.map((seg) => segmentToString(seg))} pos: ${this.timeli
42969
42972
  this.mutedByPolicy = (await playWithAutoplayFallback(video)).mutedByPolicy;
42970
42973
  return;
42971
42974
  }
42972
- const hls = new Hls2({ maxLiveSyncPlaybackRate: 1.1 });
42975
+ const hls = new Hls2({
42976
+ maxLiveSyncPlaybackRate: 1.1,
42977
+ manifestLoadPolicy: {
42978
+ default: {
42979
+ maxTimeToFirstByteMs: 1e4,
42980
+ maxLoadTimeMs: 2e4,
42981
+ timeoutRetry: { maxNumRetry: 2, retryDelayMs: 0, maxRetryDelayMs: 0 },
42982
+ errorRetry: {
42983
+ maxNumRetry: 5,
42984
+ retryDelayMs: 500,
42985
+ maxRetryDelayMs: 2e3,
42986
+ shouldRetry: (cfg, retryCount, _isTimeout, res, retry) => retryWarmupNotFound(cfg, retryCount, res, retry)
42987
+ }
42988
+ }
42989
+ }
42990
+ });
42973
42991
  this.hls = hls;
42974
42992
  hls.on(Hls2.Events.ERROR, (_evt, data) => {
42975
42993
  if (data.fatal) this.bufferingCb?.();