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.
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:
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.
You can also disable an audio tag if you add style="pointer-events:none" to it…
The HTML <audio> element is used to play an audio file on a web page.
The <audio> tag is used to embed sound content in a document, such as music or other audio streams. The <audio> tag contains one or more <source> tags with different audio sources. The browser will choose the first source it supports.
The <bgsound> HTML element is deprecated. It sets up a sound file to play in the background while the page is used; use <audio> instead. Warning: Do not use this!
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.
There are several ways to stop and prevent buffering on your network, such as upgrading your router, reducing background processes, and removing malware from your system. This wikiHow teaches you how to reduce buffering during streaming video.
Reducing the quality of videos helps decrease bandwidth and instances of buffering. If using third-party software or services to stream videos, modify video quality via the settings menu. You should also avoid streaming video at faster speed (i.e. 1.25x speed).
Right-click your default playback device and click Properties. Click Enhancement, check the Disable all sound effects option. Click Apply and OK to save the operations. 2. Change Audio Format
The <audio>
element includes a preload
attribute. This can be set to "none" or "metadata" which should prevent the audio preloading.
Source: https://developer.mozilla.org/en/docs/Web/HTML/Element/audio
I found a workable solution for the problem described above. A detail description can be found here: https://stackoverflow.com/a/13302599/1580615
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With