A patched version of lamejs that fixes circular dependencies issues. This package is a drop-in replacement for the original lamejs package.
The original lamejs package has some circular dependency issues that can cause problems in certain build environments. This patched version fixes those issues by properly importing missing dependencies in several key files:
- Added
Lame
import to BitStream.js - Added
MPEGMode
import to Encoder.js, Lame.js, and PsyModel.js - Added
BitStream
import to QuantizePVT.js
npm install lamejs-patched
Use it exactly the same way as you would use the original lamejs package:
const lamejs = require('lamejs-patched');
// Use it just like the original lamejs
const mp3enc = new lamejs.Mp3Encoder(channels, sampleRate, kbps);
This package uses patch-package to apply the necessary fixes. You can find the exact changes in the patches/lamejs+1.2.1.patch
file.
This project is licensed under the LGPL-3.0 License - see the original lamejs project for more details.
- Original package: lamejs
- Patch contributors: [Your name/username here]