> A player use MediaSource, by @hxli8 @bqliu.
npm install @isfe/mse-playerstrToBlob and wavToMp3 are exported for convenience. But notice that if you want to use wavToMp3, you need to import lamejs in global environment. And use your bundler, e.g. rollup, you need to use rollup-plugin-external-globals and use it in your configuration.
js
// simple rollup config
const config = {
plugins: [nodeResolve(), commonjs(), rollupTypescript(), externalGlobals({ lamejs: 'lamejs' })]
}
`
For webpack, you may use externals. For umd`, do it as you like.