HTML5 audio/video stop buffer

我的梦境 提交于 2019-12-22 13:45:15

问题


Is there a way to stop buffering in the browsers.

I have an audio tag which is pointing to some mp3 file.

Browsers starts buffering the audio while it is playing.

Can I stop the buffering ?

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.

Any ideas. Maybe 206 and seeking functionality to request more.

Thanks


回答1:


Try to put this option in your tag:

<audio preload='none'>

This option avoids pre-buffering, so it should solve your problem



来源:https://stackoverflow.com/questions/11804631/html5-audio-video-stop-buffer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!