Use HTMl5
<audio src="audio.mp3" preload="auto" controls autoplay loop></audio>
The preload attribute is used in the audio element for buffering large files. It can take one of 3 values:
"none" does not buffer the file
"auto" buffers the media file
"metadata" buffers only the metadata for the file