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

[Feature Request]: Support injecting external input events to BrowserWindow #33427

Closed
3 tasks done
chenzx opened this issue Mar 24, 2022 · 4 comments
Closed
3 tasks done

Comments

@chenzx
Copy link

chenzx commented Mar 24, 2022

Preflight Checklist

Problem Description

I'm using Electron for the scene below: "cloud rendering"

Run a electron instance for a WebGL page, and inject a WebRTC client into the page, then the WebGL rendering result can be lively encoded to video stream, and streaming to a client chrome page.

However, i need to let client's user input events to be remote sent back to server-side electron window instance, but i found Electron's BrowserWindow doesn't provide such api.

Proposed Solution

Add user input events inject api to Browser, such as BrowserWindow.sendInputEvent( event ); to support pass in raw touch{begin/move/end} or mouse{down/move/up} events...

Alternatives Considered

If no such convenient apis, i had to use OS-specific way to do this, which is under investigation now...

Additional Information

No response

@DanielMcAssey
Copy link

Can't you use IPC for this?

@chenzx
Copy link
Author

chenzx commented Mar 24, 2022

IPC should be possible, since input events in chromium is sent by IPC, but it's usually sent from browser main window to renderer process, not from external to browser window?

@Prinzhorn
Copy link
Contributor

@chenzx
Copy link
Author

chenzx commented Mar 24, 2022

I didn't notice it, i'll have a try. thanks!

@chenzx chenzx closed this as completed Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants