-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Cannot find name 'MediaRecorder'. #34728
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
Comments
You can get types for MediaRecorder by installing the types package: On another note (personal opinion here), it's quite disrespectful to open such an issue. The "New Issue" page explicitly states that questions go to Stack Overflow. If you believe this to be a bug, there's an entire bug template which you've ignored and replaced with an image. Help others help you. |
While I completely agree with following issue templates, I think it's worth mentioning that this issue is now near the top of search results for "cannot find name MediaRecorder". That's how I got here (yes, I could have gone to DefinitelyTyped and checked for MediaRecorder, but sometimes you google things). Point is, despite being an unactionable issue that probably never should have been opened, it now serves a useful purpose as unintentional documentation, answering the simple question of which package is needed to add types for Sometimes things work out in ways you would not have expected. This is one of the reasons that I am a firm believer in showing appreciation for all issues that aren't obviously spam. So thanks @leishenglin. |
Now that is really a respectful comment coming from you @timmywil . Congratulations!!! |
How is this unactionable? As a user, if I have access to Anyways, here's an actionable suggesting: do a scrape on page: https://developer.mozilla.org/en-US/docs/Web/API, and if there are items not built-in in typescript, change the error message to: "We know this is a built-in browser feature, but we don't have it in typescript by default, please consider installing third-party dependencies". |
Open add following code "angularCompilerOptions": {
//......
"types": [
"node"
]
} |
I second this. |
So, this is a workaround, NOT a solution, but to get past this in your code without having to add the dependency, just add this line at the top of your code...
|
@guiseek are you using the same version of TypeScript both in VSCode and the terminal? |
The text was updated successfully, but these errors were encountered: