How to stop downloading audio file to browser in HTML5 audio tag controls when pause is pressed?
“disable download audio html5” Code Answer's Just add controlsList="nodownload" in your video tag.
The pause() method halts (pauses) the currently playing audio.
The HTML <audio> element is used to play an audio file on a web page.
This will work:
var audio = $("audio").get(0);
audio.pause(0);
var tmp = audio.src;
audio.src = "";
audio.load();
$("audio").remove();
$("#audio-player").html("<audio controls preload='none'></audio>");
audio = $("audio").get(0);
audio.src = tmp;
audio.addEventListener('pause', current-function);
Here is a link for you to follow : HTML5 Video: Force abort of buffering
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