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 chat room, video live streaming, and calling.
The code of the RTS SDK specific to Jocloud mobile terminals is Hummer
.
The Hummer An instance provides the SDK initial login and configuration. Create an RtsClient instance by calling creatRTSInstance.
The RtsClient An instance provides capabilities of sending P2P messages and searching user online statuses. Create an RtsRoom instance by calling creatRoom.
The RtsRoom An instance provides API capabilities of managing rooms and room members.
npm package release path: https://www.npmjs.com/package/hummer-rts-sdk
API | Function |
---|---|
VERSION | Get SDK version information |
getState | Get the current status of HummerSDK |
createHummer | Initialize Hummer |
login | Log in an SDK |
logout | Log out an SDK |
refreshToken | Refresh a user token |
Listening Event | Function |
---|---|
ConnectionStateChanged | Callback of SDK status change |
TokenExpired | Callback of a user token expired |
API | Function |
---|---|
createRTSInstance | Create an instance and initialize |
queryUsersOnlineStatus | Batch search of user online status for indicating the status of specific users |
sendMessageToUser | Send P2P signaling messages |
Listening Event | Function |
---|---|
MessageFromUser | You will receive a notification callback of this event upon the receipt of P2P signaling messages. |
API | Function |
---|---|
getRoomMemberCount | Batch search of the number of room members |
setRoomAttributes | Set room profiles |
addOrUpdateRoomAttributes | Add or update profiles of specific rooms |
deleteRoomAttributes | Delete specific profiles of specific rooms |
clearRoomAttributes | Clear profiles of specific rooms |
getRoomAttributesByKeys | Search specific profiles of specific rooms |
getRoomAttributes | Search all profiles of specific rooms |
sendMessage | Send room messages |
Listening Event | Function |
---|---|
RoomMessage | Notification received by room members when a user sends signaling messages to this room |
RoomAttributesSet | Notification of setting room profiles |
RoomAttributesAddedOrUpdated | Notification of adding or updating room profiles |
RoomAttributesDeleted | Notification of deleting room profiles |
RoomAttributesCleared | Notification of clearing room profiles |
API | Function |
---|---|
creatRoom | Create an instance and initialize |
join | Join a room |
leave | Exit a room |
getMembers | Search a member list of a specific room |
setUserAttributes | Set profiles of the current user in the current room |
addOrUpdateUserAttributes | Add or update user profiles in the current room |
deleteUserAttributes | Delete specific user profiles in the current room |
clearUserAttributes | Clear all user profiles in the room |
getUserAttributtesByKeys | Search specific user profiles in the current room |
getUserAttributtes | Search all user profiles in the current room |
Listening Event | Function |
---|---|
MemberJoined | Notification of member joining the room |
MemberLeft | Notification of member exiting the room |
RoomMemberOffline | Notification of the current user leaving the room due to disconnection timeout |
MemberCountUpdated | Notification of number change of room members |
MemberAttributesSet | Callback notification of setting room member profiles |
MemberAttributesAddedOrUpdated | Callback notification of adding or updating room member profiles |
RoomAttributesDeleted | Callback notification of deleting room member profiles |
MemberAttributesCleared | Callback notification of clearing room member profiles |