Esempio n. 1
0
 void Call()
 {
     if (_call != null)
     {
         _call.Connected    -= CallOnConnected;
         _call.Disconnected -= CallOnDisconnected;
         _call.Hangup();
         _call = null;
     }
     _call = _client.Call("stream", new CallSettings
     {
         VideoCodec = VideoCodec.H264,
         VideoFlags = new VideoFlags
         {
             ReceiveVideo = false,
             SendVideo    = true,
         }
     });
     if (_call == null)
     {
         return;
     }
     _call.SetVideoSource(Camera.current, 640, 640 * Screen.height / Screen.width);
     _call.Connected    += CallOnConnected;
     _call.Disconnected += CallOnDisconnected;
     _call.Start();
 }