HTML5 audio tag stops playing and downloading

How to stop downloading an audio file to the browser in HTML5 audio tag elements when pause is pressed?

+6
source share
1 answer

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 the link for you: HTML5 video: forced buffering interrupt

0
source

Source: https://habr.com/ru/post/981347/


All Articles