@flashphoner/sfusdk 2.0.302 → 2.0.306
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.version +1 -1
- package/dist/sdk/constants.d.ts +110 -2
- package/dist/sdk/constants.js +45 -1
- package/dist/sdk/constants.js.map +1 -1
- package/dist/sdk/sfu-extended.d.ts +159 -6
- package/dist/sdk/sfu-extended.js +301 -4
- package/dist/sdk/sfu-extended.js.map +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/sfu_extended.SfuExtended.html +144 -86
- package/docs/enums/constants.AttachmentState.html +2 -2
- package/docs/enums/constants.AuthenticationStatus.html +2 -2
- package/docs/enums/constants.ChannelSendPolicy.html +2 -2
- package/docs/enums/constants.ChatError.html +2 -2
- package/docs/enums/constants.ChatReceivePolicy.html +2 -2
- package/docs/enums/constants.ChatSectionsError.html +2 -2
- package/docs/enums/constants.ChatType.html +2 -2
- package/docs/enums/constants.ConferenceType.html +2 -2
- package/docs/enums/constants.ConnectionError.html +2 -2
- package/docs/enums/constants.ConnectionType.html +2 -2
- package/docs/enums/constants.ContactError.html +2 -2
- package/docs/enums/constants.DeliveryStatus.html +2 -2
- package/docs/enums/constants.ExamplesError.html +2 -2
- package/docs/enums/constants.ExamplesEvent.html +2 -2
- package/docs/enums/constants.InternalApi.html +14 -2
- package/docs/enums/constants.MeetingSyncEvent.html +10 -10
- package/docs/enums/constants.MessageAttachmentMediaType.html +2 -2
- package/docs/enums/constants.MessageAttachmentType.html +2 -2
- package/docs/enums/constants.MessageState.html +2 -2
- package/docs/enums/constants.MessageTargetEntityType.html +2 -2
- package/docs/enums/constants.NotificationMode.html +5 -0
- package/docs/enums/constants.Operations.html +2 -2
- package/docs/enums/constants.ParticipantRole.html +2 -2
- package/docs/enums/constants.PresenceStatus.html +2 -2
- package/docs/enums/constants.RemoteSdpType.html +2 -2
- package/docs/enums/constants.RoomError.html +2 -2
- package/docs/enums/constants.RoomEvent.html +43 -43
- package/docs/enums/constants.RoomState.html +2 -2
- package/docs/enums/constants.SfuEvent.html +47 -41
- package/docs/enums/constants.SortOrder.html +2 -2
- package/docs/enums/constants.SpaceError.html +3 -2
- package/docs/enums/constants.SpaceEvent.html +47 -29
- package/docs/enums/constants.State.html +2 -2
- package/docs/enums/constants.StatsType.html +2 -2
- package/docs/enums/constants.TrackType.html +2 -2
- package/docs/enums/constants.UserInfoError.html +2 -2
- package/docs/enums/constants.UserManagementError.html +2 -2
- package/docs/modules/constants.html +14 -0
- package/docs/types/constants.AddRemoveTracks.html +1 -1
- package/docs/types/constants.AddRemoveTracksSync.html +1 -1
- package/docs/types/constants.AddedMembersToThread.html +1 -1
- package/docs/types/constants.AddedRemovedReactionOnMessage.html +1 -1
- package/docs/types/constants.AddedRoleToMember.html +1 -1
- package/docs/types/constants.Attachment.html +1 -1
- package/docs/types/constants.AttachmentInfo.html +1 -1
- package/docs/types/constants.AttachmentRequest.html +1 -1
- package/docs/types/constants.AttachmentRequestAck.html +1 -1
- package/docs/types/constants.AttachmentStatus.html +1 -1
- package/docs/types/constants.AttachmentStatusEvent.html +1 -1
- package/docs/types/constants.AuthenticationStatusEvent.html +1 -1
- package/docs/types/constants.BannedContact.html +1 -1
- package/docs/types/constants.BitrateTestStatus.html +1 -1
- package/docs/types/constants.BooleanEvent.html +1 -1
- package/docs/types/constants.Calendar.html +1 -1
- package/docs/types/constants.CalendarEvent.html +1 -1
- package/docs/types/constants.CalendarEventEvent.html +1 -1
- package/docs/types/constants.ChannelMuted.html +1 -0
- package/docs/types/constants.ChannelNotificationSettingsUpdated.html +1 -0
- package/docs/types/constants.ChannelUnmuted.html +1 -0
- package/docs/types/constants.Chat.html +1 -1
- package/docs/types/constants.ChatLoadedEvent.html +1 -1
- package/docs/types/constants.ChatMap.html +1 -1
- package/docs/types/constants.ChatMessagesCount.html +1 -1
- package/docs/types/constants.ChatMessagesEvent.html +1 -1
- package/docs/types/constants.ChatMuted.html +1 -0
- package/docs/types/constants.ChatNotificationSettingsUpdated.html +1 -0
- package/docs/types/constants.ChatSearchResultEvent.html +1 -1
- package/docs/types/constants.ChatUnmuted.html +1 -0
- package/docs/types/constants.ChatsEvent.html +1 -1
- package/docs/types/constants.ConnectionDetails.html +1 -1
- package/docs/types/constants.ConnectionFailedEvent.html +1 -1
- package/docs/types/constants.Contact.html +1 -1
- package/docs/types/constants.ContactDeleted.html +1 -1
- package/docs/types/constants.ContactUpdated.html +1 -1
- package/docs/types/constants.ControlMessage.html +1 -1
- package/docs/types/constants.ControlMessageEvent.html +1 -1
- package/docs/types/constants.CreatedRoom.html +1 -1
- package/docs/types/constants.EvictedFromRoom.html +1 -1
- package/docs/types/constants.EvictedSync.html +1 -1
- package/docs/types/constants.ExamplesUser.html +1 -1
- package/docs/types/constants.ExamplesUserEvent.html +1 -1
- package/docs/types/constants.FirstAndLastChatMessage.html +1 -1
- package/docs/types/constants.ForcefullyLeftEvent.html +1 -1
- package/docs/types/constants.FragmentedMessage.html +1 -1
- package/docs/types/constants.FriendInvite.html +1 -1
- package/docs/types/constants.FriendInviteDeleted.html +1 -1
- package/docs/types/constants.InternalMessage.html +1 -1
- package/docs/types/constants.JoinedRoom.html +1 -1
- package/docs/types/constants.JoinedRoomSync.html +1 -1
- package/docs/types/constants.LastReadMessageUpdate.html +1 -1
- package/docs/types/constants.LastReadMessageUpdated.html +1 -1
- package/docs/types/constants.LeftMeetingSync.html +1 -1
- package/docs/types/constants.LeftRoom.html +1 -1
- package/docs/types/constants.LoadMessagesWithMentionsResult.html +1 -1
- package/docs/types/constants.MeetingEndedSync.html +1 -1
- package/docs/types/constants.MeetingNameUpdatedSync.html +1 -1
- package/docs/types/constants.MeetingsPreviewEvent.html +1 -1
- package/docs/types/constants.Message.html +1 -1
- package/docs/types/constants.MessageAttachment.html +1 -1
- package/docs/types/constants.MessageAttachmentData.html +1 -1
- package/docs/types/constants.MessageAttachmentsSearchResult.html +1 -1
- package/docs/types/constants.MessageDeleted.html +1 -1
- package/docs/types/constants.MessageDeliveryStatus.html +1 -1
- package/docs/types/constants.MessageEdited.html +1 -1
- package/docs/types/constants.MessageInfo.html +1 -1
- package/docs/types/constants.MessageReaction.html +1 -1
- package/docs/types/constants.MessageStatus.html +1 -1
- package/docs/types/constants.MessageStatusEvent.html +1 -1
- package/docs/types/constants.MessageStatusUpdate.html +1 -1
- package/docs/types/constants.MessageTargetEntityId.html +1 -1
- package/docs/types/constants.MessageWithUploadingAttachments.html +1 -1
- package/docs/types/constants.MuteSettings.html +1 -0
- package/docs/types/constants.NewChatEvent.html +1 -1
- package/docs/types/constants.NewContact.html +1 -1
- package/docs/types/constants.NewFriendInvite.html +1 -1
- package/docs/types/constants.NewMeeting.html +1 -1
- package/docs/types/constants.NewSpaceCategoryEvent.html +1 -1
- package/docs/types/constants.NewSpaceChannelEvent.html +1 -1
- package/docs/types/constants.NewSpaceEvent.html +1 -1
- package/docs/types/constants.NewSpaceRoleAdded.html +1 -1
- package/docs/types/constants.NewSpaceThreadEvent.html +1 -1
- package/docs/types/constants.OperationFailed.html +1 -1
- package/docs/types/constants.OperationFailedEvent.html +1 -1
- package/docs/types/constants.Participant.html +1 -1
- package/docs/types/constants.ParticipantAVSMutedEvent.html +1 -1
- package/docs/types/constants.ParticipantConfigEvent.html +1 -1
- package/docs/types/constants.ParticipantRenamed.html +1 -1
- package/docs/types/constants.ParticipantsListEvent.html +1 -1
- package/docs/types/constants.ParticipantsListSyncEvent.html +1 -1
- package/docs/types/constants.PlacedInLobbyEvent.html +1 -1
- package/docs/types/constants.PlacedInWaitingRoomEvent.html +1 -1
- package/docs/types/constants.PublicChannelsEvent.html +1 -1
- package/docs/types/constants.Quality.html +1 -1
- package/docs/types/constants.RemoteSdp.html +1 -1
- package/docs/types/constants.RemoteSdpInfo.html +1 -1
- package/docs/types/constants.RemovedChatEvent.html +1 -1
- package/docs/types/constants.RemovedMemberFromThread.html +1 -1
- package/docs/types/constants.RemovedRoleFromMember.html +1 -1
- package/docs/types/constants.ResetPasswordRequestStatus.html +1 -1
- package/docs/types/constants.RoleAssigned.html +1 -1
- package/docs/types/constants.RolePermissionSectionsEvent.html +1 -1
- package/docs/types/constants.RolesListEvent.html +1 -1
- package/docs/types/constants.RoomAvailable.html +1 -1
- package/docs/types/constants.RoomConfigEvent.html +1 -1
- package/docs/types/constants.RoomExtendedConfig.html +1 -1
- package/docs/types/constants.RoomExtendedParticipantConfig.html +1 -1
- package/docs/types/constants.RoomExtendedParticipantsConfig.html +1 -1
- package/docs/types/constants.RoomExtendedScreenSharingConfig.html +1 -1
- package/docs/types/constants.RoomInfo.html +1 -1
- package/docs/types/constants.RoomMessage.html +1 -1
- package/docs/types/constants.RoomNameUpdated.html +1 -1
- package/docs/types/constants.RoomScreenSharingConfigEvent.html +1 -1
- package/docs/types/constants.SFUMeetingParticipantPreview.html +1 -1
- package/docs/types/constants.SFUMeetingPreview.html +1 -1
- package/docs/types/constants.SfuMessageEvent.html +1 -1
- package/docs/types/constants.SfuSpace.html +1 -1
- package/docs/types/constants.SfuSpaceCategory.html +1 -1
- package/docs/types/constants.SfuSpaceChannel.html +1 -1
- package/docs/types/constants.SfuSpaceChannelAccessRights.html +1 -1
- package/docs/types/constants.SfuSpaceInvite.html +1 -1
- package/docs/types/constants.SfuSpaceMember.html +1 -1
- package/docs/types/constants.SfuSpaceRole.html +1 -1
- package/docs/types/constants.SfuSpaceRolePermission.html +1 -1
- package/docs/types/constants.SfuSpaceRolePermissionSection.html +1 -1
- package/docs/types/constants.SfuSpaceThread.html +1 -1
- package/docs/types/constants.SfuSpaceUserBan.html +1 -1
- package/docs/types/constants.SignUpStatus.html +1 -1
- package/docs/types/constants.SpaceCategoryDeleted.html +1 -1
- package/docs/types/constants.SpaceCategoryUpdated.html +1 -1
- package/docs/types/constants.SpaceChannelDeleted.html +1 -1
- package/docs/types/constants.SpaceChannelMoved.html +1 -1
- package/docs/types/constants.SpaceChannelUpdated.html +1 -1
- package/docs/types/constants.SpaceCreatedEvent.html +1 -1
- package/docs/types/constants.SpaceDeletedEvent.html +1 -1
- package/docs/types/constants.SpaceInviteCreated.html +1 -1
- package/docs/types/constants.SpaceInviteRevoked.html +1 -1
- package/docs/types/constants.SpaceMuted.html +1 -0
- package/docs/types/constants.SpaceNotificationSettingsUpdated.html +1 -0
- package/docs/types/constants.SpaceOverviewUpdated.html +1 -1
- package/docs/types/constants.SpaceRoleDeleted.html +1 -1
- package/docs/types/constants.SpaceRoleUpdated.html +1 -1
- package/docs/types/constants.SpaceThreadDeleted.html +1 -1
- package/docs/types/constants.SpaceThreadUpdated.html +1 -1
- package/docs/types/constants.SpaceUnmuted.html +1 -0
- package/docs/types/constants.StopScreenSharingEvent.html +1 -1
- package/docs/types/constants.StopTrackEvent.html +1 -1
- package/docs/types/constants.ThreadMuted.html +1 -0
- package/docs/types/constants.ThreadNotificationSettingsUpdated.html +1 -0
- package/docs/types/constants.ThreadUnmuted.html +1 -0
- package/docs/types/constants.TracksQualityState.html +1 -1
- package/docs/types/constants.UnreadMessagesCountEvent.html +1 -1
- package/docs/types/constants.UnreadMessagesCountUpdate.html +1 -1
- package/docs/types/constants.UpdateChatEvent.html +1 -1
- package/docs/types/constants.UpdateMessagesDeliveryStatusEvent.html +1 -1
- package/docs/types/constants.UploadingAttachmentInfo.html +1 -1
- package/docs/types/constants.UserCalendarEvent.html +1 -1
- package/docs/types/constants.UserChatEncryptedPassword.html +1 -1
- package/docs/types/constants.UserContacts.html +1 -1
- package/docs/types/constants.UserContactsEvent.html +1 -1
- package/docs/types/constants.UserEmail.html +1 -1
- package/docs/types/constants.UserEncryptionInfo.html +1 -1
- package/docs/types/constants.UserEncryptionInfoEvent.html +1 -1
- package/docs/types/constants.UserHostKey.html +1 -1
- package/docs/types/constants.UserHostKeyChangedEvent.html +1 -1
- package/docs/types/constants.UserId.html +1 -1
- package/docs/types/constants.UserInfo.html +1 -1
- package/docs/types/constants.UserInfoChangedEvent.html +1 -1
- package/docs/types/constants.UserInfoEvent.html +1 -1
- package/docs/types/constants.UserJoinedToSpaceEvent.html +1 -1
- package/docs/types/constants.UserLeftSpace.html +1 -1
- package/docs/types/constants.UserNickname.html +1 -1
- package/docs/types/constants.UserNicknameChangedEvent.html +1 -1
- package/docs/types/constants.UserPassword.html +1 -1
- package/docs/types/constants.UserPhoneNumber.html +1 -1
- package/docs/types/constants.UserPhoneNumberChangedEvent.html +1 -1
- package/docs/types/constants.UserPmiSettings.html +1 -1
- package/docs/types/constants.UserPresenceStatusUpdated.html +1 -1
- package/docs/types/constants.UserRoomsEvent.html +1 -1
- package/docs/types/constants.UserSpaceNicknameUpdated.html +1 -1
- package/docs/types/constants.UserSpacesEvent.html +1 -1
- package/docs/types/constants.UserSpecificChatInfo.html +1 -1
- package/docs/types/constants.UserTimezone.html +1 -1
- package/docs/types/constants.UserTimezoneChangedEvent.html +1 -1
- package/docs/types/constants.WaitingListEvent.html +1 -1
- package/docs/types/constants.WaitingParticipant.html +1 -1
- package/docs/types/constants.WaitingRoomUpdate.html +1 -1
- package/docs/types/sfu_extended.EventUnion.html +1 -1
- package/docs/types/sfu_extended.NotifyUnion.html +1 -1
- package/docs/variables/constants.ATTACHMENT_CHUNK_SIZE.html +1 -1
- package/docs/variables/constants.ATTACHMENT_ID_LENGTH.html +1 -1
- package/docs/variables/constants.WS_CONNECTION_TIMEOUT.html +1 -1
- package/docs/variables/constants.WS_PINGS_MISSING_THRESHOLD.html +1 -1
- package/docs/variables/constants.WS_PING_INTERVAL_MS.html +1 -1
- package/package.json +1 -1
package/dist/sdk/sfu-extended.js
CHANGED
|
@@ -1336,6 +1336,58 @@ class SfuExtended {
|
|
|
1336
1336
|
});
|
|
1337
1337
|
}
|
|
1338
1338
|
;
|
|
1339
|
+
/**
|
|
1340
|
+
* Update chat notification settings
|
|
1341
|
+
*
|
|
1342
|
+
* Used to modify and store chat notification settings specified in {@link UserSpecificChatInfo.notificationSettings}.
|
|
1343
|
+
*
|
|
1344
|
+
* Returns {@link ChatNotificationSettingsUpdated}, and other connected devices will also receive this event for synchronization.
|
|
1345
|
+
*/
|
|
1346
|
+
updateChatNotificationSettings(options) {
|
|
1347
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1348
|
+
const self = this;
|
|
1349
|
+
return new Promise(function (resolve, reject) {
|
|
1350
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_CHAT_NOTIFICATION_SETTINGS, {
|
|
1351
|
+
id: options.id,
|
|
1352
|
+
value: options.value
|
|
1353
|
+
}, resolve, reject);
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
/**
|
|
1357
|
+
* Mute chat
|
|
1358
|
+
*
|
|
1359
|
+
* @param options.muteTime – the duration for which the sound is muted. The final event will contain {@link MuteSettings.mutedUntil}, which is the current time plus the specified duration.
|
|
1360
|
+
* @param options.mutedIndefinitely – indicates whether the sound is muted indefinitely.
|
|
1361
|
+
*
|
|
1362
|
+
* Returns {@link ChatMuted}, and other connected devices will also receive this event for synchronization.
|
|
1363
|
+
*/
|
|
1364
|
+
muteChat(options) {
|
|
1365
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1366
|
+
const self = this;
|
|
1367
|
+
return new Promise(function (resolve, reject) {
|
|
1368
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.MUTE_CHAT, {
|
|
1369
|
+
id: options.id,
|
|
1370
|
+
muteTime: options.muteTime,
|
|
1371
|
+
mutedIndefinitely: options.mutedIndefinitely
|
|
1372
|
+
}, resolve, reject);
|
|
1373
|
+
});
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Unmute chat
|
|
1377
|
+
*
|
|
1378
|
+
* {@link UserSpecificChatInfo.muteSettings} wil be null - that means the chat is not muted.
|
|
1379
|
+
*
|
|
1380
|
+
* Returns {@link ChatUnmuted}, and other connected devices will also receive this event for synchronization.
|
|
1381
|
+
*/
|
|
1382
|
+
unmuteChat(options) {
|
|
1383
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1384
|
+
const self = this;
|
|
1385
|
+
return new Promise(function (resolve, reject) {
|
|
1386
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UNMUTE_CHAT, {
|
|
1387
|
+
id: options.id,
|
|
1388
|
+
}, resolve, reject);
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1339
1391
|
/**
|
|
1340
1392
|
* Add a member to chat
|
|
1341
1393
|
*
|
|
@@ -1657,6 +1709,58 @@ class SfuExtended {
|
|
|
1657
1709
|
}, resolve, reject);
|
|
1658
1710
|
});
|
|
1659
1711
|
}
|
|
1712
|
+
/**
|
|
1713
|
+
* Update space notification settings
|
|
1714
|
+
*
|
|
1715
|
+
* Used to modify and store space notification settings specified in {@link SfuSpace.notificationSettings}.
|
|
1716
|
+
*
|
|
1717
|
+
* Returns {@link SpaceNotificationSettingsUpdated}, and other connected devices will also receive this event for synchronization.
|
|
1718
|
+
*/
|
|
1719
|
+
updateSpaceNotificationSettings(options) {
|
|
1720
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1721
|
+
const self = this;
|
|
1722
|
+
return new Promise(function (resolve, reject) {
|
|
1723
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_SPACE_NOTIFICATION_SETTINGS, {
|
|
1724
|
+
spaceId: options.spaceId,
|
|
1725
|
+
value: options.value
|
|
1726
|
+
}, resolve, reject);
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* Mute space
|
|
1731
|
+
*
|
|
1732
|
+
* @param options.muteTime – the duration for which the sound is muted. The final event will contain {@link MuteSettings.mutedUntil}, which is the current time plus the specified duration.
|
|
1733
|
+
* @param options.mutedIndefinitely – indicates whether the sound is muted indefinitely.
|
|
1734
|
+
*
|
|
1735
|
+
* Returns {@link SpaceMuted}, and other connected devices will also receive this event for synchronization.
|
|
1736
|
+
*/
|
|
1737
|
+
muteSpace(options) {
|
|
1738
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1739
|
+
const self = this;
|
|
1740
|
+
return new Promise(function (resolve, reject) {
|
|
1741
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.MUTE_SPACE, {
|
|
1742
|
+
spaceId: options.spaceId,
|
|
1743
|
+
muteTime: options.muteTime,
|
|
1744
|
+
mutedIndefinitely: options.mutedIndefinitely
|
|
1745
|
+
}, resolve, reject);
|
|
1746
|
+
});
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* Unmute space
|
|
1750
|
+
*
|
|
1751
|
+
* {@link SfuSpace.muteSettings} wil be null - that means the space is not muted.
|
|
1752
|
+
*
|
|
1753
|
+
* Returns {@link SpaceUnmuted}, and other connected devices will also receive this event for synchronization.
|
|
1754
|
+
*/
|
|
1755
|
+
unmuteSpace(options) {
|
|
1756
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1757
|
+
const self = this;
|
|
1758
|
+
return new Promise(function (resolve, reject) {
|
|
1759
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UNMUTE_SPACE, {
|
|
1760
|
+
spaceId: options.spaceId,
|
|
1761
|
+
}, resolve, reject);
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1660
1764
|
/**
|
|
1661
1765
|
* Generate space invite
|
|
1662
1766
|
*
|
|
@@ -1844,6 +1948,61 @@ class SfuExtended {
|
|
|
1844
1948
|
}, resolve, reject);
|
|
1845
1949
|
});
|
|
1846
1950
|
}
|
|
1951
|
+
/**
|
|
1952
|
+
* Update channel notification settings
|
|
1953
|
+
*
|
|
1954
|
+
* Used to modify and store channel notification settings specified in {@link SfuSpaceChannel.notificationSettings}.
|
|
1955
|
+
*
|
|
1956
|
+
* Returns {@link ChannelNotificationSettingsUpdated}, and other connected devices will also receive this event for synchronization.
|
|
1957
|
+
*/
|
|
1958
|
+
updateChannelNotificationSettings(options) {
|
|
1959
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1960
|
+
const self = this;
|
|
1961
|
+
return new Promise(function (resolve, reject) {
|
|
1962
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_CHANNEL_NOTIFICATION_SETTINGS, {
|
|
1963
|
+
spaceId: options.spaceId,
|
|
1964
|
+
channelId: options.channelId,
|
|
1965
|
+
value: options.value
|
|
1966
|
+
}, resolve, reject);
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
/**
|
|
1970
|
+
* Mute channel
|
|
1971
|
+
*
|
|
1972
|
+
* @param options.muteTime – the duration for which the sound is muted. The final event will contain {@link MuteSettings.mutedUntil}, which is the current time plus the specified duration.
|
|
1973
|
+
* @param options.mutedIndefinitely – indicates whether the sound is muted indefinitely.
|
|
1974
|
+
*
|
|
1975
|
+
* Returns {@link ChannelMuted}, and other connected devices will also receive this event for synchronization.
|
|
1976
|
+
*/
|
|
1977
|
+
muteChannel(options) {
|
|
1978
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1979
|
+
const self = this;
|
|
1980
|
+
return new Promise(function (resolve, reject) {
|
|
1981
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.MUTE_CHANNEL, {
|
|
1982
|
+
spaceId: options.spaceId,
|
|
1983
|
+
channelId: options.channelId,
|
|
1984
|
+
muteTime: options.muteTime,
|
|
1985
|
+
mutedIndefinitely: options.mutedIndefinitely
|
|
1986
|
+
}, resolve, reject);
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
/**
|
|
1990
|
+
* Unmute channel
|
|
1991
|
+
*
|
|
1992
|
+
* {@link SfuSpaceChannel.muteSettings} wil be null - that means the channel is not muted.
|
|
1993
|
+
*
|
|
1994
|
+
* Returns {@link ChannelUnmuted}, and other connected devices will also receive this event for synchronization.
|
|
1995
|
+
*/
|
|
1996
|
+
unmuteChannel(options) {
|
|
1997
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
1998
|
+
const self = this;
|
|
1999
|
+
return new Promise(function (resolve, reject) {
|
|
2000
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UNMUTE_CHANNEL, {
|
|
2001
|
+
spaceId: options.spaceId,
|
|
2002
|
+
channelId: options.channelId,
|
|
2003
|
+
}, resolve, reject);
|
|
2004
|
+
});
|
|
2005
|
+
}
|
|
1847
2006
|
/**
|
|
1848
2007
|
* Create space thread
|
|
1849
2008
|
*
|
|
@@ -1939,6 +2098,64 @@ class SfuExtended {
|
|
|
1939
2098
|
}, resolve, reject);
|
|
1940
2099
|
});
|
|
1941
2100
|
}
|
|
2101
|
+
/**
|
|
2102
|
+
* Update thread notification settings
|
|
2103
|
+
*
|
|
2104
|
+
* Used to modify and store thread notification settings specified in {@link SfuSpaceThread.notificationSettings}.
|
|
2105
|
+
*
|
|
2106
|
+
* Returns {@link ThreadNotificationSettingsUpdated}, and other connected devices will also receive this event for synchronization.
|
|
2107
|
+
*/
|
|
2108
|
+
updateThreadNotificationSettings(options) {
|
|
2109
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
2110
|
+
const self = this;
|
|
2111
|
+
return new Promise(function (resolve, reject) {
|
|
2112
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_THREAD_NOTIFICATION_SETTINGS, {
|
|
2113
|
+
spaceId: options.spaceId,
|
|
2114
|
+
channelId: options.channelId,
|
|
2115
|
+
threadId: options.threadId,
|
|
2116
|
+
value: options.value
|
|
2117
|
+
}, resolve, reject);
|
|
2118
|
+
});
|
|
2119
|
+
}
|
|
2120
|
+
/**
|
|
2121
|
+
* Mute thread
|
|
2122
|
+
*
|
|
2123
|
+
* @param options.muteTime – the duration for which the sound is muted. The final event will contain {@link MuteSettings.mutedUntil}, which is the current time plus the specified duration.
|
|
2124
|
+
* @param options.mutedIndefinitely – indicates whether the sound is muted indefinitely.
|
|
2125
|
+
*
|
|
2126
|
+
* Returns {@link ThreadMuted}, and other connected devices will also receive this event for synchronization.
|
|
2127
|
+
*/
|
|
2128
|
+
muteThread(options) {
|
|
2129
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
2130
|
+
const self = this;
|
|
2131
|
+
return new Promise(function (resolve, reject) {
|
|
2132
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.MUTE_THREAD, {
|
|
2133
|
+
spaceId: options.spaceId,
|
|
2134
|
+
channelId: options.channelId,
|
|
2135
|
+
threadId: options.threadId,
|
|
2136
|
+
muteTime: options.muteTime,
|
|
2137
|
+
mutedIndefinitely: options.mutedIndefinitely
|
|
2138
|
+
}, resolve, reject);
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2141
|
+
/**
|
|
2142
|
+
* Unmute thread
|
|
2143
|
+
*
|
|
2144
|
+
* {@link SfuSpaceThread.muteSettings} wil be null - that means the thread is not muted.
|
|
2145
|
+
*
|
|
2146
|
+
* Returns {@link ThreadUnmuted}, and other connected devices will also receive this event for synchronization.
|
|
2147
|
+
*/
|
|
2148
|
+
unmuteThread(options) {
|
|
2149
|
+
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
2150
|
+
const self = this;
|
|
2151
|
+
return new Promise(function (resolve, reject) {
|
|
2152
|
+
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UNMUTE_THREAD, {
|
|
2153
|
+
spaceId: options.spaceId,
|
|
2154
|
+
channelId: options.channelId,
|
|
2155
|
+
threadId: options.threadId,
|
|
2156
|
+
}, resolve, reject);
|
|
2157
|
+
});
|
|
2158
|
+
}
|
|
1942
2159
|
/**
|
|
1943
2160
|
* Add space role
|
|
1944
2161
|
*
|
|
@@ -2061,12 +2278,19 @@ class SfuExtended {
|
|
|
2061
2278
|
}
|
|
2062
2279
|
/**
|
|
2063
2280
|
* Update nickname in the space
|
|
2281
|
+
* Updates a user's nickname in the space.
|
|
2282
|
+
*
|
|
2283
|
+
* A custom nickname, if set, takes precedence over the user's global nickname.
|
|
2284
|
+
* If no custom nickname is provided (or an empty string is passed), the user's global nickname must be displayed.
|
|
2064
2285
|
*
|
|
2065
|
-
*
|
|
2066
|
-
* If a custom nickname is not set, it will be an empty string, and in this case, the display global nickname will be taken from the contacts.
|
|
2067
|
-
* To remove a custom nickname and use the global one, provide an empty string.
|
|
2286
|
+
* To remove a previously set the custom nickname and revert to the global one, pass an empty string.
|
|
2068
2287
|
*
|
|
2069
|
-
*
|
|
2288
|
+
* @param options.userId - Optional. The ID of the user whose nickname is being updated.
|
|
2289
|
+
* If this field is omitted or set to the caller's own ID, the caller's nickname is updated.
|
|
2290
|
+
* The space owner can update anyone's nickname by specifying user ID.
|
|
2291
|
+
* If a non-owner attempts to update another user's nickname, a {@link SpaceError.UPDATE_NICKNAME_ACCESS_RIGHTS_ERROR} is thrown.
|
|
2292
|
+
* All space members receive a {@link SpaceEvent.USER_SPACE_NICKNAME_UPDATED} event
|
|
2293
|
+
* with a {@link UserSpaceNicknameUpdated} payload when the nickname is updated.
|
|
2070
2294
|
*/
|
|
2071
2295
|
updateSpaceNickname(options) {
|
|
2072
2296
|
__classPrivateFieldGet(this, _SfuExtended_instances, "m", _SfuExtended_checkAuthenticated).call(this);
|
|
@@ -2074,6 +2298,7 @@ class SfuExtended {
|
|
|
2074
2298
|
return new Promise(function (resolve, reject) {
|
|
2075
2299
|
__classPrivateFieldGet(self, _SfuExtended_instances, "m", _SfuExtended_emmitAction).call(self, constants_1.InternalApi.UPDATE_SPACE_NICKNAME, {
|
|
2076
2300
|
spaceId: options.spaceId,
|
|
2301
|
+
userId: options.userId,
|
|
2077
2302
|
nickname: options.nickname
|
|
2078
2303
|
}, resolve, reject);
|
|
2079
2304
|
});
|
|
@@ -2302,6 +2527,24 @@ _SfuExtended_connection = new WeakMap(), _SfuExtended__user = new WeakMap(), _Sf
|
|
|
2302
2527
|
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.CHAT_UPDATED, chat.info);
|
|
2303
2528
|
}
|
|
2304
2529
|
}
|
|
2530
|
+
else if (data[0].type === constants_1.SfuEvent.CHAT_NOTIFICATION_SETTINGS_UPDATED) {
|
|
2531
|
+
const event = data[0];
|
|
2532
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2533
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.CHAT_NOTIFICATION_SETTINGS_UPDATED, event);
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
else if (data[0].type === constants_1.SfuEvent.CHAT_MUTED) {
|
|
2537
|
+
const event = data[0];
|
|
2538
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2539
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.CHAT_MUTED, event);
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
else if (data[0].type === constants_1.SfuEvent.CHAT_UNMUTED) {
|
|
2543
|
+
const event = data[0];
|
|
2544
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2545
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.CHAT_UNMUTED, event);
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2305
2548
|
else if (data[0].type === constants_1.InternalApi.USER_CHATS) {
|
|
2306
2549
|
//TODO: optimize - should use with if (zapp-420)
|
|
2307
2550
|
const chats = data[0];
|
|
@@ -2695,6 +2938,60 @@ _SfuExtended_connection = new WeakMap(), _SfuExtended__user = new WeakMap(), _Sf
|
|
|
2695
2938
|
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.USER_SPACE_NICKNAME_UPDATED, event);
|
|
2696
2939
|
}
|
|
2697
2940
|
}
|
|
2941
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_NOTIFICATION_SETTINGS_UPDATED) {
|
|
2942
|
+
const event = data[0];
|
|
2943
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2944
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_NOTIFICATION_SETTINGS_UPDATED, event);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
else if (data[0].type === constants_1.SpaceEvent.CHANNEL_NOTIFICATION_SETTINGS_UPDATED) {
|
|
2948
|
+
const event = data[0];
|
|
2949
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2950
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.CHANNEL_NOTIFICATION_SETTINGS_UPDATED, event);
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
else if (data[0].type === constants_1.SpaceEvent.THREAD_NOTIFICATION_SETTINGS_UPDATED) {
|
|
2954
|
+
const event = data[0];
|
|
2955
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2956
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.THREAD_NOTIFICATION_SETTINGS_UPDATED, event);
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_MUTED) {
|
|
2960
|
+
const event = data[0];
|
|
2961
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2962
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_MUTED, event);
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
else if (data[0].type === constants_1.SpaceEvent.SPACE_UNMUTED) {
|
|
2966
|
+
const event = data[0];
|
|
2967
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2968
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.SPACE_UNMUTED, event);
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
else if (data[0].type === constants_1.SpaceEvent.CHANNEL_MUTED) {
|
|
2972
|
+
const event = data[0];
|
|
2973
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2974
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.CHANNEL_MUTED, event);
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
else if (data[0].type === constants_1.SpaceEvent.CHANNEL_UNMUTED) {
|
|
2978
|
+
const event = data[0];
|
|
2979
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2980
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.CHANNEL_UNMUTED, event);
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
else if (data[0].type === constants_1.SpaceEvent.THREAD_MUTED) {
|
|
2984
|
+
const event = data[0];
|
|
2985
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2986
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.THREAD_MUTED, event);
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
else if (data[0].type === constants_1.SpaceEvent.THREAD_UNMUTED) {
|
|
2990
|
+
const event = data[0];
|
|
2991
|
+
if (!promises_1.default.resolve(data[0].internalMessageId, event)) {
|
|
2992
|
+
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SpaceEvent.THREAD_UNMUTED, event);
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2698
2995
|
else if (data[0].type === constants_1.SfuEvent.USER_MEETINGS) {
|
|
2699
2996
|
const event = data[0];
|
|
2700
2997
|
__classPrivateFieldGet(this, _SfuExtended_notifier, "f").notify(constants_1.SfuEvent.USER_MEETINGS, event);
|