Skip to content

BikDecoder

Defined in: bik-decoder.ts:224

Main class for managing the state of a BIK decoder instance. One instance can decode a single file at a time.

get header(): BikHeader | null

Defined in: bik-decoder.ts:446

Decoded header of the BIK file.

BikHeader | null

Decoded header.


get isSupported(): boolean

Defined in: bik-decoder.ts:455

Whether the audio/video streams in the BIK file can be processed by the decoder or not.

boolean

true when the audio/video streams can be processed by the decoder, otherwise false.

getNextFrame(prevFrame): Promise<BikFrame | null>

Defined in: bik-decoder.ts:465

Get the next frame of the BIK file and decode it.

Optional data structure for a previously decoded frame to re-use (to reduce garbage collection).

BikFrame | null

Promise<BikFrame | null>

Next decoded frame (audio and video).


reset(): void

Defined in: bik-decoder.ts:553

Reset the current frame index so the decoder is ready to start decoding the BIK file from the beginning. Note that this will result in the decoder requesting a new readable stream.

void


skipFrames(numFrames): Promise<void>

Defined in: bik-decoder.ts:536

Skip the specified number of frames of the BIK file. They will still be decoded as decoding a frame can effectively require data from any number of earlier frames.

number

Number of frames to skip, but still decode.

Promise<void>


static open(getReadStreamFn): Promise<BikDecoder>

Defined in: bik-decoder.ts:564

Attempt to read and parse the headers of a BIK file. If successful, return an instance of BikDecoder for decoding the rest of the file.

GetReadStreamFn

Function that returns a stream for linear access to part of the file.

Promise<BikDecoder>

Decoder instance. Use header to access the parsed headers.