Interface: Encoder

Encoder

Encoder interface. Encoder is used by OutgoingMessage to encode data recorder with Recorder. Custom Encoder implementation should call method ondata once encoded data portion is ready
Source:

Methods

encode(data)

Parameters:
Name Type Description
data array array of 1 or 2 buffers for each PCM channel
Source:

ondata(data)

Emit encoded data portion to let OutgoingMessage instance get encoded data ready to be sent into channel
Parameters:
Name Type Description
data Uint8Array | array encoded opus data portion
Source: