@blockcast/mmt-container 2.2.0-main.5a10b80fd6e3 → 2.2.0-main.5da4e39e7fb8

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.
@@ -33760,6 +33760,12 @@ var DatagramLegWatch = class {
33760
33760
  this.#options.onVerdict(verdict, silentMs, clock.limit);
33761
33761
  }
33762
33762
  };
33763
+ var wholeCount = (value) => typeof value === "number" && Number.isFinite(value) && value >= 0 ? Math.floor(value) : 0;
33764
+ function datagramLegRetryDelayMs(joinDarkMs, n, rand) {
33765
+ if (!positive(joinDarkMs)) return void 0;
33766
+ const jitter = typeof rand === "number" && rand >= 0 && rand < 1 ? rand : 0;
33767
+ return Math.ceil(joinDarkMs * 2 ** wholeCount(n) * (1 + jitter));
33768
+ }
33763
33769
 
33764
33770
  // src/mmtp-fec-session.ts
33765
33771
  var PATH_BITS = { moq: 1, multicast: 2 };
@@ -34453,8 +34459,9 @@ function wireRepairFetch(mc, opts) {
34453
34459
  const moot = (entry) => {
34454
34460
  if (entry.priority !== 0) return false;
34455
34461
  const rttMs = readRtt();
34456
- const sentAt = entry.running?.sentAt ?? performance.now();
34457
- if (rttMs !== null && sentAt + rttMs < entry.playoutDeadlineAt) return false;
34462
+ const now = performance.now();
34463
+ const sentAt = entry.running?.sentAt ?? now;
34464
+ if (rttMs !== null && now < entry.playoutDeadlineAt && sentAt + rttMs < entry.playoutDeadlineAt) return false;
34458
34465
  const last = lastSsId(entry);
34459
34466
  if (last === void 0) return false;
34460
34467
  try {
@@ -35206,6 +35213,7 @@ export {
35206
35213
  computeFecLossWindowMs,
35207
35214
  createFragment,
35208
35215
  createWasmMmtpContainerParser,
35216
+ datagramLegRetryDelayMs,
35209
35217
  datagramMfuReassembly,
35210
35218
  decideGap,
35211
35219
  decodeFecSourceInfo,