guys I am having a problem in which I am trying to create a project that is working on peer to peer connection, When I have a connection between two peers and I addStream, I can hear the audio and stuff that is okay, But when I want to remove the stream it basically removes the whole peer and The connection is dead so they are not communicating anymore but what I want is to only remove the audioStream not the whole communication. So when I add the stream again it will just add the audio stream.
video.pause();
video.removeAttribute('src'); // empty source
jquery(video).remove();
peer.removeStream(mediaStream);