Constructor
new Decoder()
- Source:
Example
const decoder = new prism.opus.Decoder({ frameSize: 960, channels: 2, rate: 48000 });
input.pipe(decoder);
// decoder will now output PCM audio
Extends
Methods
setBitrate(bitrate)
Sets the bitrate of the stream.
Parameters:
Name | Type | Description |
---|---|---|
bitrate |
number | the bitrate to use use, e.g. 48000 |
- Inherited From:
- Source:
setFEC(enabled)
Enables or disables forward error correction.
Parameters:
Name | Type | Description |
---|---|---|
enabled |
boolean | whether or not to enable FEC. |
- Inherited From:
- Source:
setPLP(percentageopt)
Sets the expected packet loss over network transmission.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
percentage |
number |
<optional> |
a percentage (represented between 0 and 1) |
- Inherited From:
- Source: