StarRtc.StarSDK = function () /** * Get the SDK version number */ StarRtc.StarSDK.version = function ()
/** * Set msgServer address and port * @param msgServerUrl msgServer address * @param msgServerWebsocketPort msgServer websocket port */ StarRtc.StarSDK.setMsgServerInfo = function (msgServerUrl, msgServerWebsocketPort)
/** * Set chatRoomServer address and port * @param chatRoomServerUrl chatRoomServer address * @param chatRoomServerWebsocketPort chatRoomServer websocket port */ StarRtc.StarSDK.setChatRoomServerInfo = function (chatRoomServerUrl, chatRoomServerWebsocketPort)
/** * Set the srcServer address and port * @param srcServerUrl srcServer address * @param srcServerWebsocketPort srcServer websocket port * @param srcServerWebrtcPort srcServer webrtc port * @param srcServerWebrtcIP srcServer webrtc IP(Below chrome72 version, firefox, safari),optional.If you do not fill in it,the IP is the same as the Server address */ StarRtc.StarSDK.setSrcServerInfo = function (srcServerUrl, srcServerWebsocketPort, srcServerWebrtcPort, srcServerWebrtcIP)
/** * Set the vdnServer address and port * @param vdnServerUrl vdnServer address * @param vdnServerWebsocketPort vdnServer websocket port * @param vdnServerWebrtcPort vdnServer webrtc port * @param vdnServerWebrtcIP vdnServer webrtc IP(Below chrome72 version, firefox, safari),optional.If you do not fill in it,the IP is the same as the Server address */ StarRtc.StarSDK.setVdnServerInfo = function (vdnServerUrl, vdnServerWebsocketPort, vdnServerWebrtcPort, vdnServerWebrtcIP)
/** * Set voipServer address and port * @param voipServerUrl voipServer address * @param voipServerPort voipServer port * @param voipServerWebsocketPort voipServer websocket port * @param voipServerWebrtcPort voipServer webrtc port * @param voipServerWebrtcIP voipServer webrtc IP(Below chrome72 version, firefox, safari),optional.If you do not fill in it,the IP is the same as the Server address */ StarRtc.StarSDK.setVoipServerInfo = function (voipServerUrl, voipServerPort, voipServerWebsocketPort, voipServerWebrtcPort, voipServerWebrtcIP)
/** * Set whether to enable AEC * @param flag Enable flag */ StarRtc.StarSDK.setConfigUseAEC = function (flag)
/** * Login * @param _agentId application id(It is meaningless in private deployment, which can be "") * @param _userId user id * @param _callback result callback */ StarRtc.StarSDK.login = function (_agentId, _userId, _callback)
/** * log out */ StarRtc.StarSDK.logout = function ()
/** * Send a chat message * @param _targetId userId * @param _digest digest * @param _txt text * @param _type message type(optional) */ StarRtc.StarSDK.sendSingleMsg = function (_targetId, _digest, _txt, _type)
/** * Send a group message * @param _targetGroupId group id * @param _digest digest * @param _txt text */ StarRtc.StarSDK.sendGroupMsg = function (_targetGroupId, _digest, _txt)
/** * Send voip control message * @param _targetId target Id * @param _code code */ StarRtc.StarSDK.sendVoipCtrlMsg = function (_targetId, _code)
/** * Send voip call message * @param _targetId target user Id * @param _ts Timestamp (optional) * @param _flag Whether it is an audio call, the default flag is false (optional) */ StarRtc.StarSDK.sendVoipCallMsg = function (_targetId, _ts, _flag)
/** * Send voip refuse message * @param _targetId target user Id */ StarRtc.StarSDK.sendVoipRefuseMsg = function (_targetId)
/** * Send voip hang up message * @param _targetId target user Id */ StarRtc.StarSDK.sendVoipHungupMsg = function (_targetId)
/** * Send voip busy message * @param _targetId target user Id */ StarRtc.StarSDK.sendVoipBusyMsg = function (_targetId)
/** * Send voip message of agreeing to connect * @param _targetId target user Id */ StarRtc.StarSDK.sendVoipConnectMsg = function (_targetId)
/** * Set the callback to take over the onVoipMessage section of the login callback which be set in the login method * @param _callback callback */ StarRtc.StarSDK.setIMExtraback = function (_callback)
/** * Create a video meeting room * @param _oper Operation type: new: create, open: join * @param _userCallback callback * @param _userData Store information about the video meeting room(id,name,creator),and the structure is{"roomInfo":{"id":"", "name":"", "creator":""}} */ StarRtc.StarSDK.getVideoMeetingRoomSDK = function (_oper, _userCallback, _userData)
/** * Create a live room * @param _type Type: vdn, viewer; src, uploader * @param _oper Operation type: new: create, open: join * @param _userCallback callback * @param _userData Store information about the live room(id,name,creator),and the structure is{"roomInfo":{"id":"", "name":"", "creator":""}} */ StarRtc.StarSDK.getVideoLiveRoomSDK = function (_type, _oper, _userCallback, _userData)
/** * Create a voip room * @param _oper Operation type: call, caller; response, responder * @param _userCallback callback * @param _userData Store the other party id information,and the structure is{"roomInfo":{"targetId":the other party id, "audioOnly":Whether only has audio chat(The parameter can not be passed in, the default value is false: video chat)}} */ StarRtc.StarSDK.getVoipRoomSDK = function (_oper, _userCallback, _userData)
/** * Create a chat room * @param _oper Operation type: new: create, open: join * @param _userCallback callback * @param _userData Store information about the chat room(id,name,creator),and the structure is{"roomInfo":{"id":"", "name":"", "creator":""}} */ StarRtc.StarSDK.getChatRoomSDK = function (_oper, _userCallback, _userData)
/** * Create a video room (video only, no chat room) * @param _type Type: vdn, viewer; src, uploader * @param _oper Operation type: new: create, open: join * @param _userCallback callback * @param _userData Store information about the video room(id,name,creator),and the structure is {"roomInfo":{"id":"", "name":"", "creator":""}} * @param _liveType room type,reference CHATROOM_LIST_TYPE */ StarRtc.StarSDK.getVideoRoomSDK = function (_type, _oper, _userCallback, _userData, _liveType)
/** * 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)
/** * Set the group DND * @param ignore True: set doing not disturb; false: cancel doing not disturb */ StarRtc.StarSDK.setGroupMsgPush = function (ignore)
/** * Remove users of the specified group * @param groupId group ID * @param removeUsers The user to be removed, the data type is an array */ StarRtc.StarSDK.removeGroupUsers = function (groupId, removeUsers)
/** * Add users of the specified group * @param groupId group ID * @param addUsers User to be added, the data type is an array * @param userDefineData */ StarRtc.StarSDK.addGroupUsers = function (groupId, addUsers, userDefineData)
/** * Delete a specified group * @param groupId group ID */ StarRtc.StarSDK.delGroup = function (groupId)
/** * Create a group * @param addUsers User to be added, the data type is an array * @param userDefineData */ StarRtc.StarSDK.createGroup = function (addUsers, userDefineData)
/** * 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)
/** * Create a super room * @param _oper Operation type: new, create; open, join * @param _userCallback callback * @param _userData Store information about the super room(id,name,creator),and the structure is {"roomInfo":{"id":"", "name":"", "creator":""}} */ StarRtc.StarSDK.getSuperRoomSDK = function (_oper, _userCallback, _userData)
/** * 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 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.delRoom = function (listType, roomInfo, callback)
|