首页 \ 问答 \ HTML5音频参考(HTML5 audio reference)

HTML5音频参考(HTML5 audio reference)

HTML5对音频和视频播放和控制有很好的支持。 官方HTML5参考: http//www.w3.org/TR/html5/

我在一些网页中看到音频对象具有play()和pause()函数,也称为“currentTime”的属性等等。

然而,“play”,“pause”和“currentTime”甚至没有在官方的HTML5参考文献中记录。 我在哪里可以找到HTML5音频的完整参考?

最好的问候,大卫


HTML5 has a good support for audio and video playback and control. The official HTML5 reference: http://www.w3.org/TR/html5/

I've seen in some web pages that the audio object has the play() and pause() functions, also an attribute called "currentTime", and many more things.

However, "play", "pause" and "currentTime" is not even documented in the official HTML5 reference. Where can I find a full reference of HTML5 audio?

Best regards, David

更新时间:2022-11-11 12:11

最满意答案

play(),pause()等来自HTMLMediaElement接口,这里记录: http : //www.w3.org/TR/html5/video.html#htmlmediaelement


play(), pause() etc come from HTMLMediaElement interface, documented here: http://www.w3.org/TR/html5/video.html#htmlmediaelement

相关问答

更多
  • Firefox不支持MP3。 它不会显示回退消息,因为它支持音频标签。 https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements#MPEG_H.264_(AAC_or_MP3) Firefox doesn't support MP3. It won't show the fallback message because it supports the audio tag. https:// ...
  • 网络摄像头和麦克风支持不是HTML 5规范的特色 新的API 除了指定标记之外,HTML5还指定脚本应用程序编程接口(API)。 现有的文档对象模型(DOM)接口被扩展并记录了事实上的功能。 还有新的API,例如: 立即模式的画布元素 2D绘图定时媒体播放 离线存储数据库(离线网站 应用程序)文件编辑 拖放交叉文档 消息(web消息)浏览器 历史管理MIME类型和 协议处理器注册。 微观数据 一些新功能是HTML5的一部分,主要是因为没有志愿者将HTML5拆分并保留这些功能的单独规范。 Webcam and ...
  • 目前在我看来这是不可能的(如果它应该是html5并且由IE和Firefox支持),请参阅支持带有音频API支持的音频API 浏览器的浏览器列表。 但是这些信息可能已经过时了。(这些浏览器更新频繁) 您可以等待,首先只提供Chrome并希望其他浏览器赶上(IE可能是个问题)。 或者你使用Java(如果你不喜欢flash)。 另一种技术是Silverlight,但它已经“死了”,所以我不推荐它。 我希望我的输入有所帮助。 At the moment in my opinion it is not possibl ...
  • 这里有一个处理ended事件的HTML5播放列表示例,如果有帮助的话? 在你的事件处理程序中引用this ,但在这个上下文中, this指的是捕获事件的DOM元素,即你的audio元素..试试这个: function myPlaylist(){ var self = this; var player = document.createElement('audio'); this.next = function (){ // Picks next song in t ...
  • 如果你只是要下载文件,你不需要
  • 在你的线上: $('.audio').prop(volume, 0.1); 您将volume作为变量传递,而不是字符串。 你没有一个名为volume的变量,这就是为什么你收到关于它没有被定义的错误。 尝试将其更改为: $('.audio').prop("volume", 0.1); In your line: $('.audio').prop(volume, 0.1); You are passing volume as a variable not as a string. You do not h ...
  • 不会喜欢这个答案,但Chromecast根本不支持自签名证书。 它构建在Chromium安全模型中。 如果您可以将证书装载到证书商店中,它就可以工作(Android和Fire平板电脑和电视可以做到这一点),但这可能会有所帮助,但Chromecast(和FireStick)无法做到这一点。 Not gonna like this answer, but Chromecast simply won't support self-signed certs. It is built into the Chromiu ...
  • 这是我如何做到的 - 你可以在http://labs.dinahmoe.com/dynamicmusicengine/上看到它。只需将liveSource连接到这个JavaScriptNode(还有context.createScriptProcessor(4096,1,1)这是新的语法,虽然两者都将得到支持,根据http://www.w3.org/2011/audio/wiki/F2F_Mar_2013 ) var levelChecker = context.createJavaScriptNode(4 ...
  • 在Firefox中,它是可能的,但据我所知它还没有标准化(Chrome也可能支持它): https://wiki.mozilla.org/Audio_Data_API Webkit API提案: https : //dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html 以及一些相关的文章/演示: http://ajaxian.com/by/topic/sound http://ajaxian.com/archives/amazing-au ...
  • play(),pause()等来自HTMLMediaElement接口,这里记录: http : //www.w3.org/TR/html5/video.html#htmlmediaelement play(), pause() etc come from HTMLMediaElement interface, documented here: http://www.w3.org/TR/html5/video.html#htmlmediaelement

相关文章

更多

最新问答

更多
  • 在javascript中创建类以创建对象并在Java中创建类和对象之间的区别(Difference between creating a class in javascript to create an object and creating an class and object in Java)
  • Facebook API:将身份验证详细信息从Javascript SDK发送到PHP SDK(Facebook API: Send authentication detail from Javascript SDK to PHP SDK)
  • 如何停止队列动画jquery?(How can I stop queue animation jquery?)
  • 使用C#的井字游戏中的人工智能(Artificial Intelligence in Tic-Tac-Toe using C#)
  • 多少流量可以共享虚拟主机(对于Python Django站点)支持?(How Much Traffic Can Shared Web Hosting (for a Python Django site) support?)
  • 带有CIFilters的CAShapeLayer(CAShapeLayer with CIFilters)
  • 如何在Angular 2中读取JSON #text(How to read in Angular 2 the JSON #text)
  • 如何在xml中读取自闭标签的属性?(How to read self closing tag's attribute in xml?)
  • 无法使用http put将图像上传到亚马逊S3(Cannot upload image to amazon s3 using http put)
  • 文件结束无限循环(end of file infinite while-loop)
  • 在cpp的模板(template in cpp)
  • 在构建库时,clang和clang ++有什么区别?(What's the difference between clang and clang++ when building a library?)
  • ng类中的表达式(expression inside ng-class)
  • 在PHP中获取随机布尔值true / false(Get random boolean true/false in PHP)
  • 管道的高效分块用于严格的字节串(Efficient chunking of conduit for strict bytestring)
  • Python ternary_operator(如果其他标志做了其他操作,则执行其他操作)(Python ternary_operator (do-somthing if flag else do-another))
  • Sencha Touch面具发布(Sencha Touch mask ondisclosure)
  • 验证脚本上的通知[重复](Notices on validation script [duplicate])
  • 朋友功能(friend function)
  • 基于角坐标平移和变换平面几何(Translate and transform plane geometry based on corner coordinates)
  • Rails:'如果在本地运行'条件javascript标记包括(Rails: 'if running locally' conditional javascript tag include)
  • 解压文件(Unzipping files)
  • 使用ui-router以角度加载变量状态(loading in variable states with ui-router in angular)
  • 创建Azure云服务需要多长时间?(how long does it take to create an Azure Cloud Service? How to view log information?)
  • 指向整数的指针数组(Array of pointers to integers)
  • Laravel服务提供商没有看到我的包的主要类(Laravel service provider does not see the main class of my package)
  • 这个关于VSS / RSS / PSS / USS的解释是否准确?(Is this explanation about VSS/RSS/PSS/USS accurate?)
  • 在Django-Admin中通过row-id排序显示项目(Ordering the display items by row-id in Django-Admin)
  • 如何使用cythonize启用`--embed`?(How to enable `--embed` with cythonize?)
  • 用于将文本多行设置的Excel脚本(Excel script for ereasing text multiple rows)