Skip to content
Type

BlobSourceOptions

Options for BlobSource.

ts
type BlobSourceOptions = {
	maxCacheSize?: number;
	useStreamReader?: boolean;
	handleUnhandledError?: (error: unknown) => unknown;
};

Used by

Properties

maxCacheSize

ts
maxCacheSize?: number;

The maximum number of bytes the cache is allowed to hold in memory. Defaults to 8 MiB.

useStreamReader

ts
useStreamReader?: boolean;

Defaults to true. When true, Mediabunny will acquire a ReadableStream reader internally to efficiently read data from the blob. Since this can lead to errors in some (very) rare cases due to browser bugs, you can set this field to false to try a slower but more stable reading method.

handleUnhandledError

ts
handleUnhandledError?: (error: unknown) => unknown;

Handles errors that occur while no read is pending. By default, these become unhandled rejections.

Released under the Mozilla Public License 2.0.