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.
Accessors
Section titled “Accessors”header
Section titled “header”Get Signature
Section titled “Get Signature”get header():
BikHeader|null
Defined in: bik-decoder.ts:446
Decoded header of the BIK file.
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:455
Whether the audio/video streams in the BIK file can be processed by the decoder or not.
Returns
Section titled “Returns”boolean
true when the audio/video streams 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:465
Get the next frame of the BIK file and decode it.
Parameters
Section titled “Parameters”prevFrame
Section titled “prevFrame”Optional data structure for a previously decoded frame to re-use (to reduce garbage collection).
BikFrame | null
Returns
Section titled “Returns”Promise<BikFrame | null>
Next decoded frame (audio and video).
reset()
Section titled “reset()”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.
Returns
Section titled “Returns”void
skipFrames()
Section titled “skipFrames()”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.
Parameters
Section titled “Parameters”numFrames
Section titled “numFrames”number
Number of frames to skip, but still decode.
Returns
Section titled “Returns”Promise<void>
open()
Section titled “open()”
staticopen(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.
Parameters
Section titled “Parameters”getReadStreamFn
Section titled “getReadStreamFn”Function that returns a stream for linear access to part of the file.
Returns
Section titled “Returns”Promise<BikDecoder>
Decoder instance. Use header to access the parsed headers.