JavaScript的音频的未来

JavaScript的音频的未来

本文介绍了JavaScript的音频的未来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我教孩子们如何将音频添加到他们的JavaScript游戏和网页。我知道HTML5的音频API和我刚才了解各地的各种浏览器的问题(IE出奇不支持WAV可言,等等)。

I'm teaching kids how to add audio to their JavaScript games and webpages. I knew about the HTML5 Audio API and am just now learning about the issues around the various browsers (IE surprisingly doesn't support WAV at all, etc).

不过,显然有一个新的我不知道。 Chrome浏览器完全支持它。 Mozilla的和Firefox:

However, apparently there's a new Web Audio standard I was unaware of. Chrome fully supports it. Mozilla states the following about Web Audio and Firefox:

火狐目前支持的不兼容,具体Mozilla的音频
  数据API,但是它被标记为有利于的W3Cpcated德$ P $
  标准。工作已经开始支持新的网络音频API中
  Firefox浏览器。

caniuse.com报告下列有关网络音频API 支持。

caniuse.com reports the following about support for Web Audio API.

我不介意迫使孩子使用谷歌Chrome浏览器的发展和健全的许多其他浏览器无法正常工作。不过,我不希望被教他们的东西,会不会在未来的其他浏览器。

I don't mind at all forcing the kids to use Google Chrome for development and sound not working in many other browsers. However, I don't want to be teaching them something that will not be in other browsers in the future.

我也阅读有关可能的替代网络音频称为MediaStreaming ...这是我应该教的未来?

I'm also reading about a possible alternative to Web Audio called MediaStreaming... Which is the future that I should be teaching?

推荐答案

如果你需要做的是播放音频文件,我会强烈建议使用howler.js。它没有一吨的功能,但它是非常可靠的,并在浏览器上运行良好。

If all you need to do is play audio files, I would strongly recommend using howler.js. It doesn't have a ton of features, but it is very reliable, and works well across browsers.

网络音频API,绝对是网络上的音频的未来,但它可以是pretty复杂,特别是如果你想教给孩子们。

The Web Audio API is definitely 'the future' of audio on the web, but it can be pretty complicated, especially if you're trying to teach it to children.

这篇关于JavaScript的音频的未来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!