@ahmedrowaihi/mediabunny 1.65.2-beta.321 → 1.65.2-beta.324

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.
@@ -20554,6 +20554,11 @@ var Mediabunny = (() => {
20554
20554
  if (options.parallelism !== void 0 && (!Number.isInteger(options.parallelism) || options.parallelism < 1)) {
20555
20555
  throw new TypeError("options.parallelism, when provided, must be a positive number.");
20556
20556
  }
20557
+ if (options.prefetchProfile && !["none", "fileSystem", "network"].includes(options.prefetchProfile)) {
20558
+ throw new TypeError(
20559
+ "options.prefetchProfile, when provided, must be one of 'none', 'fileSystem' or 'network'."
20560
+ );
20561
+ }
20557
20562
  if (options.fetchFn !== void 0 && typeof options.fetchFn !== "function") {
20558
20563
  throw new TypeError("options.fetchFn, when provided, must be a function.");
20559
20564
  }
@@ -20623,7 +20628,7 @@ var Mediabunny = (() => {
20623
20628
  maxWorkerCount: options.parallelism ?? DEFAULT_PARALLELISM,
20624
20629
  runWorker: this._runWorker.bind(this),
20625
20630
  onIdleWorkerRemoved: (worker) => this._abortControllers.delete(worker),
20626
- prefetchProfile: PREFETCH_PROFILES.network,
20631
+ prefetchProfile: PREFETCH_PROFILES[options.prefetchProfile ?? "network"],
20627
20632
  handleUnhandledError: options.handleUnhandledError
20628
20633
  });
20629
20634
  }