chrisguttandin / extendable-media-recorder

An extendable drop-in replacement for the native MediaRecorder.
MIT License
258 stars 13 forks source link

There is already an encoder stored which handles exactly the same mime types #645

Closed tranquocviet226 closed 3 years ago

tranquocviet226 commented 3 years ago

Hi, I got an error

image

mylnikovD commented 3 years ago

It seems that it happens because you have multiple invocations of code that connects codecs - await register(await connect());

I'm using it with React and put it in App.jsx componentDidMount lifecycle (or useEffect hook with empty deps array) so it would happen only once when openning the page with app and it fixed the error

chrisguttandin commented 3 years ago

Hi @tranquocviet226, I think @mylnikovD is right (thanks for chiming in). Without any sample code I would also assume that this is the problem. Please make sure that you register each encoder only once.

I'm going to close this issue. Please feel free to reopen it in case calling register() multiple times wasn't the issue. Preferably with some sample code that allows me to reproduce the error.