Exemplo n.º 1
0
 public void OnIceCandidate(IceCandidate candidate)
 {
     outerInstance.RunOnUiThread(() =>
     {
         JSONObject json = new JSONObject();
         jsonPut(json, "type", "candidate");
         jsonPut(json, "label", candidate.SdpMLineIndex);
         jsonPut(json, "id", candidate.SdpMid);
         jsonPut(json, "candidate", candidate.Sdp);
         outerInstance.sendMessage(json);
     });
 }
Exemplo n.º 2
0
 public void OnCreateSuccess(SessionDescription origSdp)
 {
     outerInstance.RunOnUiThread(() =>
     {
         outerInstance.logAndToast("Sending " + origSdp.Type);
         SessionDescription sdp = new SessionDescription(origSdp.Type, outerInstance.preferISAC(origSdp.Description));
         JSONObject json        = new JSONObject();
         jsonPut(json, "type", sdp.Type.CanonicalForm());
         jsonPut(json, "sdp", sdp.Description);
         outerInstance.sendMessage(json);
         outerInstance.pc.SetLocalDescription(outerInstance.sdpObserver, sdp);
     });
 }