mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
* fix(Voice*): synthesize speaking event from UDP packets * fix(VoiceReceiver): skip over undocumented Discord byte See #3555 * fix(VoiceConnection): play frame silence before emitting ready * typings: account for changes in private api
17 lines
368 B
JavaScript
17 lines
368 B
JavaScript
const Silence = require('./Silence');
|
|
|
|
/**
|
|
* Only emits a single silent opus frame.
|
|
* This is used as a workaround for Discord now requiring
|
|
* silence to be sent before being able to receive audio.
|
|
* @extends {Silence}
|
|
* @private
|
|
*/
|
|
class SingleSilence extends Silence {
|
|
_read() {
|
|
super._read();
|
|
this.push(null);
|
|
}
|
|
}
|
|
|
|
module.exports = SingleSilence;
|