All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Ability to set output sample rate for the LAME encoder (#11)
- Changed the internal WASM API, so added error checking for mismatched JS/WASM binaries
- This package (except for UMD and esnext builds) now depends on
@swc/helpers
instead of@babel/runtime
- Build toolchain upgraded to Node 20, Yarn 4, SWC, and vitest
- Fixed issue where encoding large MP3s could potentially fail
- Fixed issue where OGG encoding took ~10x too long
- Untranspiled JS is now available via
wasm-media-encoders/esnext
- The
browser
and UMD entries are now correctly transformed with Babel to support all browsers that support WASM.@babel/runtime
is now a dependency for thebrowser
entry.
- Browsers will now use
WebAssembly.instantiateStreaming()
for data URIs as well (if available).
fetch()
ing from non-data URL in Node
- Can now supply a callback to
createEncoder()
to get the compiledWebAssembly.Module
- Support for ESM modules in Node
- Reduced JS size by about 40%
- Reduced LAME WASM size by about 4%
- Reduced OGG WASM size by about 3%
- Fixed an issue where encoding large buffers would return a detached
ArrayBuffer
. - Bundling with webpack v4 no longer pulls in a
Buffer
polyfill.