Skip to content

StreamResponse

The response of a stream handler.

body:
| Readable
| AsyncIterable<Uint8Array<ArrayBufferLike>, any, any>;

The audio bytes.


contentType?: string;

The content type. Default: application/octet-stream.


headers?: Record<string, string | number>;

Extra headers.


size?: number;

The total size of the stream, when it is known.

It is required to answer the range requests.


status?: number;

The status code. Default: 200.