Pass Mediastream from One Window to Another


Is there a way to pass a MediaStream from one window to a second to render it on a canvas there? Unfortunately, IPC only supports serialised messages and does not preserve MediaStreams or ObjectUrls.


I’m having exactly the same problem: how to pass a media stream between windows? Is it possible?


Same here. All messaging methods will filter that kind of objects. I’m open for solutions.


I solved the problem by using a local WebRTC connection to pass the mediastream. Works fine and moves video from one window into the next.


I had this idea, too though completely unknown to WebRTC at all. Do you have sample code or can you say, which RTC parts you’ve used for that?


Have a look at RTCPeerConnection. This helped me: Note that you do not need relay or STUN servers—You can use IPC to exchange ice candidates and set descriptions.


Thanks a lot. Got it working for me as well.