discord.io icon indicating copy to clipboard operation
discord.io copied to clipboard

Added an optional parameter to define playback volume

Open lc-101 opened this issue 7 years ago • 0 comments

Added volume control:

Added an optional parameter to define playback volume when you call getAudioContext

This is using an FFmpeg Audio filter

Example:

client.getAudioContext(channel, 0.5, function(error, stream) {
	if(error) console.log(error)
    return stream
    //This will play any audio at half volume, if no value is defined audio plays at full volume. 
})

lc-101 avatar Nov 21 '17 01:11 lc-101