We have developed a webchat app that notifies the user if the message was received with firebase notification library, but we are totaly unable to play any sound when the notification arrives, that aparently is happenning due to a chrome performance algorithm
But we notice whatsapp webapp is able to do that, so, does anyone knows how to play a short notification audio when chrome tab is not focused?
Use a JavaScript Webworker https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
Basically a Webworker is like a Backgroundtask. So your Tab doesn‘t need to focused to play the sound. Maybe that helps