Skip to content
Type

OggOutputFormatOptions

Ogg-specific output options.

ts
type OggOutputFormatOptions = {
	maximumPageDuration?: number;
	onPage?: (data: Uint8Array, position: number, source: MediaSource) => unknown;
};

See MediaSource.

Used by

Properties

maximumPageDuration

ts
maximumPageDuration?: number;

The maximum duration of each Ogg page, in seconds. This is useful for streaming contexts where more frequent page output is desired. By default, pages are only flushed when they exceed a certain size.

Events

onPage

ts
onPage?: ((data: Uint8Array<ArrayBufferLike>, position: number, source: MediaSource) => unknown);

Will be called for each Ogg page that is written.

See MediaSource.

Released under the Mozilla Public License 2.0.