The close() method of the RTCPeerConnection interface closes the current peer connection.
close()
MDN Reference