public void LeaveAllChannel(Action <ChannelEvent> callback) { YouMeErrorCode errorCode = YouMeVoiceAPI.GetInstance().LeaveChannelAll(); if (errorCode != YouMeErrorCode.YOUME_SUCCESS && callback != null) { callback(new ChannelEvent(Conv.ErrorCodeConvert(errorCode), ChannelEventType.LEAVE_FAIL, "")); } else { talkManager.leaveAllChannelCallback = callback; } }
public void LeaveChannel(Channel channel, Action <ChannelEvent> callback) { if (channel.ChannelID == null) { Log.e("channel ID can't be null."); return; } if (_config.AllowMultiChannel) { YouMeErrorCode errorCode = YouMeVoiceAPI.GetInstance().LeaveChannelMultiMode(channel.ChannelID); if (errorCode != YouMeErrorCode.YOUME_SUCCESS && callback != null) { callback(new ChannelEvent(Conv.ErrorCodeConvert(errorCode), ChannelEventType.LEAVE_FAIL, channel.ChannelID)); } else { talkManager.AddLeaveChannelCallback(channel.ChannelID, callback); } } else { LeaveAllChannel(callback); } }
public InitEvent(YouMeErrorCode code) { _code = Conv.ErrorCodeConvert(code); }
public static StatusCode ErrorCodeConvert(YouMeErrorCode errorcode) { return((StatusCode)errorcode); }
public SpeakToChannelEvent(YouMeErrorCode code, string channel) { _code = Conv.ErrorCodeConvert(code); _channel = channel; }