Hi. I was wondering if anyone had experience working in building online internet radios with Nodejs. I’m trying to build a real-time audio stream across multiple clients.
This means that Node should request the audio file from S3, play it on the server and output the stream to the client so that every single user who connects hears the same thing.
I have tried to used node-lame, streammachine and socket-stream but I’m still struggling with the output. Closest I’ve got was the following.
var fs = require('fs'); var lame = require('lame'); var Speaker = require('speaker'); fs.createReadStream(process.argv) .pipe(new lame.Decoder) .on('format', console.log) .pipe(new Speaker);
What it does is just grabbing the sample file from the command line and output it into my speakers. I need this to output into the client that has an tag.
Also, I’ve tried the streammachine but found it very inflexible when adding a playlist.
I appreciate any input!