Firefox <audio> keeps downloading data

I use an tag to stream an Icecast radio. When I activate it, the bandwidth usage goes to around 200kbps. If I pause it it stays the same (that's understandable), but if I destroy the element, it also stays the same. Actually if I remake the audio tag the bandwidth usage multiplies like around 400kbps, and so on. It seems the stream downloading doesn't stop even if the element is not in the DOM. Any ideas? This is on Firefox.

Edit: The audio tags have preload="metadata".

Edit: The same seems to happen with preload="none"

Edit: It also happens in Chrome.

1 answer

  • answered 2019-06-25 07:25 madprops

    Apparently the stream is not killed by removing the element. The media element must be paused and the src must be changed to an empty string to stop the streaming.

    MDN documentation