http - <audio> 元素无论如何都会自动缓冲

标签 http audio html

我正在尝试使用在 Firefox 3.5 和 Chrome 中实现的 HTML5 音频元素制作一个基于网络的媒体播放器。读书Mozillas documentation , 省略 autobuffer 属性应该会导致不请求音频 src:

if specified, the audio will automatically begin being downloaded, even if not set to automatically play. This continues until the media cache is full, or the entire audio file has been downloaded, whichever comes first

但是,在服务器端,我注意到无论如何都在请求文件。我的示例页面非常简单:

<html>
    <body>
        <audio src="1.ogg"></audio>
        <audio src="2.ogg"></audio>
    </body>
</html>

最佳答案

autobuffer 属性 has been replaced with preload它接受值 nonemetadataauto

已经为 WebKit 提交了补丁(issue #35385;不幸的是我无法链接到它),但它似乎还没有进入 Safari 4.0.5。

关于http - <audio> 元素无论如何都会自动缓冲,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1495146/

相关文章:

http - 是否有解密 http 用户代理字符串的良好引用指南?

android - RingtoneManager 显示电话铃声而不是通知声音

c# - 在 C# 中嵌入声音

html - 无法设置表单提交按钮的样式

javascript - 通过模式框显示的复选框

http - 使用 API 和访问 token 的 Gmail 搜索

html - 检测 HTML 中的字符编码

android - Android 和 iOS 有哪些共同的音频格式编码器?

php - 根据条件从表中在 UI 上回显图像

http - HTTP 文件上传如何工作?