简体   繁体   中英

error TS2304: Cannot find name 'MediaRecorder'

I want to implement audio recording functionality in my angular app using media recorder but I am getting the following error:

error TS2304: Cannot find name 'MediaRecorder'

Does anyone has solution for this.

Assuming you are using Media Recorder

Go to your tsconfig file if you dont have one create by npx tsc --init


{
  "compilerOptions": {
    // ......your other options
    "lib": ["dom", "dom.iterable", "esnext"]
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM