mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
Add optional streamOptions to playStream() functions (#663)
* Adding playStream options Added optional volume and seek properties * fixed code formatting Edited my code styling to match with the rest of d.js * Added Default Variable * Added Documentation Added documentation for the streamOptions parameter Added a default value for seek in FFmpegConverterEngine Removed redundantcy * Fixed docs for voiceConnection * Change _updateMember's notSame check from && to || (#665) * Fixed git merge fail * Built Docs. Again......... * Hopefully finally fixed
This commit is contained in:
committed by
Schuyler Cebulskie
parent
4be7a1bfd1
commit
f7a542f12b
@@ -12,7 +12,7 @@ class FfmpegConverterEngine extends ConverterEngine {
|
||||
this.emit('error', err);
|
||||
}
|
||||
|
||||
createConvertStream() {
|
||||
createConvertStream(seek = 0) {
|
||||
super.createConvertStream();
|
||||
const encoder = ChildProcess.spawn(this.command, [
|
||||
'-analyzeduration', '0',
|
||||
@@ -20,7 +20,7 @@ class FfmpegConverterEngine extends ConverterEngine {
|
||||
'-i', '-',
|
||||
'-f', 's16le',
|
||||
'-ar', '48000',
|
||||
'-ss', '0',
|
||||
'-ss', seek.toString(),
|
||||
'pipe:1',
|
||||
], { stdio: ['pipe', 'pipe', 'ignore'] });
|
||||
encoder.on('error', e => this.handleError(encoder, e));
|
||||
|
||||
Reference in New Issue
Block a user