Skip to content

BikDecoder

Defined in: bik-decoder.ts:219

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:513

Decoded header of the video.

BikHeader | null

Decoded header.


get isSupported(): boolean

Defined in: bik-decoder.ts:522

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:533

Get the next frame of the video and decode it.

BikFrame | null

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

Promise<BikFrame | null>

Next decoded frame (audio and video).


reset(): void

Defined in: bik-decoder.ts:621

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:606

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>