javascript 音频方法的文档?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4589451/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 13:06:40  来源:igfitidea点击:

Documentation for javascript audio methods?

javascripthtmlaudiomethods

提问by Bryan Downing

I've searched and found many articles that discuss the common methods you can use in javascript to control HTML audio elements. However, I have not been able to find anywhere that lists all of the methods available.

我搜索并找到了许多讨论可以在 javascript 中使用的常用方法来控制 HTML 音频元素的文章。但是,我找不到任何列出所有可用方法的地方。

I should make it clear that I'm not looking for HTML audio attributes. I'm looking for methods like audio.play()and audio.pause(). I've seen these methods used in code samples all over the place, but I can't find an exhaustive list for the life of me.

我应该明确指出我不是在寻找 HTML 音频属性。我正在寻找像audio.play()和这样的方法audio.pause()。我在各处的代码示例中都看到了这些方法,但我找不到适合我一生的详尽清单。

回答by calvinf

For Mozilla Firefox's implementation (Gecko), see the following in the Mozilla Development Center:

有关 Mozilla Firefox 的实现 (Gecko),请参阅 Mozilla 开发中心中的以下内容:

For Internet Explorer 9 (currently beta), see the following at MSDN:

对于 Internet Explorer 9(当前为测试版),请参阅 MSDN 上的以下内容: