使用 jS 或 html5 以编程方式录制网页的音频输出? [英] Programatically record audio output from web page using jS or html5?

查看:33
本文介绍了使用 jS 或 html5 以编程方式录制网页的音频输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以使用 html5、jS 或其他东西以编程方式捕获从网页播放的音频并从中创建 mp3/wav 文件?我知道网络音频 API,但我只能找到有关从麦克风输入而不是网页输出录制音频的信息.

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.

谢谢

推荐答案

您可以使用 Web Audio API 来录制任何 Web Audio 节点的输出,而不仅仅是麦克风输入.如果您要录制音频的网页是使用 Web Audio API 生成声音,那么您绝对可以使用 Web Audio API 来录制它(查看 Recorder.js).

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).

如果声音是从 html 元素播放的,您可以将其转换为 Web Audio 节点并进行录制.看看这个:http:///updates.html5rocks.com/2012/02/HTML5-audio-and-the-Web-Audio-API-are-BFFs

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

这篇关于使用 jS 或 html5 以编程方式录制网页的音频输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆