DeltaCircuit / react-media-recorder

react-media-recorder is a react component with render prop that can be used to record audio/video streams using MediaRecorder API.
https://npmjs.com/react-media-recorder
MIT License
492 stars 131 forks source link

Error: Worker is not defined when using the useReactMediaRecorder hook #144

Open curvejumpinc opened 1 week ago

curvejumpinc commented 1 week ago

import { useReactMediaRecorder } from 'react-media-recorder';

// React Media Recorder hook const { status, startRecording, stopRecording, mediaBlobUrl } = useReactMediaRecorder({ audio: true, mediaRecorderOptions: { audioBitsPerSecond: 16000, bitsPerSecond: 16000, }, onStop: onAudioResponseRecordingDone, });

This compiles fine in typescript and the code also works fine but I'd like to avoid this "Worker not defined" error in Chrome if possible. I am using next.js 14.2.5

mreartes5 commented 4 days ago

The same problem here.

I have that error when I build my next application

icampana commented 2 days ago

The only solution for me for now was to downgrade to version 1.6.5, even though from the information I saw the idea is to load the hook dynamically so that it only renders on the client side