0
I have an audio player on the page, and reload the source through javascript. But every time I upload a new audio, the old one keeps loading, although it is no longer playing. And this is disrupting the performance of my application. It’s as if the old audio just went mute.
Look at the image below, my problem. Each "stream.mp3" is a different audio source, which was "switched" to the later after an action. note that the previous ones although not reproducing, continue to load.
My question is there is a way to "destroy" this, reset before loading a new audio source?
Where is the javascript code?
– Renan Gomes
You have tried removing the DOM element and re-inserting with the new link?
– Sergio
Here is the code, summarizing I remove the existing element, create a new one and upload the audio. Every time so, but the previous one persists by pressing background. http://prntscr.com/7gypct
– Fabio Weydson
Can you create a jsFIddle or some example that we can test? so we can also see devtools and test.
– Sergio
I’ll put, I’m simplifying the code for such.
– Fabio Weydson