js-mp3

0.1.0 • Public • Published

js-mp3

Pure javascript mp3 decoder, translate from go-mp3 project.
Build Status

Usage

let Mp3 = require('js-mp3');
 
var mp3ArrayBuffer = ...; // prepare your mp3 decoded array buffer here
 
var decoder = Mp3.newDecoder(mp3ArrayBuffer);
var pcmArrayBuffer = decoder.decode(); // now you got decoded PCM data
 

you can visit js-mp3-example project to see how to decode mp3 file then play it.

Tests

Frameworks

Run tests with:

$ npm test

Get coverage report:

$ npm run coverage 

Then you can find the report html here: {project_location}/coverage/lcov-report/index.html.

Issue

It put all decoded pcm data in ArrayBuffer now, so you'd better not use it to decode big size MP3 file.

/js-mp3/

    Package Sidebar

    Install

    npm i js-mp3

    Weekly Downloads

    41

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    385 kB

    Total Files

    25

    Last publish

    Collaborators

    • hzq1421