主頁(yè) > 服務(wù)與支持 > 開(kāi)發(fā)平臺(tái) > 客戶端SDK參考 > Windows Native SDK > 會(huì)議 會(huì)議接入
更新時(shí)間:2019-11-20
描述
用戶通過(guò)會(huì)議列表一鍵入會(huì)的方式加入會(huì)議。
前提條件:
業(yè)務(wù)流程
在加入會(huì)議時(shí),入會(huì)參數(shù)(conf_join_param),是否視頻接入會(huì)議(is_video_join)為必選;
//c code TSDK_RESULT ret; ret = tsdk_join_conference(confJoinParam, joinNumber, isVideoJoin, callId); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("join conf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
//c code case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { if (TSDK_SUCCESS == param2) { CHECK_POINTER(data); TSDK_S_JOIN_CONF_IND_INFO* pResult = (TSDK_S_JOIN_CONF_IND_INFO*)data; TSDK_S_JOIN_CONF_IND_INFO* notifyInfo = new TSDK_S_JOIN_CONF_IND_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), pResult, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_RESULT, (WPARAM)notifyInfo, (LPARAM)param1); } else { maindlg->MessageBox(_T("join conf failed!")); } break; } |
代碼示例詳見(jiàn)“更新會(huì)議狀態(tài)信息和與會(huì)者列表”描述。
//c code case TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT: { if (TSDK_SUCCESS != param2) { maindlg->MessageBox(_T("get data conf param failed!")); } else { ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_GET_DATA_CONF_PARAM, (WPARAM)param1, NULL); } break; } |
//c code TSDK_RESULT ret; ret = tsdk_join_data_conference(confHandle); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("join data conf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
在加入數(shù)據(jù)會(huì)議后,會(huì)向UI上報(bào)會(huì)議信息及狀態(tài)更新事件TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE,UI刷新會(huì)議成員列表和會(huì)議信息。
//c code case TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT: { ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_DATACONF_RESULT, NULL, (LPARAM)param2); break; } |
注意事項(xiàng)
無(wú)。
描述
用戶由第三方途徑獲取會(huì)議信息,通過(guò)輸入會(huì)議號(hào)和接入碼的方式加入會(huì)議。
業(yè)務(wù)流程
參見(jiàn)“會(huì)議列表一鍵入會(huì)”。
注意事項(xiàng)
無(wú)。
描述
用戶由第三方途徑獲取會(huì)議信息,通過(guò)撥打統(tǒng)一會(huì)議接入號(hào),使用IVR導(dǎo)航的方式加入會(huì)議。
前提條件:
業(yè)務(wù)流程
//c code TSDK_RESULT ret; ret = tsdk_start_call(&callid, call_number, FALSE); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("start call failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
//c code case TSDK_E_CALL_EVT_CALL_CONNECTED: { CHECK_POINTER(data); TSDK_S_CALL_INFO* callInfo = (TSDK_S_CALL_INFO*)data; TSDK_S_CALL_INFO* notifyInfo = new TSDK_S_CALL_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_CALL_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_CALL_INFO), callInfo, sizeof(TSDK_S_CALL_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CALL_CONNECTED, (WPARAM)notifyInfo, NULL); break; } |
//c code TSDK_RESULT ret; ret = tsdk_send_dtmf(callid, tone); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("send dtmf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
//c code case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { if (TSDK_SUCCESS == param2) { CHECK_POINTER(data); TSDK_S_JOIN_CONF_IND_INFO* pResult = (TSDK_S_JOIN_CONF_IND_INFO*)data; TSDK_S_JOIN_CONF_IND_INFO* notifyInfo = new TSDK_S_JOIN_CONF_IND_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), pResult, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_RESULT, (WPARAM)notifyInfo, (LPARAM)param1); } else { maindlg->MessageBox(_T("join conf failed!")); } break; } |
代碼示例詳見(jiàn)“更新會(huì)議狀態(tài)信息和與會(huì)者列表”描述。
//c code case TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT: { if (TSDK_SUCCESS != param2) { maindlg->MessageBox(_T("get data conf param failed!")); } else { ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_GET_DATA_CONF_PARAM, (WPARAM)param1, NULL); } break; } |
//c code TSDK_RESULT ret; ret = tsdk_join_data_conference(confHandle); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("join data conf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
在加入數(shù)據(jù)會(huì)議后,會(huì)向UI上報(bào)會(huì)議信息及狀態(tài)更新事件TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE,UI刷新會(huì)議成員列表和會(huì)議信息。
//c code case TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT: { ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_DATACONF_RESULT, NULL, (LPARAM)param2); break; } |
注意事項(xiàng)
無(wú)。
描述
會(huì)議主席邀請(qǐng)新的與會(huì)者加入會(huì)議。
與會(huì)者通過(guò)主席身份加入會(huì)議,或已申請(qǐng)獲取為主席。
業(yè)務(wù)流程
//c code case TSDK_E_CONF_EVT_CONF_INCOMING_IND: { CHECK_POINTER(data); TSDK_S_CONF_INCOMING_INFO* pResult = (TSDK_S_CONF_INCOMING_INFO*)data; TSDK_S_CONF_INCOMING_INFO* notifyInfo = new TSDK_S_CONF_INCOMING_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_CONF_INCOMING_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_CONF_INCOMING_INFO), pResult, sizeof(TSDK_S_CONF_INCOMING_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_CONF_COMMING, (WPARAM)notifyInfo, (LPARAM)param1); break; } LRESULT CDemoMainDlg::OnConfInComming(WPARAM wparam, LPARAM lparam) { TSDK_S_CONF_INCOMING_INFO* notifyInfo = (TSDK_S_CONF_INCOMING_INFO*)wparam; CHECK_POINTER_RETURN(notifyInfo, 0L); unsigned int handle = (unsigned int)lparam; std::string strchairman = notifyInfo->number; unsigned int conf_id = CTools::str2num(notifyInfo->conf_id); SetConfChairman(false); CDemoCallInCommingDlg incommingDlg; if (TSDK_E_CONF_MEDIA_VIDEO == notifyInfo->conf_media_type || TSDK_E_CONF_MEDIA_VIDEO_DATA == notifyInfo->conf_media_type) { incommingDlg.GetInitParam(VIDEO_CONF_CALL, strchairman, conf_id); } else { incommingDlg.GetInitParam(AUDIO_CONF_CALL, strchairman, conf_id); } INT_PTR nResponse = incommingDlg.DoModal(); if (IDOK == nResponse) { if (TSDK_E_CONF_MEDIA_VIDEO == notifyInfo->conf_media_type || TSDK_E_CONF_MEDIA_VIDEO_DATA == notifyInfo->conf_media_type) { (void)service_conf_mem_accept(handle, TRUE); } else { (void)service_conf_mem_accept(handle, FALSE); } } else { (void)service_conf_mem_reject(handle); } m_confHandle = handle; SAFE_DELETE(notifyInfo); return 0L; } |
//c code TSDK_RESULT ret; ret = tsdk_accept_conference(confHandle, isJoinVideo); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("accept conf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
//c code case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { if (TSDK_SUCCESS == param2) { CHECK_POINTER(data); TSDK_S_JOIN_CONF_IND_INFO* pResult = (TSDK_S_JOIN_CONF_IND_INFO*)data; TSDK_S_JOIN_CONF_IND_INFO* notifyInfo = new TSDK_S_JOIN_CONF_IND_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), pResult, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_RESULT, (WPARAM)notifyInfo, (LPARAM)param1); } else { maindlg->MessageBox(_T("join conf failed!")); } break; } |
代碼示例詳見(jiàn)“更新會(huì)議狀態(tài)信息和與會(huì)者列表”描述。
描述
用戶在未注冊(cè)EC帳號(hào)時(shí),通過(guò)匿名方式加入一個(gè)會(huì)議。
會(huì)議已經(jīng)創(chuàng)建,且用戶通過(guò)第三方方式獲取到會(huì)議ID和密碼。
業(yè)務(wù)流程
參數(shù)TSDK_S_CONF_ANONYMOUS_JOIN_PARAM中的服務(wù)器地址和端口,指會(huì)議服務(wù)器的地址和端口。
代碼示例:
//c code TSDK_S_CONF_ANONYMOUS_JOIN_PARAM anonymousJoinConfParam; service_memset_s(&anonymousJoinConfParam,sizeof(TSDK_S_CONF_ANONYMOUS_JOIN_PARAM),0,sizeof(TSDK_S_CONF_ANONYMOUS_JOIN_PARAM)); anonymousJoinConfParam.user_id = 1; CTools::CString2Char(m_strConfId, anonymousJoinConfParam.conf_id, TSDK_D_MAX_CONF_ID_LEN); CTools::CString2Char(m_strJoinPwd, anonymousJoinConfParam.conf_password, TSDK_D_MAX_CONF_PASSWORD_LEN); CTools::CString2Char(m_strConfServerAddress, anonymousJoinConfParam.server_addr, TSDK_D_MAX_URL_LENGTH); CTools::CString2Char(m_strNickname, anonymousJoinConfParam.display_name, TSDK_D_MAX_DISPLAY_NAME_LEN); anonymousJoinConfParam.server_port = (unsigned short)CTools::str2num(CTools::UNICODE2UTF(m_strConfServerPort)); (void)service_join_conference_by_anonymous(&anonymousJoinConfParam); int service_join_conference_by_anonymous(TSDK_S_CONF_ANONYMOUS_JOIN_PARAM *confJoinParam) { TSDK_RESULT ret; ret = tsdk_join_conference_by_anonymous(confJoinParam); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("join conference by anonymous failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; } |
若此次事件通知返回失敗,應(yīng)用程序界面應(yīng)提示用戶。
代碼示例:
//c code case TSDK_E_LOGIN_EVT_GET_TEMP_USER_RESULT: { CHECK_POINTER(data); TSDK_CHAR* notifyInfo = (TSDK_CHAR*)data; ::PostMessage(logindlg->GetSafeHwnd(), WM_LOGIN_GET_TEMP_USER_RESULT, (WPARAM)notifyInfo, NULL); break; } |
匿名會(huì)議過(guò)程中,無(wú)論用戶采用主席密碼入會(huì)或是普通與會(huì)者密碼入會(huì),均只有設(shè)置自己閉音的會(huì)控能力,其他會(huì)控能力暫不支持。
//c code case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { if (TSDK_SUCCESS == param2) { CHECK_POINTER(data); TSDK_S_JOIN_CONF_IND_INFO* pResult = (TSDK_S_JOIN_CONF_IND_INFO*)data; TSDK_S_JOIN_CONF_IND_INFO* notifyInfo = new TSDK_S_JOIN_CONF_IND_INFO; service_memset_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), 0, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), pResult, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_RESULT, (WPARAM)notifyInfo, (LPARAM)param1); } else { maindlg->MessageBox(_T("join conf failed!")); } break; } |