Pass Mediastream from One Window to Another


#1

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.


#2

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


#3

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


#4

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.


#5

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?


#6

Have a look at RTCPeerConnection. This helped me: https://www.html5rocks.com/en/tutorials/webrtc/basics/ Note that you do not need relay or STUN servers—You can use IPC to exchange ice candidates and set descriptions.


#7

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