/// <summary> /// Enables disables video. /// </summary> /// <param name="enable">Wether to enable or disable video</param> /// <returns>true if the operation has been successful, false otherwise</returns> public bool EnableVideo(bool enable) { if (LinphoneCore.InCall) { LinphoneCall call = LinphoneCore.CurrentCall; LinphoneCallParams parameters = call.GetCurrentParamsCopy(); if (enable != parameters.VideoEnabled) { parameters.VideoEnabled = enable; if (enable) { // TODO: Handle bandwidth limitation } LinphoneCore.UpdateCall(call, parameters); return(true); } } return(false); }
/// <summary> /// Toggles the camera used for video capture. /// </summary> public void ToggleCameras() { if (NumberOfCameras >= 2) { String currentDevice = LinphoneCore.VideoDevice; if (currentDevice == frontCamera) { LinphoneCore.VideoDevice = backCamera; } else if (currentDevice == backCamera) { LinphoneCore.VideoDevice = frontCamera; } if (LinphoneCore.InCall) { LinphoneCall call = LinphoneCore.CurrentCall; LinphoneCore.UpdateCall(call, null); } } }