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

Sharing a MediaStreamTrack via getGlobal not working #183

Open
sbeatz opened this issue Feb 29, 2024 · 0 comments
Open

Sharing a MediaStreamTrack via getGlobal not working #183

sbeatz opened this issue Feb 29, 2024 · 0 comments

Comments

@sbeatz
Copy link

sbeatz commented Feb 29, 2024

we try to share a MediaStreamTrack across windows using remote.getGlobal

remote.getGlobal('shared').videoStream = desktopstream.getVideoTracks()[0];

in main.js its also still recognized as a MediaStreamTrack
but when we get it in the 2nd window via

let videoTrack = remote.getGlobal('shared').videoStream;
it is a simple object only and no longer a MediaStreamTrack

in 1st windows console we get

callbacks-registry.js:54 Uncaught TypeError: Illegal invocation
    at CallbacksRegistry.apply (callbacks-registry.js:54:1)
    at remote.js:353:1
    at EventEmitter.<anonymous> (remote.js:335:1)
    at EventEmitter.emit (node:events:513:28)
    at Object.onMessage (node:electron/js2c/renderer_init:2:9240) 

as soon as we get the track in 2nd window

isn't it possible to share the MEdiaStreamTrack via remote.getGlobal?

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

1 participant