我正在尝试使用在 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
它接受值 none
、metadata
和 auto
。
已经为 WebKit 提交了补丁(issue #35385;不幸的是我无法链接到它),但它似乎还没有进入 Safari 4.0.5。
关于http - <audio> 元素无论如何都会自动缓冲,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1495146/