mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 04:31:05 +00:00
voice: update prism
This commit is contained in:
parent
4289b18ab2
commit
0564c5c777
1 changed files with 2 additions and 2 deletions
|
|
@ -75,10 +75,10 @@ class PlayInterface {
|
||||||
return this.player.playOpusStream(resource, options);
|
return this.player.playOpusStream(resource, options);
|
||||||
} else if (type === 'ogg/opus') {
|
} else if (type === 'ogg/opus') {
|
||||||
if (!(resource instanceof Readable)) throw new Error('VOICE_PRISM_DEMUXERS_NEED_STREAM');
|
if (!(resource instanceof Readable)) throw new Error('VOICE_PRISM_DEMUXERS_NEED_STREAM');
|
||||||
return this.player.playOpusStream(resource.pipe(new prism.OggOpusDemuxer()), options);
|
return this.player.playOpusStream(resource.pipe(new prism.opus.OggDemuxer()), options);
|
||||||
} else if (type === 'webm/opus') {
|
} else if (type === 'webm/opus') {
|
||||||
if (!(resource instanceof Readable)) throw new Error('VOICE_PRISM_DEMUXERS_NEED_STREAM');
|
if (!(resource instanceof Readable)) throw new Error('VOICE_PRISM_DEMUXERS_NEED_STREAM');
|
||||||
return this.player.playOpusStream(resource.pipe(new prism.WebmOpusDemuxer()), options);
|
return this.player.playOpusStream(resource.pipe(new prism.opus.WebmDemuxer()), options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new Error('VOICE_PLAY_INTERFACE_BAD_TYPE');
|
throw new Error('VOICE_PLAY_INTERFACE_BAD_TYPE');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue