Check out example codes for "background music html autoplay hidden". It will help you in understanding the concepts better.
Code Example 1
audio { display:none;}
Code Example 2
<audio autoplay="true" src="https://upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg">
Learn ReactJs, React Native from akashmittal.com