getRemotePeerById method
Returns the Remote Peer if present in room. @param peerId - PeerId of the remote peer @returns - RemotePeer Instance @throws { Error } If the Remote Peer is not found
Implementation
RemotePeer getRemotePeerById(String peerId) {
final peer = remotePeers[peerId];
if (peer == null) {
throw Exception('Remote Peer Not Found, peerId: $peerId');
}
return peer;
}