更新时间:2019-11-20
描述
用户在点对点通话过程中发起转会议,或邀请第三方(或更多)加入通话。
前提条件
//java code public int callTransferToConference(int call_id){ Log.i(TAG, "callTransferToConference."); Session callSession = CallMgr.getInstance().getCallSessionByCallID(call_id); if (callSession == null) { Log.e(TAG, "call Session is null."); return -1; } TsdkCall tsdkCall = callSession.getTsdkCall(); if (tsdkCall == null) { Log.e(TAG, "call is invalid."); return -1; } TsdkBookConfInfo bookConfInfo = new TsdkBookConfInfo(); bookConfInfo.setConfType(TsdkConfType.TSDK_E_CONF_INSTANT); bookConfInfo.setIsAutoProlong(1); bookConfInfo.setSubject(LoginMgr.getInstance().getAccount() + "'s Meeting"); if (1 == tsdkCall.getCallInfo().getIsVideoCall()) { bookConfInfo.setConfMediaType(TSDK_E_CONF_MEDIA_VIDEO); }else { bookConfInfo.setConfMediaType(TSDK_E_CONF_MEDIA_VOICE); } bookConfInfo.setSize(2); List<TsdkAttendeeBaseInfo> attendeeList = new ArrayList<>(); TsdkAttendeeBaseInfo confctrlAttendee = new TsdkAttendeeBaseInfo(); //confctrlAttendee.setNumber(callInfo.getPeerNumber()); confctrlAttendee.setRole(TsdkConfRole.TSDK_E_CONF_ROLE_ATTENDEE); attendeeList.add(confctrlAttendee); bookConfInfo.setAttendeeList(attendeeList); bookConfInfo.setAttendeeNum(attendeeList.size()); //The other parameters are optional, using the default value //其他参数可选,使用默认值即可 bookConfInfo.setLanguage(TsdkConfLanguage.TSDK_E_CONF_LANGUAGE_EN_US); int result = TsdkManager.getInstance().getConferenceManager().p2pTransferToConference(tsdkCall, bookConfInfo); if (result != 0) { Log.e(TAG, "call transfer to conference is return failed, result = " + result); } return result; } |
若转会议失败,原通话仍存在,UI需要使用原通话对象恢复原通话界面;若转会议成功,原通话对象由SDK自动回收,此时返回的原通话对象可能为空。
注意事项
无。
描述
前提条件
与会者通过主席身份加入会议,或已申请获取为主席。
业务流程
//Java code public int upgradeConf() { if (null == currentConference) { Log.e(TAG, "upgrade conf failed, currentConference is null "); return -1; } int result = currentConference.upgradeConference(""); return result; } |
//Java code public void handleConfctrlOperationResult(TsdkConference conference, TsdkConfOperationResult result) { Log.i(TAG, "handleConfctrlOperationResult"); int ret = result.getReasonCode(); if (null == conference || null == result) { return; } if (ret != 0) { Log.e(TAG, "conf ctrl operation failed: " + result.getDescription()); return; } int confOperationType = result.getOperationType(); } |
//Java code public void handleGetDataConfParamsResult(TsdkConference tsdkConference, TsdkCommonResult commonResult){ Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.GET_DATA_CONF_PARAM_RESULT, result); } |
//Java code public void handleGetDataConfParamsResult(TsdkConference tsdkConference, TsdkCommonResult commonResult){ Log.i(TAG, "handleJoinConfResult"); if ((tsdkConference == null) || (commonResult == null)) { return; } int result = commonResult.getResult(); mConfNotification.onConfEventNotify(ConfConstant.CONF_EVENT.GET_DATA_CONF_PARAM_RESULT, result); } |
注意事项
无。