function removeLocalStream() {
    if (localStream) {
        const tracks = localStream.getTracks();

        tracks.forEach(function (track) {
            track.stop()
        })

        localVideo.srcObject = null
    }

    for (let socket_id in peers) {
        removePeer(socket_id)
    }
}
/**
 * Disables and removes the local stream and all the connections to other peers.
 */
Disables and removes the local stream and all the connections to other peers.
Disables and removes the local stream and all the connections to other peers .
function removeLocalStream() {
    if (localStream) {
        const tracks = localStream.getTracks();
        tracks.forEach(function (track) {
            track.stop()
        })
        localVideo.srcObject = null
    }
    for (let socket_id in peers) {
        removePeer(socket_id)
    }
}
function removeLocalStream ( ) { if ( localStream ) { const tracks = localStream . getTracks ( ) ; tracks . forEach ( function ( track ) { track . stop ( ) } ) localVideo . srcObject = null } for ( let socket_id in peers ) { removePeer ( socket_id ) } }
Disables and removes the local stream and all the connections to other peers.
Disables and removes the local stream and all the connections to other peers .