Skip to content
1 min read · 75 words

Function: implementsMediaReader()

ts
function implementsMediaReader(value: unknown): value is MediaReader;

Returns true if value implements the MediaReader interface.

Parameters

ParameterTypeDescription
valueunknownThe value to test.

Returns

value is MediaReader

true when value conforms to the MediaReader interface.

Remarks

Duck-typed: checks that value is non-null with stream and byteLength as callable functions. Does not use instanceof — there is no MediaReader constructor.