Javascript HTML5 音频可视化工具?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3351147/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
HTML5 Audio Visualizer?
提问by NickKampe
Is there such a player? I'm looking into making one purely out of JavaScript. Something like http://www.nihilogic.dk/labs/pocket_full_of_html5/but randomly all mashed together?
有这样的球员吗?我正在考虑完全用 JavaScript 制作一个。像http://www.nihilogic.dk/labs/pocket_full_of_html5/ 之类的东西,但随机地全部混在一起?
What are your thoughts?
你怎么看?
回答by Ezeke
2 years later and a solution is found :)
2 年后,找到了解决方案:)
https://github.com/jsantell/dancer.js
https://github.com/jsantell/dancer.js
I also stumbled upon a website which uses the audio API and three.js to create pretty nice looking visualizations: http://do.adive.in/music/
我还偶然发现了一个网站,它使用音频 API 和three.js 来创建非常漂亮的可视化:http://do.adive.in/music/
回答by Martin Harrigan
Over 3 years later and we have this: http://codepen.io/soulwire/pen/Dscga.
3 年后,我们有了这个:http: //codepen.io/soulwire/pen/Dscga。
回答by Dave R.
I believe the experimental Firefox Audio API is currently the only way you can do this in HTML+Javascript, although this is far from being official HTML5. Have a read of the documentation here:
我相信实验性的 Firefox Audio API 是目前您可以在 HTML+Javascript 中执行此操作的唯一方法,尽管这远不是官方的 HTML5。在这里阅读文档:
https://wiki.mozilla.org/Audio_Data_API
https://wiki.mozilla.org/Audio_Data_API
It includes an example of a simple spectrum analyser. I also really recommend exploring the demo links on the same page:
它包括一个简单的频谱分析仪的例子。我也非常建议您浏览同一页面上的演示链接:
https://wiki.mozilla.org/Audio_Data_API#Working_Audio_Data_Demos
https://wiki.mozilla.org/Audio_Data_API#Working_Audio_Data_Demos
It's an exciting time to be a Javascript developer and I hope the other browser vendors embrace this API. We can finally get sound in all those Javascript emulators for a start!
成为 Javascript 开发人员是一个激动人心的时刻,我希望其他浏览器供应商接受这个 API。我们终于可以开始在所有这些 Javascript 模拟器中获得声音了!
回答by tagawa
Is this the kind of visualizer you're after? http://www.storiesinflight.com/jsfft/visualizer/index.html
这是您追求的那种可视化工具吗? http://www.storiesinflight.com/jsfft/visualizer/index.html
回答by tagawa
This might be the answer: http://audioscene.org/scene-files/humph/slideshow/in particular slide 6. It uses Mozilla's proposed Audio Data API which is not a W3C standard (yet) so only supported in Firefox 4.
这可能是答案:http: //audioscene.org/scene-files/humph/slideshow/特别是幻灯片 6。它使用 Mozilla 提议的音频数据 API,该 API 不是 W3C 标准(尚),因此仅在 Firefox 4 中受支持。

