Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communicating between two renderer processes #17

Closed
zxc23 opened this issue Jul 18, 2019 · 3 comments
Closed

Communicating between two renderer processes #17

zxc23 opened this issue Jul 18, 2019 · 3 comments

Comments

@zxc23
Copy link

zxc23 commented Jul 18, 2019

What is the recommended solution for communicating between two renderer processes? Should the main process be in the middle to coordinate it?

@zxc23
Copy link
Author

zxc23 commented Jul 19, 2019

Well I'm using the main process as the go-between (I've read that there is no way around this) and it looks a bit like this:

  ipcMain.answerRenderer('get_microphone_device', () => {
    return ipcMain.callRenderer(mainWindow, 'get_microphone_device');
  });

Closing the issue as this seems to work fine.

@zxc23 zxc23 closed this as completed Jul 19, 2019
@johanneslumpe
Copy link

You could consider leveraging the Broadcast Channel API, which will allow you to communicate directly between Chrome windows.

@aperkaz
Copy link

aperkaz commented Apr 11, 2021

@johanneslumpe thanks, great advise!
It works like a charm 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants