简体   繁体   English

HTML5音频播放器的可视化

[英]HTML5 audio player visualization

i'm working on a HTML5 audio player, and i'm stuck at making audio visualizations... I was googling and i only found visualizations that are supported by firefox or chrome. 我正在开发HTML5音频播放器,并且无法进行音频可视化处理。我在谷歌搜索时,只发现了受firefox或chrome支持的可视化处理。 So now i'm here asking: is it possible to create audio visualizations with HTML5 and Javascript for all newest browsers? 所以现在我在这里问:是否可以为所有最新的浏览器使用HTML5和Javascript创建音频可视化? If the anwser is yes: how? 如果答案是肯定的:怎么办? If the anwser is no: what can you recomend then? 如果答案是“否”:那您能推荐什么呢?

  1. No. You're going to need a combination of the web audio API, and either canvas or webgl for the rendering. 否。您将需要Web音频API和canvas或webgl的组合来进行渲染。 As you've discovered, the web audio API is only partially supported in Chrome, Firefox and Safari . 如您所知, Chrome,Firefox和Safari仅部分支持网络音频API。
  2. Flash. 闪。 It has a very capable sound API and is supported in all the newest desktop browsers (as well as the older ones). 它具有非常强大的声音API,并且在所有最新的台式机浏览器(以及旧版本的浏览器)中都受支持。

This bloke , who appears to post quite frequently on HTML5 audio, has worked around the lack of support for the web audio API by pre-processing his audio data and saving it as JavaScript. 这个家伙似乎经常在HTML5音频上发布消息,他通过预处理音频数据并将其保存为JavaScript来解决对Web音频API缺乏支持的问题。 Depending on your requirements, this may be an option. 根据您的要求,这可能是一个选择。

No, as of now it does not look possible for all browsers. 否,截至目前,并非所有浏览器都可行。 I recommend dancer.js for your requirement. 我建议您根据舞者.js。 Check out the demo at http://jsantell.github.com/dancer.js/# http://jsantell.github.com/dancer.js/#上查看演示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM