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.
Accessors
Section titled “Accessors”header
Section titled “header”Get Signature
Section titled “Get Signature”get header():
BikHeader|null
Defined in: bik-decoder.ts:513
Decoded header of the video.
Returns
Section titled “Returns”BikHeader | null
Decoded header.
isSupported
Section titled “isSupported”Get Signature
Section titled “Get Signature”get isSupported():
boolean
Defined in: bik-decoder.ts:522
Whether the audio/images in the video can be processed by the decoder or not.
Returns
Section titled “Returns”boolean
true when the audio/images can be processed by the decoder, otherwise false.
Methods
Section titled “Methods”getNextFrame()
Section titled “getNextFrame()”getNextFrame(
prevFrame?):Promise<BikFrame|null>
Defined in: bik-decoder.ts:533
Get the next frame of the video and decode it.
Parameters
Section titled “Parameters”prevFrame?
Section titled “prevFrame?”BikFrame | null
Optional data structure for a previously decoded frame to re-use (to reduce garbage collection).
Returns
Section titled “Returns”Promise<BikFrame | null>
Next decoded frame (audio and video).
reset()
Section titled “reset()”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.
Returns
Section titled “Returns”void
skipFrames()
Section titled “skipFrames()”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.
Parameters
Section titled “Parameters”numFrames
Section titled “numFrames”number
Number of frames to skip, but still decode.
Returns
Section titled “Returns”Promise<void>