mediabunny 1.43.1 → 1.44.0

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.
@@ -15825,10 +15825,14 @@ var Mediabunny = (() => {
15825
15825
  if (options.maxCacheSize !== void 0 && (!isNumber(options.maxCacheSize) || options.maxCacheSize < 0)) {
15826
15826
  throw new TypeError("options.maxCacheSize, when provided, must be a non-negative number.");
15827
15827
  }
15828
+ if (options.useStreamReader !== void 0 && typeof options.useStreamReader !== "boolean") {
15829
+ throw new TypeError("options.useStreamReader, when provided, must be a boolean.");
15830
+ }
15828
15831
  super();
15829
15832
  /** @internal */
15830
15833
  this._readers = /* @__PURE__ */ new WeakMap();
15831
15834
  this._blob = blob;
15835
+ this._options = options;
15832
15836
  this._orchestrator = new ReadOrchestrator({
15833
15837
  maxCacheSize: options.maxCacheSize ?? 8 * 2 ** 20,
15834
15838
  maxWorkerCount: 4,
@@ -15850,7 +15854,7 @@ var Mediabunny = (() => {
15850
15854
  assert(worker.strictTarget);
15851
15855
  let reader = this._readers.get(worker);
15852
15856
  if (reader === void 0) {
15853
- if ("stream" in this._blob && !isWebKit()) {
15857
+ if ("stream" in this._blob && !isWebKit() && this._options.useStreamReader !== false) {
15854
15858
  const slice = this._blob.slice(worker.currentPos);
15855
15859
  reader = slice.stream().getReader();
15856
15860
  } else {