Test interface without AEC

10.1 Call the AEC configuration function to enable or disable AEC. When AEC is enabled, the list information is obtained from the AEC URL. When AEC is closed, the list information is obtained through the API.

StarRtc.StarSDK.setConfigUseAEC(true);

10.2 The callback of private deployment

10.2.1 Group callback

Receive group messages through the callback function which be passed in during login process;

function starRtcLoginCallBack(data, status) {
switch (status) {
...
case "onGetGroupList":
//Get group list
//data.groupsInfo:array,Each element is{ "id": "", "name": "", "creator": "" }
break;
case "onGetOnlineNumber":
//Get the number of online users
//data.count:Total number of users,data.totalPageNum:Total number of pages after paging
break;
case "onGetGroupUserList":
//Get a list of group users
//data.userIdList:array,Each element is a string of user id
break;
case "onGetAllUserList":
//Get all users
//data.totalPageNum:Total number of pages after paging,data.reqPageNum:Requested page number,data.userIdList:arrat,Each element is a string of user id
break;
}
};

//Login to the SDK
var starSDK = new StarRtc.StarSDK();
starSDK.login(appID,userId,authKey,callBack);

10.3 API description

/**
* Save room information (use this interface for demonstrations without AEC)
* @param listType You can reference CHATROOM_LIST_TYPE to set the save type
* @param roomInfo the structure is {"id":"", "name":"", "creator":""}
* @param callback callback
*/
StarRtc.StarSDK.reportRoom = function (listType, roomInfo, callback)

/**
* Delete the room informationuse this interface for demonstrations without AEC
* @param listType You can reference CHATROOM_LIST_TYPE to set the save type
* @param roomInfo the structure is{"id":"", "name":"", "creator":""}
* @param callback callback
*/
StarRtc.StarSDK.delRoom = function (listType, roomInfo, callback)

/**
* Query the list(Using this interface for demonstration without AEC))
* @param listTypes array,reference CHATROOM_LIST_TYPE
* @param callback callback
*/
StarRtc.StarSDK.queryRoom = function (listTypes, callback)


/**
* Request to get the group list
*/
StarRtc.StarSDK.getGroupList = function ()

/**
* Request the user list of a specified group
* @param groupId group ID
*/
StarRtc.StarSDK.getGroupUserList = function (groupId)

/**
* Request to get the current online number
*/
StarRtc.StarSDK.getOnlineNumber = function ()

/**
* Request to get the list of all users
* @param reqPageNum page number,After calling the StarRtc.Instance.getOnlineNumber function, the total number and the total number of pages will be returned in the callback.
*/
StarRtc.StarSDK.getAllUserList = function (reqPageNum)