HTML5音频/视频停止缓冲区 [英] HTML5 audio/video stop buffer
问题描述
有没有办法在浏览器中停止缓冲。
Is there a way to stop buffering in the browsers.
我有一个指向某个mp3文件的音频标签。
I have an audio tag which is pointing to some mp3 file.
浏览器在播放时开始缓冲音频。
Browsers starts buffering the audio while it is playing.
我可以停止缓冲吗?
我理想情况下,如果你的音频数据速度快,那么客户端可以玩,为什么不缓冲它。
I know ideally if you have audio data coming in faster then what the client can play why not buffer it.
我要问的是音频播放器应该只缓冲最小量并要求更多数据。
What I am asking is audio player should only buffer the min amount and ask for more data.
我知道这是一个获取请求所以它不是一个真正的协议来询问更多。所以只需消耗一大块,玩它并消耗更多。
I know it is a get request so it is not really a protocol to ask more. So just consume a chunk, play it and consume more.
任何想法。也许206并寻求功能来要求更多。
Any ideas. Maybe 206 and seeking functionality to request more.
谢谢
推荐答案
尝试将此选项放入您的标记中:
Try to put this option in your tag:
<audio preload='none'>
此选项可避免预缓冲,因此它可以解决您的问题
This option avoids pre-buffering, so it should solve your problem
这篇关于HTML5音频/视频停止缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!