Added additional logic to webrtc library