I am creating a piano in a browser using javascript. In order for me to play the same key several times at the same time, instead of just playing the Audio object, I cloned it and played the clone, otherwise I would have to wait for the sound to finish or restart it, you want.
I did something like this:
var audioSrc = new Audio('path/'); window.onkeypress = function(event) { var currentAudioSrc = audioSrc.cloneNode(); currentAudioSrc.play(); }
The problem is that I checked the chrome inspector, and I noticed that every time I clone an object, the browser loads it again

I checked some people who wanted to achieve such things, and noticed that most of them have the same problems as me, they reload the file. The only example I found that can play the same sound source several times at the same time is SoundJs http://www.createjs.com/SoundJS
I tried to check the source, but could not understand how it was done. Any idea?
source share