'how to prevent a stream from stopping

I have a master stream, which i use to push multiple incoming audio streams. I then play the master stream

receiver.on('start', () => {

    const opusStream = receiver.subscribe(options);

    opStream.on('data', (c) => {

        stream.push(c);
    });


    opStream.on('end', () => {
        console.log('Ended')
    })
});

I push the data from opus stream to the master stream so the problem is when opus stream ends, the master stream stops playing anymore audio. How can I fix this? I'm not sure whats going on here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source