Open azmathmoosa opened 7 years ago
There are two ways to interact with an audio track. Either by using the AudioTrack
component or by means of the provider. In both cases, if you call stop()
it should unload the current audio. Is that not happening?
It continues to download the old track for some time.
In the image, track 1 is being played but on switching to 11, it continues to download 1 for about 20-30 seconds. Same for track 11 to 27. But notice 27 to 28, if the track is switched before it loads (green region represents waiting time), then it doesn't cancel the old request! It downloads and plays both tracks. I hear both tracks being played but I can only control the last one!
Thanks for your time 👍
Hi @azmathmoosa Thanks for the detailed report. I assume you are testing on the browser with the default HTML Audio. I am afraid that is the way HTML Audio works. I am not sure there is a way to cancel download completely, or is there one?
Hi, thanks for the great work.
I am a noob to the whole angular/npm ecosystem so go easy on me. I have a single audio player that will be playing only one track at a time. When a user selects a different url, I then change the url of the audio component and it works.
The problem is, I can see in my chrome dev tools that the old track is still being downloaded in the background even though it is no longer needed!. This is hogging my BW and I would like to fix it. I think I am using this wrong but please guide me.
This is my code when the track is changed:
`