Closed Javeed-JargonHandlers closed 3 years ago
I do not use Next.js so I can’t help you here.
async function requestRecorder() {
const stream = await navigator.mediaDevices.getUserMedia({ audio: true })
if (!window.AudioRecorder) {
const polyfillModule = await import("audio-recorder-polyfill");
const AudioRecorder = polyfillModule.default;
window.AudioRecorder = AudioRecorder;
}
return new window.AudioRecorder(stream)
}
I know, not the cleanest solution but gets the job done.
I would like to integrate with next js
Hi. I forked this package and made some changes for it to work on server side rendering applications such as Nextjs. Feel free to install it using the following command:
npm install git+https://github.com/lucasotanez/audio-recorder-polyfill-next.git
Make sure to read the updated docs to get started. Hopefully it works for your use case.
I would like to integrate with next js
Please help me