示例#1
0
 public static PeerConnectionState ToNet(this PeerConnection.PeerConnectionState self)
 {
     if (self == PeerConnection.PeerConnectionState.Closed)
     {
         return(PeerConnectionState.Closed);
     }
     if (self == PeerConnection.PeerConnectionState.Connected)
     {
         return(PeerConnectionState.Connected);
     }
     if (self == PeerConnection.PeerConnectionState.Connecting)
     {
         return(PeerConnectionState.Connecting);
     }
     if (self == PeerConnection.PeerConnectionState.Disconnected)
     {
         return(PeerConnectionState.Disconnected);
     }
     if (self == PeerConnection.PeerConnectionState.Failed)
     {
         return(PeerConnectionState.Failed);
     }
     if (self == PeerConnection.PeerConnectionState.New)
     {
         return(PeerConnectionState.New);
     }
     throw new ArgumentOutOfRangeException(nameof(self), self, null);
 }
示例#2
0
 public void OnConnectionChange(PeerConnection.PeerConnectionState newState)
 {
 }
 public void OnConnectionChange(PeerConnection.PeerConnectionState newState)
 {
     _listener?.OnConnectionChange(newState.ToNet());
 }