MediaRecorder is not defined

[Problem/Question]
Error occurred prerendering page “/chat”. Read more: Prerender Error | Next.js
ReferenceError: MediaRecorder is not defined
at /vercel/path0/.next/server/app/(root)/(user)/chat/page.js:99:206060
at Array.find ()
at py (/vercel/path0/.next/server/app/(root)/(user)/chat/page.js:99:206043)
at nP (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:45321)
at n$ (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61978)

// If problem, please fill out the below. If question, please delete.
[UIKit Version]
@sendbird/uikit-react”: “^3.14.7”,
“next”: “^14.2.3”,

[Current impact]
only gives error in production build works in localhost