im developing an electron app, which needs to play a sound in case of incoming message from webSocket connection. The websocket is handled on the main process, as the user switches pages during usage. I can not play the sound from the renderer, as i don't know in which page the user is at the moment, the webSocket message comes in (in worst case he is in between to pages while navigating).
Is there chance to play back audio on main process? The audio file is stored locally within the project file structure.
Kind regards,
BoxSon
Found a workaround to solve this by my own:
Little bit of effort but works like a charm.
Don't forget to destroy the hidden window on application closure (application won't close if you forget this step).