Console error Uncaught (in promise) Error: There is already an encoder stored which handles exactly the same mime types. at Worker.<anonymous> (module.ts:49:1)
See original GitHub issueIssue Description
Hi, Thank you for making this package! It gives this error when using the basic wrapper code:
import './App.css';
import { ReactMediaRecorder } from 'react-media-recorder'
function App() {
return (
<ReactMediaRecorder
video
render={({ status, startRecording, stopRecording, mediaBlobUrl }) => (
<div>
<p>{status}\</p>
<button onClick={startRecording}>Start Recording</button>
<button onClick={stopRecording}>Stop Recording</button>
<video src={mediaBlobUrl} controls autoPlay loop />
</div>
)}
/>
);
}
export default App;
My environment is:
- Macos Monterey,
- Chrome 103,
- the project was created using npx create-react-app,
- the package was installed with npm
- dependencies from Package.json:
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-media-recorder": "^1.6.6",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"`
As you can see in the above code, I’m not setting any of the options available, especially the mimetype.
Issue Analytics
- State:
- Created 9 months ago
- Reactions:17
- Comments:18 (1 by maintainers)
Top Results From Across the Web
React Extendable-Media-Recorder Unhandled Rejection (Error)
I just stumbled upon this today. There was a bug in the code which is hopefully fixed in v6.1.56.
Read more >MediaRecorder.mimeType - Web APIs - MDN Web Docs
The mimeType read-only property returns the MIME media type that was specified when creating the MediaRecorder object, or, ...
Read more >TypeScript errors and how to fix them
error TS2307: Cannot find module 'events' or its corresponding type declarations. Broken Code ❌. You are importing from a core Node.js module (e.g....
Read more >mimetypes — Map filenames to MIME types — Python 3.11.1 ...
Source code: Lib/mimetypes.py The mimetypes module converts between a filename or URL and the MIME type associated with the filename extension.
Read more >mod_mime_magic - Apache HTTP Server Version 2.4
Apache Module mod_mime_magic ; Determines the MIME type of a file by looking at a few bytes of its contents · Extension ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The encoder error went away for me on NextJS by downgrading to 1.6.5
npm i react-media-recorder@1.6.5
Having the same issue as I’m re-using the hook multiple times on the same page. I don’t want to drop strict mode and it doesn’t solve the issue anyway for CRA, as @jessejamesrich pointed out.
I tried switching
blobPropertyBag
to{type: 'audio/mp3'}
(from the default{type: 'audio/wav'}
), though that had the same error. @0x006F would you be open to make the logic running in theuseEffect
optional? See https://github.com/0x006F/react-media-recorder/issues/105#issuecomment-1195057490Related issue https://github.com/0x006F/react-media-recorder/issues/98