Nounejm
Nounejm
DIAdiscord.js - Imagine an app
Created by Nounejm on 6/23/2023 in #djs-voice
receiving audio from a user and playing it with ffplay
This is my code:
let connection = joinVoiceChannel({
adapterCreator: message.guild.voiceAdapterCreator,
channelId: message.member.voice.channel.id,
guildId: message.guild.id,
selfDeaf: false,
selfMute: true
});

let subscription = connection.receiver.subscribe(message.author.id, {
autoDestroy: false,
emitClose: false
});

const ffplay = exec('ffplay -');

subscription.pipe(ffplay.stdin)
let connection = joinVoiceChannel({
adapterCreator: message.guild.voiceAdapterCreator,
channelId: message.member.voice.channel.id,
guildId: message.guild.id,
selfDeaf: false,
selfMute: true
});

let subscription = connection.receiver.subscribe(message.author.id, {
autoDestroy: false,
emitClose: false
});

const ffplay = exec('ffplay -');

subscription.pipe(ffplay.stdin)
It looks like the subscription is giving audio but the ffplay is not playing it.
17 replies