Realtime Signaling (RTS) is a lightweight and high-reliable message transmission service developed on the low-latency and high-concurrency global real-time message system architecture.
The RTS SDK can be integrated to implement high-concurrency, low-latency, and stable message transmission channels. Interworking with the audio/video interaction SDK, RTS can help developers to create service scenarios, including interactive teaching, voice chatroom, video live streaming, and calling.
The code of the RTS SDK specific to Jocloud mobile terminals is Hummer
.
API | Function |
---|---|
init | Initialize Hummer and start listening to Hummer status change |
login | Log in an SDK |
getService | Get the service instance |
logout | Log out an SDK |
getState | Get the current status of HummerSDK |
getVersion | Get SDK version information |
refreshToken | Refresh a user token |
setLoggerFilePath | Set a log saving path. The caller should ensure that the path is valid. |
setLogLevel | Set log level |
setLogCallback | Set the log output callback |
uploadLogsManually | Report logs manually |
Callback | Function |
---|---|
onHummerStateChanged | Callback of SDK status change |
onHummerKicked | SDK callback method for removing users when login through multiple ends is detected |
onHummerPreviousTokenExpired | Callback of a user token expired |
onHmrLogWithLevel | Log otput callback |
API | Function |
---|---|
queryUserOnlineStatus | Batch search of user online status for indicating the status of specific users |
sendMessage | Send P2P signaling messages |
addEventListener | Add listeners for signaling messages |
removeEventListener | Remove listeners for signaling messages |
Callback | Function |
---|---|
onPeerMessageReceived | You will receive a notification callback of this event upon the receipt of P2P signaling messages |
API | Function |
---|---|
queryMemberCounts | Batch search of member counts |
setRoomAttributes | Set room profiles |
addOrUpdateRoomAttributes | Update profiles of specific rooms |
deleteRoomAttributes | Delete specific profiles of specific rooms |
clearRoomAttributes | Clear profiles of specific rooms |
queryRoomAttributes:ByKeys | Search specific profiles of specific rooms |
queryRoomAttributes | Search all profiles of specific rooms |
sendMessage | Send room messages |
addRoomEventListener | Add listeners for Room |
removeRoomEventListener | Remove listeners for Room |
Callback | Function |
---|---|
onRoomMessageReceived | Notification received by room members when a user sends signaling messages to this room |
onRoomAttributesSet | Notification of setting room profiles |
onRoomAttributesAddedOrUpdated | Notification of adding or updating room profiles |
onRoomAttributesDeleted | Notification of deleting room profiles |
onRoomAttributesCleared | Notification of clearing room profiles |
API | Function |
---|---|
join | Join a room |
leave | Exit a room |
queryMembers | Search a member list of a specific room |
setMemberAttributes | Set user profiles in the current room |
addOrUpdateMemberAttributes | Add or update user profiles in the current room |
deleteMemberAttributes | Delete specific user profiles in the current room |
clearMemberAttributes | Clear all user profiles in the room |
queryMemberAttributesByKeys | Search specific user profiles in the current room |
queryMemberAttributtes | Search all user profiles in the current room |
addMemberEventListener | Add listeners for Member |
removeMemberEventListener | Remove listeners for Member |
Callback | Function |
---|---|
onRoomMemberJoined | Notification of members joined the room |
onRoomMemberLeft | Notification of members exited the room |
onRoomMemberOffline | Notification of the current user exited the room due to disconnection timeout |
onRoomMemberCountChanged | Notification of member count changed |
onRoomMemberAttributesSet | Callback notification of setting room member information |
onRoomMemberAttributesAddedOrUpdated | Callback notification of adding or updating room member information |
onRoomMemberAttributesDeleted | Callback notification of deleting room member information |
onRoomMemberAttributesCleared | Callback notification of clearing room member information |