I'm creating a piano project and playing the notes through New Audio. So far so good, the problem is that in every 20 second pause I apparently give when I click on the key again, the audio is inserted back into cache. How can I check if the audio I'm trying to insert is already cached?
example:
var url = 'audio.mp4';
var audio_ = new Audio(url);
onclick = function(){
//It is added back into cache (visible on the inspector's network)
var newAU_ = new Audio(url);
newAU_.play();
}
var url = 'http://www.mairovergara.com/wp-content/uploads/2015/11/3-Loose-tarantula-prompts-Delta-to-call-off-flight.mp3?_=3';
var audio_ = new Audio(url);
onclick = function(){
//It is added back into cache (visible on the inspector's network)
var newAU_ = new Audio(url);
newAU_.play();
// Check the inspector's network, reload code snippet balow or wait a few moments and click on the window again and see that the audio is inserted again
}