createListeningStream(usersIds, writeStream) {
const receiver = this.connection.receiver;
this.opusStream = [];
// console.log(usersIds);
usersIds.forEach((userId) => {
const opusStream = receiver.subscribe(userId);
const opusDecoder = new prism.opus.Decoder({
frameSize: 960,
channels: 2,
rate: 48000,
});
this.opusStream = opusStream;
console.log(this.opusStream.end);
opusStream.pipe(opusDecoder).pipe(writeStream);
});
this.emit('create-listining-stream');
return this;
}
I think thats comming from the end behaviour that i had set