更新時間:2019-11-20
描述
用戶在點對點通話過程中發(fā)起轉(zhuǎn)會議,或邀請第三方(或更多)加入通話。
前提條件
//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 //其他參數(shù)可選,使用默認值即可 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; } |
若轉(zhuǎn)會議失敗,原通話仍存在,UI需要使用原通話對象恢復(fù)原通話界面;若轉(zhuǎn)會議成功,原通話對象由SDK自動回收,此時返回的原通話對象可能為空。
注意事項
無。
描述
前提條件
與會者通過主席身份加入會議,或已申請獲取為主席。
業(yè)務(wù)流程
//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(); } |
詳細流程參見會議信息及會議狀態(tài)更新描述。
//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); } |
注意事項
無。