Skip to content
1 min read · 68 words

Function: fromWebFile()

ts
function fromWebFile(file: Blob): MediaReader;

Constructs a @nhtio/adk!MediaReader backed by a browser File or Blob.

Parameters

ParameterTypeDescription
fileBlobThe browser File or Blob to stream.

Returns

MediaReader

A @nhtio/adk!MediaReader that re-streams file on every call.

Remarks

Each stream() call re-streams the underlying File via File.stream(). byteLength() resolves from file.size.