Programatically record audio output from web page using jS or html5?

▼魔方 西西 提交于 2019-12-19 02:28:13

问题


Is there any way to programatically capture the audio being played from a webpage using html5, jS, or something else and create a mp3/wav file out of it? I know of the web audio API, but I've only been able to find information on recording audio from microphone input, rather than output of a web page.

Thanks


回答1:


You can use the Web Audio API to record the output of any Web Audio node, not just microphone input. If the webpage you want to record audio from is using the Web Audio API to generate sound, then you can definitely use the Web Audio API to record it (check out Recorder.js).

If the sound is being played from html elements, you can turn it into a Web Audio node and record it. Check this out: http://updates.html5rocks.com/2012/02/HTML5-audio-and-the-Web-Audio-API-are-BFFs



来源:https://stackoverflow.com/questions/26263132/programatically-record-audio-output-from-web-page-using-js-or-html5

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