javascript 音频方法的文档? [英] Documentation for javascript audio methods?

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

问题描述

我搜索并发现了许多文章,这些文章讨论了您可以在 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() 这样的方法.我在各处的代码示例中都看到了这些方法,但我无法找到适合我生活的详尽列表.

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

https://developer.apple.com/documentation/webkitjs/htmlmediaelement

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆