internal void StopVideo() { //removes video from the conversation AsyncCallback callback = new AsyncOperationHandler(videoChannel.EndStop).Callback; try { videoChannel.BeginStop(callback, null); } catch (LyncClientException lyncClientException) { Console.WriteLine(lyncClientException); } catch (SystemException systemException) { if (Utilities.IsLyncException(systemException)) { // Log the exception thrown by the Lync Model API. Console.WriteLine("Error: " + systemException); } else { // Rethrow the SystemException which did not come from the Lync Model API. throw; } } }
internal void StartVideo() { //starts a video call or the video stream in a audio call AsyncCallback callback = new AsyncOperationHandler(videoChannel.EndStart).Callback; try { videoChannel.BeginStart(callback, null); } catch (LyncClientException lyncClientException) { Console.WriteLine(lyncClientException); } catch (SystemException systemException) { if (Utilities.IsLyncException(systemException)) { // Log the exception thrown by the Lync Model API. Console.WriteLine("Error: " + systemException); } else { // Rethrow the SystemException which did not come from the Lync Model API. throw; } } }