private void call_btn_Click(object sender, EventArgs e) { callService = m_User.CallService; call = callService.CreateCall(); call.RemoteAddress = number_txt.Text; AppCallDelegate callDelegate = new AppCallDelegate(); call.Started += new EventHandler(callDelegate.call_Started); call.RemoteAlerting += new EventHandler <RemoteAlertingEventArgs>(callDelegate.call_RemoteAlerting); call.Established += new EventHandler(callDelegate.call_Established); call.Ended += new EventHandler <CallEndedEventArgs>(callDelegate.call_Ended); call.Subject = subject_out_txt.Text.ToString(); Console.WriteLine(call.Subject); call.Start(); }
private void video_call_btn_Click(object sender, EventArgs e) { callService = m_User.CallService; call = callService.CreateCall(); CameraVideoSource cameraVideoSource = new CameraVideoSource(); CameraDevice selectedCamera = cameraVideoSource.Cameras[0]; VideoInterface videoInterface = client.MediaServices.getVideoInterface(); call.SetVideoMode(VideoMode.SendReceive, (error) => { if (error != null) { Console.Write("Set video mode error : " + error.Message); } else { Console.Write("Set video mode success"); cameraVideoSource.Start(selectedCamera, new VideoCaptureFormat(700, 400, 0, 30), (result) => { if (result == CameraVideoSourceResult.Success) { Console.WriteLine("CameraCaptureStart Success"); } else { Console.WriteLine("Error :" + result.ToString()); } }); } }); //pictureBox2.ImageLocation = VideoRenderer2; }