在< audio>中停止音频缓冲标签 [英] Stop audio buffering in the <audio> tag

查看:84
本文介绍了在< audio>中停止音频缓冲标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用HTML5音频播放器通过(移动)浏览器提供音频流(24/7广播流).在流中加载并播放它可以正常工作.

I am currently working in using the HTML5 audio player to provide a audio stream (24/7 radio stream) via the (mobile) browser. Loading in the stream and playing it works fine.

主要问题是HTML5 < audio> 标记即使不处于活动状态也将继续下载(缓冲)内容.对于移动用户而言,这可能是一个主要问题,因为他们中的大多数人为数据使用付费.到目前为止,我还没有找到一个可以在整个浏览器上正常运行的体面解决方案来防止这种情况发生.

The major problem is that the HTML5 <audio> tag will keep downloading (buffering) content even when its not active. This could be a major issue for mobile users since most of them pay for data use. So far I have not been able to find a decent solutions that works cross browser to prevent this.

我到目前为止尝试过:

I tried so far:

  1. 按暂停键时,卸载源.<这不适用于跨浏览器
  2. 删除音频播放器元素并加载一个新的元素.这有效,但老实说,这是一种非常极端的表演方式简单的任务.

我只是想知道在整个问题上是否存在一些我忽略的事情,因为我坚信我不是这个问题的唯一参与者.

I was simply wondering if there is something I'm overlooking in this whole issue since I am convinced I'm not the only one with this issue.

推荐答案

我找到了解决上述问题的可行解决方案.可以在此处找到详细说明: https://stackoverflow.com/a/13302599/1580615

I found a workable solution for the problem described above. A detail description can be found here: https://stackoverflow.com/a/13302599/1580615

这篇关于在&lt; audio&gt;中停止音频缓冲标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆