public Task <ReturnMessage> SetRecordParameter(RecordParameter recordParameter) { Task <ReturnMessage> checkTask = _meetingManager.CheckMeetingServerStatus(); if (checkTask != null) { return(checkTask); } var tcs = new TaskCallback <ReturnMessage>("SetRecordParameter"); if (_meetingManager.TaskCallbacks.ContainsKey(tcs.Name)) { _meetingManager.TaskCallbacks.Remove(tcs.Name); } _meetingManager.TaskCallbacks.Add(tcs.Name, tcs); RecordParam recordParam = new RecordParam() { AudioBitrate = recordParameter.AudioBitrate, BitsPerSample = recordParameter.BitsPerSample, Channels = recordParameter.Channels, Height = recordParameter.Height, SampleRate = recordParameter.SampleRate, VideoBitrate = recordParameter.VideoBitrate, Width = recordParameter.Width }; var result = MeetingAgent.SetRecordParam(recordParam); if (result != 0) { return(Task.FromResult(MessageManager.FailedToSetRecordParameter)); } return(tcs.Task); }