public void OnIceCandidate(ReceivingPeer peer, RTCIceCandidate iceCandidate)
 {
     _connection.SendIceCandidate(new IceCandidateArgs
     {
         ConnectionId = peer.ConnectionId,
         CandidateDto = new RtcIceCandidateDto
         {
             Candidate        = iceCandidate.candidate,
             SdpMid           = iceCandidate.sdpMid,
             SdpMLineIndex    = iceCandidate.sdpMLineIndex,
             UsernameFragment = iceCandidate.usernameFragment
         }
     });
 }
Example #2
0
 public void OnGenerateCandidate(IceCandidate iceCandidate)
 {
     Console.WriteLine($"{nameof(OnGenerateCandidate)}: {iceCandidate.Sdp}");
     virtualStudioConnection.SendIceCandidate(new IceCandidateArgs
     {
         ConnectionId = connectionId,
         CandidateDto = new RtcIceCandidateDto
         {
             Candidate     = iceCandidate.Sdp,
             SdpMid        = iceCandidate.SdpMid,
             SdpMLineIndex = iceCandidate.SdpMLineIndex
         }
     });
 }