Optional logLevel: VerbosityOptional prefix: PrefixFunctionOptional log: anyPrivate #_Private #_Private #_Private #_Optional webRTCMetricsPrivate #attachmentsPrivate #binaryPrivate #connectionPrivate #loggerPrivate #loggerPrivate #notifierPrivate #resetPrivate #roomsPrivate #signPrivate #uploadingPrivate #checkPrivate #createPrivate #emmitPrivate #emmitPrivate #getOptional timeout: numberPrivate #getOptional timeout: numberAdd calendar event
Optional accessif true then user PMI settings will be updated and user will receive SfuEvent.UPDATE_USER_PMI_SETTINGS with UserPmiSettings
Used to change UserSpecificChatInfo.favourite to true
Add a friend
Sends a friend invite. Users will receive SfuEvent.NEW_OUTGOING_FRIEND_INVITE and SfuEvent.NEW_INCOMING_FRIEND_INVITE with NewFriendInvite.
If an invite was sent to this user previously, it will be replaced with a new one. Users will receive SfuEvent.OUTGOING_FRIEND_INVITE_DELETED and SfuEvent.INCOMING_FRIEND_INVITE_DELETED with FriendInviteDeleted for previously invite. Users will receive SfuEvent.NEW_OUTGOING_FRIEND_INVITE and SfuEvent.NEW_INCOMING_FRIEND_INVITE with NewFriendInvite for new friend invite.
If the user that you are trying to add as a friend has already sent you an invite, sending a counter-invite will automatically add you as friends. Users will receive SfuEvent.OUTGOING_FRIEND_INVITE_DELETED and SfuEvent.INCOMING_FRIEND_INVITE_DELETED with FriendInviteDeleted for invites. Users will receive SfuEvent.CONTACT_UPDATED with ContactUpdated if they have mutual space channels or direct chats. Will receive SfuEvent.NEW_CONTACT with NewContact if haven't.
Add a member to chat
Chat members will receive SfuEvent.CHAT_UPDATED with UserSpecificChatInfo
If a direct meeting was started, user will receive SfuEvent.NEW_MEETING with NewMeeting.
Optional encryptedrequired for adding to a secure encrypted chat. chat password encrypted with the member's public key, which must be decrypted using the user's private key.
user will receive SfuEvent.NEW_CHAT with UserSpecificChatInfo.
Add members to thread
Thread members will receive SpaceEvent.ADDED_MEMBERS_TO_THREAD with AddedMembersToThread
New members will receive NEW_SPACE_THREAD with NewSpaceThreadEvent
Add reaction on message in a Direct chat | Channel | Thread
Members will receive SfuEvent.REACTION_ON_MESSAGE_ADDED with AddedRemovedReactionOnMessage
Add space role to member
For space owner/user that has permission to manage roles
Space members will receive SpaceEvent.ADDED_ROLE_TO_MEMBER with AddedRoleToMember
Member who are assigned this role will receive SpaceEvent.NEW_SPACE_CHANNEL with NewSpaceChannelEvent for each channel that has this role in its access rights. Other members of these channels will receive SpaceEvent.SPACE_CHANNEL_UPDATED with SpaceChannelUpdated.
Add space role
For space owner/user that has permission to manage roles
Space members will receive SpaceEvent.NEW_SPACE_ROLE with NewSpaceRoleAdded
On the client side, a new role must be added to the participants listed in the NewSpaceRoleAdded.members
After adding:
User's contacts will see Contact.encryptionEnabled and Contact.publicKey. The remaining information is not used on the server and is only stored; it can be requested using getUserEncryptionInfo.
verificationHash, salt, and iv are optional; the client chooses the private key encryption method.
salt - Cryptographic Salt
iv - Initialization Vector for Encryption
Optional iv?: stringOptional salt?: stringOptional verificationChange user email
Users will receive SfuEvent.CONTACT_UPDATED with changed nickname
Private closeConnects the user to the server.
The user can connect using either a username and password or an authToken.
Once the connection is successful, the state will change to State.AUTHENTICATED. After that, the sfu-sdk will emit the event SfuEvent.CONNECTED.
Optional authThe authentication token for direct login (optional if username and password are provided).
After successfully connection user contacts will receive an SfuEvent.USER_PRESENCE_STATUS_UPDATED with UserPresenceStatusUpdated
Optional binaryOptional details?: ConnectionDetailsOptional device?: stringOptional failedOptional nickname?: stringOptional password?: stringThe user's password (optional if authToken is provided).
Optional pingOptional timeout?: numberOptional username?: stringThe user's username (optional if authToken is provided).
Create channel meeting
Room.id() will be equal channelId
RoomExtended with () that equal ConferenceType.CHANNEL
Create chat
Optional allowedOptional channel?: booleanOptional channelOptional encryptedencrypted key for encrypting attachments.
Optional encryptedan array of chat passwords for each member encrypted with the member's public keys, which must be decrypted using the user's private key.
Optional encryptedthe private key of the chat, encrypted with a chat password, used to decrypt messages
Optional favourite?: booleanOptional id?: stringOptional ismust be true for a Secure Chat
Optional members?: string[]these members will receive SfuEvent.NEW_CHAT with UserSpecificChatInfo
Optional name?: stringOptional publicthe public key of the chat used to encrypt messages
Optional sendOptional type?: ChatTypeCreating a Secure Chat with Encryption:
Create channel meeting
Room.id() will be equal directChatId
RoomExtended with () that equal ConferenceType.DIRECT
Create room
To create with PMI settings, PMI must be specified as the ID.
To join, you need to use room.join.
Optional id?: stringOptional name?: stringOptional pin?: stringRoomExtended with () that equal ConferenceType.GLOBAL
Creating a room based on a calendar event created using addCalendarEvent.
To join, you need to use room.join()
Optional accessCreate space category
For space owner/user that has permission to manage categories
Space members will receive SpaceEvent.NEW_SPACE_CATEGORY with NewSpaceCategoryEvent
Create space channel
For space owner/user that has permission to manage channels
Channel members will receive SpaceEvent.NEW_SPACE_CHANNEL with NewSpaceChannelEvent
Optional categoryOptional members?: string[]used to create a private channel. Array of member ids or empty array.
Optional roles?: string[]used to create a private channel. Array of role ids or empty array.
Create space thread
Thread members will receive SpaceEvent.NEW_SPACE_THREAD with NewSpaceThreadEvent
Delete chat
Chat members will receive SfuEvent.CHAT_DELETED with UserSpecificChatInfo
If a direct meeting was started, it will end, and chat participants will receive MeetingSyncEvent.MEETING_ENDED_SYNC with MeetingEndedSync.
Delete a message in a Direct chat | Channel | Thread
The message body will be changed to an empty string. The Message.status will be changed to MessageState.DELETED
Attachments will be removed.
Members will receive SfuEvent.CHAT_MESSAGE_DELETED with MessageDeleted
Delete space
Space members will receive SpaceEvent.SPACE_DELETED with SpaceDeletedEvent
If channel meetings were started, users will receive MeetingSyncEvent.MEETING_ENDED_SYNC with MeetingEndedSync.
Delete space category
For space owner/category creator/user that has permission to manage categories
Space members will receive SpaceEvent.SPACE_CATEGORY_DELETED with SpaceCategoryDeleted
Delete space channel
Channel members will receive SpaceEvent.SPACE_CHANNEL_DELETED with SpaceChannelDeleted
If the channel meeting was started, members will receive MeetingSyncEvent.MEETING_ENDED_SYNC with MeetingEndedSync.
Delete space role
For space owner/user that has permission to manage roles
Space members will receive SpaceEvent.SPACE_ROLE_DELETED with SpaceRoleDeleted
On the client side, should remove this role from channel's access rights and update channel members list
Delete space thread
For space owner/thread creator
Thread members will receive SpaceEvent.SPACE_THREAD_DELETED with SpaceThreadDeleted
Method to disconnect from the server
When disconnecting, user leaves all active rooms
state changed to DISCONNECTED
After disconnection user contacts will receive an SfuEvent.USER_PRESENCE_STATUS_UPDATED with UserPresenceStatusUpdated
Private downloadEdit a message in a Direct chat | Channel | Thread
Members will receive SfuEvent.CHAT_MESSAGE_EDITED with MessageEdited
Optional attachmentto send a private message
Optional attachmentsto add attachments to sent message
Ensure username available
If the username is not taken, the promise will resolve with void.
If the username is taken, the promise will reject with UserManagementError.USERNAME_ALREADY_IN_USE.
Optional timeout?: numberGenerate space invite
If user has permission to create a space invite - generating invite code with 8 symbols. To create invite link - use 'ws:{serverUrl}:{port}/join-space/inviteCode'
Get total size of attachments
Optional type: AttachmentTypeGet user contacts.
Returns users who are friends or with whom there are mutual space channels or direct chats, incoming and outgoing friend invites, banned users.
Optional timeout?: numberGet first message and last message in entity from MessageTargetEntityType
Load attachment from server
On client side should receive SfuEvent.MESSAGE_ATTACHMENT_STATE with AttachmentStatus to show progress
Get messages count in entity from MessageTargetEntityType
Get handler for send or cancel sending attachments
Can't cancel sent attachment
Get system config (settings)
Used to receive SystemConfig
Get count of unread messages in entity from MessageTargetEntityType
Get chats.
To work with messages in the chat, you need to use MessageTargetEntityType.CHAT
Get user pmi settings
Used for create meetings
Get user spaces
If channel meetings were started, user will receive SfuEvent.USER_MEETINGS with MeetingsPreviewEvent.
Join space by invite code
Space members will receive SpaceEvent.USER_JOINED_TO_SPACE with UserJoinedToSpaceEvent. On the client side, this user should be added to the list of participants in public channels and threads.
If channel meetings were started, user will receive SfuEvent.USER_MEETINGS with MeetingsPreviewEvent.
Leave space
Space members will receive SpaceEvent.USER_LEFT_SPACE with UserLeftSpace
After receiving the event, it is necessary to remove the user from the list of members in the space and channels/threads.
If channel meetings were started, user will receive MeetingSyncEvent.MEETING_ENDED_SYNC with MeetingEndedSync. If the user was a participant in the meeting, users will receive RoomEvent.EVICTED with EvictedFromRoom.
List user attachments
starting point for retrieving a subset of attachments
number of items retrieved and displayed per page
Load meetings history
Used to load the history of global meetings.
The response returns a MeetingsHistoryEvent with the requested items and the total size.
Optional boundaries?: { Optional pageOptional timeOptional limit?: numberLoad messages for Direct chat | Channel | Thread
Optional boundaries?: { to load messages by specifying a particular message using its date, along with the number of messages above and below it. Upper limit includes message with date dateMark.
Optional timeto load by start date to end date. For load all messages used with start = 0, end = -1.
Optional limit?: numberOptional boundaries?: { Optional chatOptional timeOptional limit?: numberMark message as read in a Direct chat | Channel | Thread
In targetEntity will change lastReadMessageId and lastReadMessageDate
All unread messages with a Message.date earlier than or equal to the marked one will be marked as read. The sender of each message will receive SfuEvent.UPDATE_MESSAGES_DELIVERY_STATUS with UpdateMessagesDeliveryStatusEvent and Message.deliveryStatus will be changed at the server side to DeliveryStatus.READ.
Mark message as unread in a Direct chat | Channel | Thread
In targetEntity will change lastReadMessageId and lastReadMessageDate. Message.deliveryStatus
Message.deliveryStatus will not be changed at the server side. Senders will not receive events, however if the previous lastReadMessageDate is earlier than the updated value, the senders of those messages will receive SfuEvent.UPDATE_MESSAGES_DELIVERY_STATUS with UpdateMessagesDeliveryStatusEvent and Message.deliveryStatus will be changed at the server side to DeliveryStatus.READ.
Move space channel
Channel members will receive SpaceEvent.SPACE_CHANNEL_MOVED with SpaceChannelMoved
Specify the identifier of the category to which you want to move the channel, or an empty string to leave the channel uncategorized.
Mute channel
Optional mute– the duration for which the sound is muted. The final event will contain MuteSettings.mutedUntil, which is the current time plus the specified duration.
Optional muted– indicates whether the sound is muted indefinitely.
Returns ChannelMuted, and other connected devices will also receive this event for synchronization.
Mute chat
Optional mute– the duration for which the sound is muted. The final event will contain MuteSettings.mutedUntil, which is the current time plus the specified duration.
Optional muted– indicates whether the sound is muted indefinitely.
Returns ChatMuted, and other connected devices will also receive this event for synchronization.
Mute space
Optional mute– the duration for which the sound is muted. The final event will contain MuteSettings.mutedUntil, which is the current time plus the specified duration.
Optional muted– indicates whether the sound is muted indefinitely.
Returns SpaceMuted, and other connected devices will also receive this event for synchronization.
Mute thread
Optional mute– the duration for which the sound is muted. The final event will contain MuteSettings.mutedUntil, which is the current time plus the specified duration.
Optional muted– indicates whether the sound is muted indefinitely.
Returns ThreadMuted, and other connected devices will also receive this event for synchronization.
Reject friend invite
Promise will resolve with SfuEvent.INCOMING_FRIEND_INVITE_DELETED with FriendInviteDeleted. Outgoing friend invite will not delete.
Used to change UserSpecificChatInfo.favourite to false
Remove friend
Users will receive SfuEvent.CONTACT_UPDATED with ContactUpdated if they have mutual space channels or direct chats. Will receive SfuEvent.CONTACT_DELETED with ContactDeleted if haven't.
Removes the meeting recording (video).
The right to remove is granted to the following roles: In global meetings – the meeting owner In channel meetings – the space owner In group direct chats – the chat creator In personal direct chats – no one
Users will receive MeetingRecordDeleted for global meetings and MessageEdited for others, because it's system message
Optional meetingOptional spaceRemove a member to chat
Chat members will receive SfuEvent.CHAT_UPDATED with UserSpecificChatInfo
If a direct meeting was started and user was , user will receive MeetingSyncEvent.MEETING_ENDED_SYNC with MeetingEndedSync. If the user was a participant in the meeting, users will receive RoomEvent.EVICTED with EvictedFromRoom.
user will receive SfuEvent.CHAT_DELETED with UserSpecificChatInfo.
Remove member from thread
For space owner/thread creator only
Thread members will receive SpaceEvent.REMOVED_MEMBER_FROM_THREAD with RemovedMemberFromThread
The removed member will receive SpaceEvent.SPACE_THREAD_DELETED with SpaceThreadDeleted
Remove reaction on message in a Direct chat | Channel | Thread
Members will receive SfuEvent.REACTION_ON_MESSAGE_REMOVED with AddedRemovedReactionOnMessage
Remove space role from member
For space owner/user that has permission to manage roles
Space members will receive SpaceEvent.REMOVED_ROLE_FROM_MEMBER with RemovedRoleFromMember
Participant from whom this role will be removed will receive SpaceEvent.SPACE_CHANNEL_DELETED with SpaceChannelDeleted for each channel they were part of because of this role. Other members of these channels will receive SpaceEvent.SPACE_CHANNEL_UPDATED with SpaceChannelUpdated.
Update chat
Chat members will receive SfuEvent.CHAT_UPDATED with UserSpecificChatInfo
Reset password
When calls, returns ResetPasswordHandler then need to call ResetPasswordHandler.resetPassword to reset the password
Optional timeout?: numberRevoke friend invite
Users will receive SfuEvent.OUTGOING_FRIEND_INVITE_DELETED and SfuEvent.INCOMING_FRIEND_INVITE_DELETED with FriendInviteDeleted.
Removing the space invite
Check and get an available room.
To join, you need to use room.join()
Optional nickname?: stringOptional pin?: stringOptional attachmentsOptional boundaries?: { Optional chatOptional from?: stringOptional searchOptional timeOptional limit?: numberSend a message to a Direct chat | Channel | Thread
Members will receive SfuEvent.MESSAGE with Message
Optional attachments?: MessageAttachment[]Optional body?: stringOptional parentto send reply message
Optional to?: stringto send a private message
Sign up for new users
Works in a separate connection
Optional timeout?: numberUnmute channel
SfuSpaceChannel.muteSettings wil be null - that means the channel is not muted.
Returns ChannelUnmuted, and other connected devices will also receive this event for synchronization.
Unmute chat
UserSpecificChatInfo.muteSettings wil be null - that means the chat is not muted.
Returns ChatUnmuted, and other connected devices will also receive this event for synchronization.
Unmute space
SfuSpace.muteSettings wil be null - that means the space is not muted.
Returns SpaceUnmuted, and other connected devices will also receive this event for synchronization.
Unmute thread
SfuSpaceThread.muteSettings wil be null - that means the thread is not muted.
Returns ThreadUnmuted, and other connected devices will also receive this event for synchronization.
Update user activity
Working with selected PresenceStatus.ONLINE by updatePresenceStatus. Does not work with other statuses.
The user client that called this method will receive UserInfoChangedEvent with PresenceStatus.ONLINE or PresenceStatus.IDLE. Other user clients will not receive events.
{@param isActive} = false: If the user hasn't other connected active clients then user contacts will receive UserPresenceStatusUpdated with PresenceStatus.IDLE. If the user has other connected active clients then user contacts will not receive events.
{@param isActive} = true: If all user clients was inactive then user contacts will receive UserPresenceStatusUpdated with PresenceStatus.ONLINE. If the user has at least one active connected client, then the contacts will not receive any events.
Update calendar event
Optional accessif true then user PMI settings will be updated and user will receive SfuEvent.UPDATE_USER_PMI_SETTINGS with UserPmiSettings
Update channel notification settings
Used to modify and store channel notification settings specified in SfuSpaceChannel.notificationSettings.
Returns ChannelNotificationSettingsUpdated, and other connected devices will also receive this event for synchronization.
Optional allowedOptional channelOptional sendOptional type?: ChatTypeUsed to change UserSpecificChatInfo.hidden
Update chat icon
Used to update direct chat icon.
Chat members will receive ChatIconUpdated with ChatIconUpdated.icon as download url.
Returns download url or null if removed.
Optional icon?: FileOptional remove?: booleanPrivate updateUpdate chat notification settings
Used to modify and store chat notification settings specified in UserSpecificChatInfo.notificationSettings.
Returns ChatNotificationSettingsUpdated, and other connected devices will also receive this event for synchronization.
Update contact volume
Used to change and store the contact's volume in meetings.
whole number
Returns ContactPersonalSettings, and other connected devices will receive ContactPersonalSettingsUpdated for synchronization.
Update presence status
Friends and users with whom there are mutual space channels or direct chats will receive SfuEvent.USER_PRESENCE_STATUS_UPDATED with UserPresenceStatusUpdated. The selected status is saved and will persist across subsequent connects. It can be retrieved using the getUserInfo.
Delete space category
For space owner/category creator/user that has permission to manage categories
Space members will receive SpaceEvent.SPACE_CATEGORY_UPDATED with SpaceCategoryUpdated
Update space channel
For space owner/user that has permission to manage channels
Channel members will receive SpaceEvent.SPACE_CHANNEL_UPDATED with SpaceChannelUpdated In the private channel added members will receive SpaceEvent.NEW_SPACE_CHANNEL with NewSpaceChannelEvent. If the channel meeting was started, added members will receive SfuEvent.NEW_MEETING with NewMeeting.
In the private channel deleted members will receive SpaceEvent.SPACE_CHANNEL_DELETED with SpaceChannelDeleted If the channel meeting was started, deleted members will receive MeetingSyncEvent.MEETING_ENDED_SYNC with MeetingEndedSync. If the deleted user was a participant in the meeting, users will receive RoomEvent.EVICTED with EvictedFromRoom.
Optional members?: string[]used to create a private channel. Array of member ids or empty array.
Optional roles?: string[]used to create a private channel. Array of role ids or empty array.
Update space icon
Used to update space icon.
Space members will receive SpaceOverviewUpdated with SpaceOverviewUpdated.icon as download url.
Returns download url or null if removed.
Optional icon?: FileOptional remove?: booleanPrivate updateUpdate nickname in the space Updates a user's nickname in the space.
A custom nickname, if set, takes precedence over the user's global nickname. If no custom nickname is provided (or an empty string is passed), the user's global nickname must be displayed.
To remove a previously set the custom nickname and revert to the global one, pass an empty string.
Optional userOptional. The ID of the user whose nickname is being updated. If this field is omitted or set to the caller's own ID, the caller's nickname is updated. The space owner can update anyone's nickname by specifying user ID. If a non-owner attempts to update another user's nickname, a SpaceError.UPDATE_NICKNAME_ACCESS_RIGHTS_ERROR is thrown. All space members receive a SpaceEvent.USER_SPACE_NICKNAME_UPDATED event with a UserSpaceNicknameUpdated payload when the nickname is updated.
Update space notification settings
Used to modify and store space notification settings specified in SfuSpace.notificationSettings.
Returns SpaceNotificationSettingsUpdated, and other connected devices will also receive this event for synchronization.
Update space overview
Space members will receive SpaceEvent.SPACE_OVERVIEW_UPDATED with SpaceOverviewUpdated
Update space role
For space owner/user that has permission to manage roles
Space members will receive SpaceEvent.SPACE_ROLE_UPDATED with SpaceRoleUpdated
On the client side, a new role must be added to the participants listed in the SpaceRoleUpdated.membersForAddRole and must be removed from participants listed in the SpaceRoleUpdated.membersForDeleteRole
Participants from whom this role will be removed will receive SpaceEvent.SPACE_CHANNEL_DELETED with SpaceChannelDeleted for each channel they were part of because of this role.
Participants who are assigned this role will receive SpaceEvent.NEW_SPACE_CHANNEL with NewSpaceChannelEvent for each channel that has this role in its access rights.
Participants who had the role before the update and still have it afterward will receive SpaceEvent.SPACE_CHANNEL_UPDATED with SpaceChannelUpdated for each channel that has this role in its access rights.
Update space thread
For space owner/thread creator
Thread members will receive SpaceEvent.SPACE_THREAD_UPDATED with SpaceThreadUpdated
Update thread notification settings
Used to modify and store thread notification settings specified in SfuSpaceThread.notificationSettings.
Returns ThreadNotificationSettingsUpdated, and other connected devices will also receive this event for synchronization.
Update user avatar
Used to update user avatar.
User will receive UserInfoChangedEvent and ContactUpdated with self. User's contacts will receive ContactUpdated
Returns download url or null if removed.
Optional icon?: FileOptional remove?: booleanPrivate updateUpdate user pmi settings
Optional webRTCMetricsStatic fromUTF8Static generateStatic str
Accept friend invite
Users will receive SfuEvent.OUTGOING_FRIEND_INVITE_DELETED and SfuEvent.INCOMING_FRIEND_INVITE_DELETED with FriendInviteDeleted for invites. Users will receive SfuEvent.CONTACT_UPDATED with ContactUpdated if they have mutual space channels or direct chats. Will receive SfuEvent.NEW_CONTACT with NewContact if haven't.