Skip to content

BikDecoder

Defined in: bik-decoder.ts:261

Main class for managing the state of a BIK decoder instance. One instance can decode a single video from a single data source at a time.

get header(): BikHeader | null

Defined in: bik-decoder.ts:560

Decoded header of the video.

BikHeader | null

Decoded header.


get isSupported(): boolean

Defined in: bik-decoder.ts:568

Whether the audio/images in the video can be processed by the decoder or not.

boolean

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

getNextFrame(prevFrame): Promise<BikFrame | null>

Defined in: bik-decoder.ts:578

Get the next frame of the video 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:664

Reset the state of the decoder so it is ready to start decoding the video from the beginning. Note that this will result in the decoder streaming the video again from the data source.

void


skipFrames(numFrames): Promise<void>

Defined in: bik-decoder.ts:650

Skip the specified number of frames of the video. 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>