Closed moirrer closed 9 years ago
No, unfortunately this is a native addon, so it won't work in the browser.
However, I have experimented in the past with compiling libmpg123 to JS using emscripten. This experiment isn't entirely complete, but you can see it here: https://github.com/TooTallNate/mpg123.js.
Cheers!
Any chance to make this work in my client side? Was tring browserify the PCM example
var fs = require('fs'); var lame = require('lame'); var path = require('path');
fs.createReadStream(process.argv[2] || path.resolve(dirname, 'sample.float.pcm')) .pipe(new lame.Encoder({ channels: 2, bitDepth: 32, float: true })) .pipe(fs.createWriteStream(path.resolve(dirname, 'sample_pcm.mp3'))) .on('close', function () { console.error('done!'); });
but keep getting error: fs.createReadStream is not a function