I've been having a very serious problem with my system. It turns out that I have a jquery script that simply, after a query in the database, plays an audio in the browser.
$('body').append('<embed src="audio/found.mp3" hidden="true" autostart="true" type="audio/mp3">');
It turns out that if the tab is not focused on the browser, ie if I do not have the site tab open, or are in another program, the audio does not play, and I need it to play ALWAYS, NO EXCESSIONS . The site already has HTTPS (which I thought was a limiter of this function), but even then it will not. Is there any library to help me with this? What guarantees that the audio will always be played?
Thank you in advance.