Run new independent procces in renderer


#1

How I can run a sound player as independent thread but show the player in m index.html thats is loaded in mainWindow?


#2

You can use a webview. Webviews behave like frames in html, so you can load your player with it’s own renderer process but still display it in your main window.


#3

thanks for the help :slight_smile:


#4

It is my pleasure. You can find the documentation to the webview tag here. And one important thing you need to keep in mind is that, the console logs from the webview’s renderer process won’t be visible in the dev tools console from the main window. As this will display the webview’s parent console logs instead. So the best is to subscribe to the console-message event. That way every console log from the webview will be printed in the dev tool console.
Cheers.