Bump @discordjs/voice from 0.5.6 to 0.6.0
Created by: dependabot[bot]
Bumps @discordjs/voice from 0.5.6 to 0.6.0.
Release notes
Sourced from @discordjs/voice
's releases.
v0.6.0
Voice Receive
v0.6.0 makes voice receive useable with many utility additions. You can see a run-down below, or view the full recorder example.
Audio receive streams automatically close when their attached voice connection is destroyed.
// Join with selfDeaf set to false to receive audio const voiceConnection = joinChannel({ ...options, selfDeaf: false }); voiceConnection.receiver.speaking.on('start', userId => console.log(User ${userId} started speaking)); voiceConnection.receiver.speaking.on('end', userId => console.log(User ${userId} stopped speaking)); // A Readable object mode stream of Opus packets // Will only end when the voice connection is destroyed voiceConnection.receiver.subscribe(userId); // A Readable object mode stream of Opus packets // Will end when the voice connection is destroyed, or the user has not said anything for 100ms const opusStream = voiceConnection.receiver.subscribe(userId, { end: { behavior: EndBehaviorType.AfterSilence, duration: 100, }, }); // ------------------------- // You can re-use the Opus stream, e.g. to play in another channel as an echo const resource = createAudioResource(opusStream, { inputType: StreamType.Opus }); // You can decode the Opus stream to raw audio using prism-media const rawAudio = opusStream.pipe(new prism.opus.Decoder({ frameSize: 960, channels: 2, rate: 48000 })); // You can save the stream to an Ogg file using prism-media@2.0.0-alpha.0 const oggWriter = new opus.OggLogicalBitstream({ opusHead: new opus.OpusHead({ channelCount: 2, sampleRate: 48000, }), pageSizeControl: { maxPackets: 10, }, }); pipeline(opusStream, oggWriter, createWriteStream('./myfile.ogg'), callback);
... (truncated)
Commits
-
a75393a
chore(Release): v0.6.0 -
687e0e8
feat(VoiceReceive)!: improve usability (#136) -
07e751a
refactor(Examples): remove unused imported binding (#172) -
636f54f
feat(Util): support AbortSignal in entersState (#171) -
2e6a622
refactor(AudioPlayer): use this.once instead of events.once (#162) -
dd5751b
test(DataStore): add missing tests (#165) -
c7e5381
chore: update conventional commit URL (#167) - See full diff in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)