台湾一级a毛片在线播放,黄色精品偷拍视频大全,精品一区二区在线欧美日韩,日本特黄一级视频播三级片,日韩美女18岁美女视频,偷偷操不一样的99,国产午夜激无码av毛片久

智慧服務,成就美好體驗 項目咨詢

主頁 > 服務與支持 > 開發(fā)平臺 > 客戶端SDK參考 > Android Native SDK > 會議 漸進式會議

入門使用

漸進式會議

更新時間:2019-11-20

兩方通話轉會議

描述

用戶在點對點通話過程中發(fā)起轉會議,或邀請第三方(或更多)加入通話。

前提條件

  • 鑒權登錄成功。
  • SIP號碼已成功注冊。
  • 會議環(huán)境參數(shù)已設置。
業(yè)務流程
圖1 兩方通話轉會議流程 
  1. 會議發(fā)起方UI調用TsdkConferenceManager對象中的p2pTransferToConference()方法發(fā)起通話轉會議,參數(shù)為TsdkBookConfInfo類和TsdkCall類。

     

    代碼示例:
    //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;
    }
    
     

     

  2. 發(fā)起方SDK在收到服務器返回的立即會議創(chuàng)建響應后,通過TsdkNotify對象中的onEvtBookConfResult()方法向向UI上報會議創(chuàng)建結果。
  3. 會議發(fā)起方SDK完成通話轉會議處理,自動掛斷原通話,通過TsdkNotify對象中的onEvtTransToConfResult()方法向UI上報通話轉會議結果,攜帶原通話對象。

     

    說明: 

    若轉會議失敗,原通話仍存在,UI需要使用原通話對象恢復原通話界面;若轉會議成功,原通話對象由SDK自動回收,此時返回的原通話對象可能為空。

     

  4. 通話雙方SDK完成通話轉會議處理,通過TsdkNotify對象中的onEvtJoinConfResult()方法加入會議結果,并返回會議對象TsdkConference,后續(xù)會控時使用。此時UI可跳轉至會議界面。
  5. 所有與會者側SDK收到會議狀態(tài)刷新通知,通過TsdkNotify對象中的onEvtInfoAndStatusUpdate()方法向UI上報會議信息及會議狀態(tài)刷新事件,UI刷新會議狀態(tài)和成員列表。

注意事項

無。

升級會議

描述

  • “語音會議”升級至“語音+數(shù)據(jù)會議”。
  • “視頻會議”升級至“視頻+數(shù)據(jù)會議”。
  • 暫不支持“語音會議”升級至“語音+視頻會議”。

前提條件

與會者通過主席身份加入會議,或已申請獲取為主席。

業(yè)務流程

圖2 升級會議流程 
  1. 會議發(fā)起方UI調用TsdkConference對象中的upgradeConference()方法升級為數(shù)據(jù)會議,參數(shù)為群組ID,SDK發(fā)送升級會議請求至服務器。

     

    代碼示例:
    //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;
    }
    
     

     

  2. 發(fā)起方SDK在收到“升級為數(shù)據(jù)會議”請求的響應后, 通過TsdkNotify對象中的onEvtConfctrlOperationResult()方法向UI上報升級會議的會控操作結果。

     

    代碼示例:
    //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();
    }
    
     

     

  3. 會議發(fā)起方、接收方SDK收到會議成員列表刷新通知,通過TsdkNotify對象中的onEvtInfoAndStatusUpdate()方法向UI上報會議信息及狀態(tài)刷新事件,UI刷新會議狀態(tài)和成員列表。

     

    說明: 

    詳細流程參見會議信息及會議狀態(tài)更新描述。

     

  4. SDK自動獲取數(shù)據(jù)會議入會參數(shù),通過TsdkNotify對象中的onEvtGetDataconfParamResult()方法向UI上報數(shù)據(jù)會議入會參數(shù)獲取結果,UI應調用TsdkConference對象中的joinDataConference()方法加入數(shù)據(jù)會議。

     

    代碼示例:
    //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);
    }
    
     

     

  5. SDK自動獲取數(shù)據(jù)會議入會參數(shù),通過TsdkNotify對象中的onEvtJoinDataConfResult()方法向UI上報加入數(shù)據(jù)會議結果,UI根據(jù)結果顯示相應標識按鈕。

     

    代碼示例:
    //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);
    }
    
     

     

注意事項

無。