📦 ESM build of
attachMediaStreampackage
attachmediastream is a tiny browser module for attaching a media stream to a video (or audio) element with some options handling the differences between browsers.
Unfortunately, the original attachmediastream provides only CJS and AMD module, primary for Browserify:
- It doesn't directly work in ESM environment.
- It requires
webrtc-adapterwith issues around ESM-CJS interop, which requires additional configuration likebabel-plugin-add-module-exports. - In our environment,
AMDdoesn't work in Safari with no errors. Video and audio stream just don't work.
This package simply builds ESM version of the library with a direct ESM import of webrtc-adapter.
npm install attachmediastream-esmimport attachMediaStream from 'attachmediastream-esm'See details: https://github.com/otalk/attachMediaStream
MIT