SDK description and api introduction

1. Basic instructions of the SDK

Class Introduction Function
LOG_LEVEL Log level Log level enumeration
CHATROOM_LIST_TYPE List type List type enumeration
StarRtc.StarConfig Configuration object Save the configuration information
StarRtc.StarUserInfo User information object Save the user information
StarRtc.StarSDK SDK instance class Login, send and receive IM messages, group management, send and receive group messages, SDK advanced service encapsulation interface, and allow multiple instances
StarRtc.StarRoomSDK Room SDK Integrate videoSDK and chatSDK to provide complete room function(voip,meeting,live)
StarRtc.StarSuperRoomSDK Super room SDK the Super room SDK, half duplex, and free talking
StarRtc.StarChatRoomSDK Chat room SDK Simple business package for chat room SDK
StarRtc.StarVideoRoomSDK Video room SDK Simple business package for video SDK
StarRtc.StarVideoSDK Video SDK It is responsible for audio and video functions
StarRtc.StarChatSDK Chat SDK It is responsible for chat function

2. LOG_LEVEL

var LOG_LEVEL = {
LOG_LEVEL_DEBUG: i++,
LOG_LEVEL_INFO: i++,
LOG_LEVEL_WARN: i++,
LOG_LEVEL_ERROR: i++
};

/**
* Set the log level, open the low-level log will contain high-level logs, such as opening DEBUG, INFO, WARN, ERROR will be opened at the same time, the default status is to open DEBUG mode.
* @param logLevel log level,见LOG_LEVEL
*/
StarRtc.InitlogLevel = function (logLevel)

3. CHATROOM_LIST_TYPE

var CHATROOM_LIST_TYPE = {
//list type:chat room
CHATROOM_LIST_TYPE_CHATROOM: i++,
//list type:live
CHATROOM_LIST_TYPE_LIVE: i++,
//list type:push live stream
CHATROOM_LIST_TYPE_LIVE_PUSH: i++,
//list type:meeting
CHATROOM_LIST_TYPE_MEETING: i++,
//list type:push meeting stream
CHATROOM_LIST_TYPE_MEETING_PUSH: i++,
//list type:mini class
CHATROOM_LIST_TYPE_CLASS: i++,
//list type:push mini class stream
CHATROOM_LIST_TYPE_CLASS_PUSH: i++,
//list type:audio live
CHATROOM_LIST_TYPE_AUDIO_LIVE: i++,
//list type:push audio live stream
CHATROOM_LIST_TYPE_AUDIO_LIVE_PUSH: i++,
//list type:super room
CHATROOM_LIST_TYPE_SUPER_ROOM: i++,
//list type:push super room stream
CHATROOM_LIST_TYPE_SUPER_ROOM_PUSH: i++
};

4. StarRtc.StarConfig

//Whether to open the use of AEC
StarRtc.StarConfig.configUseAEC;

//msgServer address
StarRtc.StarConfig.msgServerUrl;
//msgServer websocket port
StarRtc.StarConfig.msgServerWebsocketPort;
//chatRoomServer address
StarRtc.StarConfig.chatRoomServerUrl;
//chatRoomServer websocket port
StarRtc.StarConfig.chatRoomServerWebsocketPort;
//srcServer address
StarRtc.StarConfig.srcServerUrl;
//srcServer websocket port
StarRtc.StarConfig.srcServerWebsocketPort;
//srcServer webrtc port
StarRtc.StarConfig.srcServerWebrtcPort;
//vdnServer address
StarRtc.StarConfig.vdnServerUrl;
//vdnServer websocket port
StarRtc.StarConfig.vdnServerWebsocketPort;
//vdnServer webrtc port
StarRtc.StarConfig.vdnServerWebrtcPort;
//voipServer address
StarRtc.StarConfig.voipServerUrl;
//voipServer port
StarRtc.StarConfig.voipServerPort;
//voipServer websocket port
StarRtc.StarConfig.voipServerWebsocketPort;
//voipServer webrtc port
StarRtc.StarConfig.voipServerWebrtcPort;

5. StarRtc.StarUserInfo

//application id
StarRtc.StarUserInfo.agentId = "";
//user id
StarRtc.StarUserInfo.userId = "";
//application id_user id
StarRtc.StarUserInfo.starUid = "";
//token
StarRtc.StarUserInfo.starToken = "";

6. StarRtc.StarSDK

/**
* Constructor
*/
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 idIt 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 typeoptional
*/
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 roomidnamecreator),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 roomidnamecreator),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)

7. StarRtc.StarRoomSDK

/**
* Constructor
* @param _type Type: vdn, viewer; src, uploader
* @param _oper Operation type: new, create; open, join
* @param _userCallback callback
* @param _userData Store information about chat room(id,name,creator),and the structure is{"roomInfo":{"id":"", "name":"", "creator":""}}
* @param _config Room configuration which can not be passed in
* @param _liveType You can reference CHATROOM_LIST_TYPE to set the live type
* @param _starImInterface Set the callback to take over the onVoipMessage section of the login callback set in the login method
* @param _starUser User information(reference StarRtc.StarUserInfo)
* @param _starConfig star Configuration(reference StarRtc.StarConfig)
*/
StarRtc.StarRoomSDK = function (_type, _oper, _userCallback, _userData, _config, _liveType, _starImInterface, _starUser, _starConfig)

/**
* Connect to the super room
*/
StarRtc.StarRoomSDK.sigConnect = function ()

/**
* Disconnect to the super room
* @param flag The flag of Whether to disconnect actively, which is used to determine reconnection
*/
StarRtc.StarRoomSDK.sigDisconnect = function (_flag)

/**
* Create a room
*/
StarRtc.StarRoomSDK.createNew = function ()

/**
* Delete a room
*/
StarRtc.StarRoomSDK.deleteCurrRoom = function ()

/**
* Create a local video stream
* @param streamOption Stream configurationResolution, etc.),such as{ "video": true, "audio": { deviceId: { ideal: ["default"] } } }, or{ "video": { width: { ideal: 640 }, height: { ideal: 480 }, frameRate: { ideal: 25 }, facingMode: { ideal: ["user"] } }, "audio": { deviceId: { ideal: ["default"] } }
}
*/
StarRtc.StarRoomSDK.createStream = function (streamOption)

/**
* Create a shared screen video stream
*/
StarRtc.StarRoomSDK.createScreenCaptureStream = function ()

/**
* Set the visibility of the stream (It will affect both local and far peer streams)
* @param config Stream visibility configuration{"video":true, "audio":true}
*/
StarRtc.StarRoomSDK.publishStream = function (config)

/**
* join the room
*/
StarRtc.StarRoomSDK.joinRoom = function ()

/**
* leave the room
* @param _flag Whether to leave the roomactively(optional)
*/
StarRtc.StarRoomSDK.leaveRoom = function (_flag)

/**
* Switch the size of the view
* @param streamConfig Switch the configuration of the size map, 1 for small, 2 for large[1,2,1,2...]
*/
StarRtc.StarRoomSDK.streamConfigApply = function (streamConfig)

/**
* Send a chat room message
* @param msg message
*/
StarRtc.StarRoomSDK.sendChatMsg = function (msg)

/**
* Send voip message(IM one-to-one chat message)
* @param msg message
*/
StarRtc.StarRoomSDK.sendVoipMsg = function (msg)

/**
* Send chat room private message
* @param toUserId the user ID the meaasge will be sent to
* @param msg message
*/
StarRtc.StarRoomSDK.sendChatPrivateMsg = function (userId, msg)

/**
* Send the message that the audience apply to be an anchor
*/
StarRtc.StarRoomSDK.sendApplyMsg = function ()

/**
* Send the message that agree the audience apply to be an anchor
* @param userId the user ID the meaasge will be sent to
*/
StarRtc.StarRoomSDK.sendApplyAgreeMsg = function (userId)

/**
* The creater refuses someone to be a broadcaster
* @param userId the user ID the meaasge will be sent to
*/
StarRtc.StarRoomSDK.sendApplyDisagreeMsg = function (userId)

/**
* the creater invites someone to be a broadcaster
* @param userId the user ID the meaasge will be sent to
*/
StarRtc.StarRoomSDK.sendInviteLinkMsg = function (userId)

/**
* The audience has agreed to be a broadcaster
*/
StarRtc.StarRoomSDK.sendInviteLinkAgreeMsg = function ()

/**
* The audience has refused to be a broadcaster
*/
StarRtc.StarRoomSDK.sendInviteLinkDisagreeMsg = function ()

/**
* Send the message that the creater invites someone to start to be a broadcaster
*/
StarRtc.StarRoomSDK.sendInviteLinkStartMsg = function ()

/**
* Send the message that the user will be stopped to be a broadcaster
* @param userId the user ID the meaasge will be sent to
*/
StarRtc.StarRoomSDK.sendLinkStopMsg = function (userId)

/**
* Kick out the user
* @param kickOutUserId the user ID who will be kicked out
*/
StarRtc.StarRoomSDK.kickOutUser = function (kickOutUserId)

/**
* Speaking not allowed in the room
* @param banUserId the user ID of who is speaking not allowed
* @param banTime the time duration of speaking not allowed
*/
StarRtc.StarRoomSDK.banToSendMsg = function (banUserId, banTime)

/**
* Get the number of online users in the chat room
*/
StarRtc.StarRoomSDK.getRoomOnlineNum = function ()

/**
* Send real-time data
* @param data real-time data
*/
StarRtc.StarRoomSDK.sendStreamData = function (data)

/**
* Get the disconnect satus:active or passive?
*/
StarRtc.StarRoomSDK.activeDisconnect = function ()

8. StarRtc.StarSuperRoomSDK

/**
* Constructor
* @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":""}}
* @param _starUser User Info(见StarRtc.StarUserInfo)
* @param _starConfig Star configuration(Reference StarRtc.StarConfig)
*/
StarRtc.StarSuperRoomSDK = function (_oper, _userCallback, _userData, _starUser, _starConfig)

/**
* Connect to the super room
*/
StarRtc.StarSuperRoomSDK.sigConnect = function ()

/**
* Disconnect to the super room
* @param flag The flag of Whether to disconnect actively, which is used to determine reconnection
*/
StarRtc.StarSuperRoomSDK.sigDisconnect = function (_flag)

/**
* Create a new room
*/
StarRtc.StarSuperRoomSDK.createNew = function ()

/**
* Delete the current room
*/
StarRtc.StarSuperRoomSDK.deleteCurrRoom = function ()

/**
* @param streamOption Stream configurationResolution, etc.),such as{ "video": true, "audio": { deviceId: { ideal: ["default"] } } }, or{ "video": { width: { ideal: 640 }, height: { ideal: 480 }, frameRate: { ideal: 25 }, facingMode: { ideal: ["user"] } }, "audio": { deviceId: { ideal: ["default"] } }
}
*/
StarRtc.StarSuperRoomSDK.createStream = function (streamOption)

/**
* Join the room
*/
StarRtc.StarSuperRoomSDK.joinRoom = function ()

/**
* Leave the room
* @param _flag Whether to leave actively(optional)
*/
StarRtc.StarSuperRoomSDK.leaveRoom = function (_flag)

/**
* Send chat room message
* @param msg message
*/
StarRtc.StarSuperRoomSDK.sendChatMsg = function (msg)

/**
* Send chat room private message
* @param toUserId the user ID the meaasge will be sent to
* @param msg message
*/
StarRtc.StarSuperRoomSDK.sendChatPrivateMsg = function (userId, msg)

/**
* kick out the user
* @param kickOutUserId the user ID who will be kicked out
*/
StarRtc.StarSuperRoomSDK.kickOutUser = function (kickOutUserId)

/**
* Speaking not allowed in the room
* @param banUserId the user ID of who is speaking not allowed
* @param banTime the time duration of speaking not allowed
*/
StarRtc.StarSuperRoomSDK.banToSendMsg = function (banUserId, banTime)

/**
* Get the number of online users in the chat room
*/
StarRtc.StarSuperRoomSDK.getRoomOnlineNum = function ()

/**
* Get the disconnect satus:active or passive?
*/
StarRtc.StarSuperRoomSDK.activeDisconnect = function ()

/**
* Start the intercom
*/
StarRtc.StarSuperRoomSDK.startTalk = function ()

/**
* End the intercom
*/
StarRtc.StarSuperRoomSDK.endTalk = function ()

9. StarRtc.StarChatRoomSDK

/**
* Constructor
* @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":""}}
* @param _starUser User Info(见StarRtc.StarUserInfo)
* @param _starConfig Star configuration(Reference StarRtc.StarConfig)
*/
StarRtc.StarChatRoomSDK = function (_oper, _userCallback, _userData, _liveType, _starUser, _starConfig)

/**
* Connect to the room
*/
StarRtc.StarChatRoomSDK.sigConnect = function ()

/**
* Disconnect to the room
* @param flag The flag of Whether to disconnect actively, which is used to determine reconnection
*/
StarRtc.StarChatRoomSDK.sigDisconnect = function (_flag)

/**
* create a new room
*/
StarRtc.StarChatRoomSDK.createNew = function ()

/**
* Send the chat room message
* @param msg message
*/
StarRtc.StarChatRoomSDK.sendChatMsg = function (msg)

/**
* Send chat room private message
* @param toUserId the user ID the meaasge will be sent to
* @param msg message
*/
StarRtc.StarChatRoomSDK.sendChatPrivateMsg = function (toUserId, msg)

/**
* Send chat room private chat control message
* @param toUserId The message who will be sent to
* @param msg meesage
* @param code control code
*/
StarRtc.StarChatRoomSDK.sendChatCtrlPrivateMsg = function (toUserId, msg, code)

/**
* kick out the user
* @param kickOutUserId the user ID who will be kicked out
*/
StarRtc.StarChatRoomSDK.kickOutUser = function (kickOutUserId)

/**
* Speaking not allowed in the room
* @param banUserId the user ID of who is speaking not allowed
* @param banTime the time duration of speaking not allowed
*/
StarRtc.StarChatRoomSDK.banToSendMsg = function (banUserId, banTime)

/**
* Get the number of online users in the chat room
*/
StarRtc.StarChatRoomSDK.getRoomOnlineNum = function ()

/**
* Delete the room
*/
StarRtc.StarChatRoomSDK.deleteCurrRoom = function ()

/**
* Join the room
*/
StarRtc.StarChatRoomSDK.joinRoom = function ()

/**
* Leave the room
*/
StarRtc.StarChatRoomSDK.leaveRoom = function ()

/**
* Get the disconnect satus:active or passive?
*/
StarRtc.StarChatRoomSDK.activeDisconnect = function ()

10. StarRtc.StarVideoRoomSDK

/**
* Constructor
* @param _type Type: vdn, viewer; src, uploader
* @param _oper Operation type: new, create; open, join
* @param _userCallback callback
* @param _userData Store information about chat room(id,name,creator),and the structure is{"roomInfo":{"id":"", "name":"", "creator":""}}
* @param _liveType You can reference CHATROOM_LIST_TYPE to set the live type
* @param _starUser User information(reference StarRtc.StarUserInfo)
* @param _starConfig star Configuration(reference StarRtc.StarConfig)
*/
StarRtc.StarVideoRoomSDK = function (_type, _oper, _userCallback, _userData, _liveType, _starUser, _starConfig)

/**
* Connect to the video room
*/
StarRtc.StarVideoRoomSDK.sigConnect = function ()

/**
* Disconnect to the room
* @param flag The flag of Whether to disconnect actively, which is used to determine reconnection
*/
StarRtc.StarVideoRoomSDK.sigDisconnect = function (_flag)

/**
* Create the video room
*/
StarRtc.StarVideoRoomSDK.createNew = function ()

/**
* Create the New super room
*/
StarRtc.StarVideoRoomSDK.createNewSuperRoom = function ()

/**
* delete the current room
*/
StarRtc.StarVideoRoomSDK.deleteCurrRoom = function ()

/**
* Create a local video stream
* @param streamOption Stream configurationResolution, etc.),such as{ "video": true, "audio": { deviceId: { ideal: ["default"] } } }, or{ "video": { width: { ideal: 640 }, height: { ideal: 480 }, frameRate: { ideal: 25 }, facingMode: { ideal: ["user"] } }, "audio": { deviceId: { ideal: ["default"] } }
}
*/
StarRtc.StarVideoRoomSDK.createStream = function (streamOption)

/**
* Create a shared screen video stream
*/
StarRtc.StarVideoRoomSDK.createScreenCaptureStream = function ()

/**
* Set the visibility of the stream (It will affect both local and far peer streams)
* @param config Stream visibility configuration{"video":true, "audio":true}
*/
StarRtc.StarVideoRoomSDK.publishStream = function (config)

/**
* Join the room
*/
StarRtc.StarVideoRoomSDK.joinRoom = function ()

/**
* Leave the room
* @param _flag Whether to leave actively(optional))
*/
StarRtc.StarVideoRoomSDK.leaveRoom = function (flag)

/**
* Switch the size of the view
* @param streamConfig Switch the configuration of the size map, 1 for small, 2 for large[1,2,1,2...]
*/
StarRtc.StarVideoRoomSDK.streamConfigApply = function (streamConfig)

/**
* Send real-time data
* @param data real time data
*/
StarRtc.StarVideoRoomSDK.sendStreamData = function (data)

/**
* Get the disconnect satus:active or passive?
*/
StarRtc.StarVideoRoomSDK.activeDisconnect = function ()

11. StarRtc.StarVideoSDK

/**
* Constructor
* @param _type Type: vdn, viewer; src, uploader
* @param _oper Operation type: new, create; open, join
* @param _userCallback callback
* @param _userData Store information about chat room(id,name,creator),and the structure is{"roomInfo":{"id":"", "name":"", "creator":""}}
* @param _config Room configuration which can not be passed in
* @param _liveType You can reference CHATROOM_LIST_TYPE to set the live type
* @param _starUser User information(reference StarRtc.StarUserInfo)
* @param _starConfig star Configuration(reference StarRtc.StarConfig)
*/
StarRtc.StarVideoSDK = function (_type, _operfunction (_type, _oper, _userCallbackfunction (_type, _operfunction (_type, _oper, _userCallback, _userData, _liveType, _starUser, _starConfig)

/**
* Connect to the room
*/
StarRtc.StarVideoSDK.sigConnect = function ()

/**
* Disconnect to the room
* @param flag The flag of Whether to disconnect actively, which is used to determine reconnection
*/
StarRtc.StarVideoSDK.sigDisconnect = function (_flag)

/**
* Create a new room
*/
StarRtc.StarVideoSDK.createNew = function ()

/**
* Create a new super room
*/
StarRtc.StarVideoSDK.createNewSuperRoom = function ()

/**
* Delete the current room
*/
StarRtc.StarVideoSDK.deleteCurrRoom = function ()

/**
* Create a local video stream
* @param streamOption Stream configurationResolution, etc.),such as{ "video": true, "audio": { deviceId: { ideal: ["default"] } } }, or{ "video": { width: { ideal: 640 }, height: { ideal: 480 }, frameRate: { ideal: 25 }, facingMode: { ideal: ["user"] } }, "audio": { deviceId: { ideal: ["default"] } }
}
*/
StarRtc.StarVideoSDK.createStream = function (streamOption)

/**
* Create a shared screen video stream
*/
StarRtc.StarVideoSDK.createScreenCaptureStream = function ()

/**
* Set the visibility of the stream (It will affect both local and far peer streams)
* @param config Stream visibility configuration{"video":true, "audio":true}
*/
StarRtc.StarVideoSDK.publishStream = function (config)

/**
* Join the room
*/
StarRtc.StarVideoSDK.joinRoom = function ()

/**
* Leave the room
* @param _flag Whether to leave actively(optional)
*/

StarRtc.StarVideoSDK.leaveRoom = function (flag)

/**
* Switch the size of the view
* @param streamConfig Switch the configuration of the size map, 1 for small, 2 for large[1,2,1,2...]
*/
StarRtc.StarVideoSDK.strestreamConfigApplyamConfigApply = function (streamConfig)

/**
* Send real-time data
* @param data real-time data
*/
StarRtc.StarVideoSDK.sendStreamData = function (data)

/**
* Get the disconnect satus:active or passive?
*/
StarRtc.StarVideoSDK.activeDisconnect = function ()

12. StarRtc.StarChatSDK

/**
* Constructor
* @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":""}}
* @param _starUser User Info(见StarRtc.StarUserInfo)
* @param _starConfig Star configuration(Reference StarRtc.StarConfig)
*/
StarRtc.StarChatSDK = function (_operfunction (_oper, _userCallback, _userData, _liveType, _starUser, _starConfig)

/**
* Coonect to the room
*/
StarRtc.StarChatSDK.sigConnect = function ()

/**
* Disconnect to the room
* @param flag The flag of Whether to disconnect actively, which is used to determine reconnection
*/
StarRtc.StarChatSDK.sigdisconnect = function (_flag)

/**
* Create a room
*/
StarRtc.StarChatSDK.createNew = function ()

/**
* Send chat room message
* @param msg message
*/
StarRtc.StarChatSDK.sendChatMsg = function (msg)

/**
* Send chat room private message
* @param toUserId the user ID the meaasge will be sent to
* @param msg message
*/
StarRtc.StarChatSDK.sendChatPrivateMsg = function (toUserId, msg)

/**
* Send chat room private chat control message
* @param toUserId The message who will be sent to
* @param msg meesage
* @param code control code
*/
StarRtc.StarChatSDK.sendChatCtrlPrivateMsg = function (toUserId, msg, code)

/**
* kick out the user
* @param kickOutUserId the user ID who will be kicked out
*/
StarRtc.StarChatSDK.kickOutUser = function (kickOutUserId)

/**
* Speaking not allowed in the room
* @param banUserId the user ID of who is speaking not allowed
* @param banTime the time duration of speaking not allowed
*/
StarRtc.StarChatSDK.banToSendMsg = function (banUserId, banTime)

/**
* Get the number of online users in the chat room
*/
StarRtc.StarChatSDK.getRoomOnlineNum = function ()

/**
* Delete the current room
*/
StarRtc.StarChatSDK.deleteCurrRoom = function ()

/**
* Join the room
*/
StarRtc.StarChatSDK.joinRoom = function ()

/**
* leave the room
*/
StarRtc.StarChatSDK.leaveRoom = function ()

/**
* Get the disconnect satus:active or passive?
*/
StarRtc.StarChatSDK.activeDisconnect = function ()