[jitsi-dev] Attach a "Remote" Stream to the jitsi-meet WebRTC peer


#1

Hi,

When you connect to the jitsi-meet service at https://meet.jit.si/, the JS
application opens the camera to get a LOCAL media stream and adds it to the
WebRTC Peer connection.

Ok.

Now what I want is to attach a different stream to the above peer
connection, which comes from another peer. In terms of code, I want to do
something like this:

var MediaStream = window.webkitMediaStream || window.MediaStream;

myPeer.onaddstream = function(remoteStream) {
      remoteStream = new MediaStream(remoteStream.audioTracks,
remoteStream.videoTracks);
      JitsiPeer.addStream(remoteStream); /* attaching remote stream */
};

Do you have any idea how to do this in the cleanest way? I prefer not to
modify any code coming from jitsi-meet, if possible, so that I could use
the jitsi meet internet service and override the default behaviour.