问题描述
我已经搜查,发现了很多文章,讨论您可以在JavaScript中使用,以控制HTML音频元素的常用方法。不过,我一直没能找到任何地方,列出了所有的可用方法。
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.
我要清楚,我不是在寻找HTML音频属性。我正在寻找像 audio.play方法()
和 audio.pause()
。我见过code样品中所有的地方使用这些方法,但我无法找到我的生活的详尽清单。
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.
推荐答案
您正在寻找的东西更通用:HTMLMediaElement,这里有一些参考指南:
You're looking for something more generic: HTMLMediaElement, here are some reference guides:
https://developer.mozilla.org/en/DOM/HTMLMediaElement
http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#audio
http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLMediaElementClassReference/HTMLMediaElement/HTMLMediaElement.html#//apple_ref/javascript/cl/HTMLMediaElement
这篇关于文档JavaScript的音频的方法呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!