Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
curvejumpinc opened this issue Oct 18, 2024 · 4 comments
Open

Comments

@curvejumpinc
Copy link

curvejumpinc commented Oct 18, 2024

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
Copy link

mreartes5 commented Oct 21, 2024

The same problem here.

I have that error when I build my next application

@icampana
Copy link

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

@AshishDhama
Copy link
Collaborator

@curvejumpinc Would it be possible to create a demo on stackblitz or something else.

@AshishDhama
Copy link
Collaborator

And Pr are welcome if you have a fix, please go ahead and create pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants