Why Web Audio API isn't supported in nodejs?

試著忘記壹切 提交于 2019-12-01 03:22:22

Node.js doesn't support Web Audio because it isn't part of the JavaScript language itself - it's a separate web platform JavaScript API.

You can think of it like Web Workers, requestAnimationFrame or XMLHttpRequest - they are part of the browser's JavaScript environment, but they don't necessarily make sense for other runtimes.

V8 is a generic JavaScript engine; it doesn't include web platform features. That's one of the reasons that Node.js is able to use it. Chrome's implementation of Web Audio is part of Blink, the rendering engine.

The web-audio-api npm module aims to implement Web Audio for Node.js.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!