tuikit-atomicx-vue3 4.5.0 → 4.5.2
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/{MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js → MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js} +38 -38
- package/dist/{PopoverTrigger-L8abAry7.js → PopoverPortal-DV6zFXcf.js} +91 -136
- package/dist/PopoverTrigger-DIjW4PKa.js +54 -0
- package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-D__dbwpA.js} +6 -6
- package/dist/{Teleport-CSEuZbpM.js → Teleport-98QrIYDI.js} +280 -270
- package/dist/baseComp/Modal/Modal.js +3 -3
- package/dist/components/AudioSettingPanel/index.js +14 -14
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +10 -9
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +16 -15
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +53 -50
- package/dist/components/ConversationList/ConversationActions/ConversationActions.vue.d.ts +2 -0
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +25 -25
- package/dist/components/ConversationList/ConversationList.vue.d.ts +16 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +16 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +62 -40
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +28 -26
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +27 -23
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +1 -1
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +81 -70
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +33 -31
- package/dist/components/ConversationList/ConversationPreview/utils.d.ts +2 -2
- package/dist/components/ConversationList/ConversationPreview/utils.js +81 -35
- package/dist/components/ConversationList/i18n/en-US.d.ts +11 -1
- package/dist/components/ConversationList/i18n/en-US.js +12 -2
- package/dist/components/ConversationList/i18n/zh-CN.d.ts +11 -1
- package/dist/components/ConversationList/i18n/zh-CN.js +12 -2
- package/dist/components/ConversationList/index.d.ts +48 -0
- package/dist/components/MessageInput/AttachmentPicker/index.js +10 -9
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +17 -16
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/QuotedMessagePreview/index.js +35 -35
- package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +13 -12
- package/dist/components/MessageInput/TextEditor/EditorCore.js +54 -89
- package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +229 -0
- package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue.d.ts +15 -0
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.d.ts +1 -0
- package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +22 -0
- package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.d.ts +3 -0
- package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +15 -0
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
- package/dist/components/MessageInput/TextEditor/extensions/index.d.ts +8 -0
- package/dist/components/MessageInput/TextEditor/extensions/index.js +12 -0
- package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.d.ts +5 -0
- package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +330 -0
- package/dist/components/MessageInput/TextEditor/index.js +62 -62
- package/dist/components/MessageInput/i18n/en-US.d.ts +3 -0
- package/dist/components/MessageInput/i18n/en-US.js +4 -1
- package/dist/components/MessageInput/i18n/index.d.ts +6 -0
- package/dist/components/MessageInput/i18n/zh-CN.d.ts +3 -0
- package/dist/components/MessageInput/i18n/zh-CN.js +4 -1
- package/dist/components/MessageInput/index.js +1 -1
- package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +119 -89
- package/dist/components/MessageList/Message/ImageMessage/ImagePreview.js +142 -0
- package/dist/components/MessageList/Message/ImageMessage/ImagePreview.vue.d.ts +20 -0
- package/dist/components/MessageList/Message/Message.vue.d.ts +8 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +69 -58
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +8 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +37 -28
- package/dist/components/MessageList/Message/index.js +8 -4
- package/dist/components/MessageList/MessageList.js +109 -91
- package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
- package/dist/components/MessageList/index.d.ts +21 -3
- package/dist/components/ScheduleRoomPanel/RoomDetail.js +22 -22
- package/dist/components/ScheduleRoomPanel/RoomEdit.js +1 -1
- package/dist/components/ScheduleRoomPanel/RoomShare.js +4 -4
- package/dist/components/ScheduleRoomPanel/ScheduleRoomPanel.js +1 -1
- package/dist/components/ScheduleRoomPanel/ScheduledRoomList.js +1 -1
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +6 -6
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.vue.d.ts +1 -1
- package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.d.ts +72 -0
- package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.js +95 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.d.ts +40 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.js +51 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/index.d.ts +4 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/index.js +6 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.d.ts +40 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.js +51 -0
- package/dist/components/UIKitModal/chatErrorModal/index.d.ts +3 -0
- package/dist/components/UIKitModal/chatErrorModal/index.js +11 -0
- package/dist/components/VideoSettingPanel/index.js +1 -1
- package/dist/hooks/useReadReceipt/useReadReceipt.js +44 -41
- package/dist/index-CTthrJb2.js +1461 -0
- package/dist/index-DXC5bPY4.js +2174 -0
- package/dist/{index-Do-2CngU.js → index-DuAffztD.js} +115 -142
- package/dist/{index-7vNB_Vx8.js → index-hHVD-MG2.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +150 -149
- package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
- package/dist/states/LoginState.js +43 -43
- package/dist/states/MessageActionState/MessageActionState.js +83 -223
- package/dist/states/MessageInputState/MessageInputState.js +111 -82
- package/dist/states/MessageInputState/type.d.ts +36 -10
- package/dist/states/MessageInputState/utils.d.ts +1 -5
- package/dist/states/MessageListState/MessageListState.d.ts +1 -1
- package/dist/states/MessageListState/MessageListState.js +26 -23
- package/dist/states/RoomParticipantState/index.js +83 -24
- package/dist/states/RoomParticipantState/participantEventManager.d.ts +2 -2
- package/dist/states/RoomParticipantState/participantEventManager.js +217 -205
- package/dist/states/RoomParticipantState/participantManager.d.ts +4 -0
- package/dist/states/RoomParticipantState/participantManager.js +159 -127
- package/dist/states/RoomState/callManager.d.ts +3 -3
- package/dist/states/RoomState/callManager.js +20 -20
- package/dist/states/RoomState/common.d.ts +3 -2
- package/dist/states/RoomState/common.js +34 -24
- package/dist/states/RoomState/roomManager.d.ts +0 -1
- package/dist/states/RoomState/roomManager.js +21 -27
- package/dist/states/RoomState/scheduleManager.js +2 -2
- package/dist/styles/index.css +1 -1
- package/dist/{chat/index.d.ts → subEntry/chat/chat.d.ts} +2160 -2087
- package/dist/subEntry/chat/chat.js +89 -0
- package/dist/subEntry/chat/index.d.ts +11 -0
- package/dist/subEntry/chat/index.js +81 -0
- package/dist/{chat → subEntry/chat}/server.js +4 -4
- package/dist/subEntry/live/index.js +46 -45
- package/dist/subEntry/room/index.js +39 -38
- package/dist/types/beauty.d.ts +20 -0
- package/dist/types/index.js +37 -36
- package/dist/types/participant.d.ts +2 -0
- package/dist/types/room.d.ts +45 -1
- package/dist/types/room.js +4 -3
- package/dist/{useId-CtirfF0W.js → useId-B1VwPJLm.js} +1 -1
- package/dist/utils/call.js +77 -71
- package/dist/{utils-DaB7eSu5.js → utils-BU8IkP_V.js} +1 -1
- package/package.json +8 -7
- package/src/components/AudioSettingPanel/index.vue +4 -5
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +7 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +5 -1
- package/src/components/ConversationList/ConversationList.vue +0 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +10 -2
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +32 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +3 -2
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
- package/src/components/ConversationList/ConversationPreview/utils.ts +98 -28
- package/src/components/ConversationList/i18n/en-US.ts +11 -1
- package/src/components/ConversationList/i18n/zh-CN.ts +11 -1
- package/src/components/MessageInput/MessageInput.module.scss +1 -0
- package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue +19 -22
- package/src/components/MessageInput/TextEditor/Editor.scss +25 -0
- package/src/components/MessageInput/TextEditor/EditorCore.ts +79 -99
- package/src/components/MessageInput/TextEditor/TextEditor.vue +64 -68
- package/src/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue +449 -0
- package/src/components/MessageInput/TextEditor/extensions/emojiExtension.ts +22 -0
- package/src/components/MessageInput/TextEditor/extensions/enterKeyExtension.ts +22 -0
- package/src/components/MessageInput/TextEditor/extensions/index.ts +8 -0
- package/src/components/MessageInput/TextEditor/extensions/mentionExtension.ts +87 -0
- package/src/components/MessageInput/i18n/en-US.ts +3 -0
- package/src/components/MessageInput/i18n/zh-CN.ts +3 -0
- package/src/components/MessageList/Message/ImageMessage/ImageMessage.vue +49 -0
- package/src/components/MessageList/Message/ImageMessage/ImagePreview.vue +344 -0
- package/src/components/MessageList/Message/Message.vue +6 -0
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -1
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
- package/src/components/MessageList/MessageList.vue +50 -14
- package/src/components/ScheduleRoomPanel/RoomDetail.vue +1 -0
- package/src/components/ScheduleRoomPanel/RoomEdit.vue +2 -1
- package/src/components/ScheduleRoomPanel/RoomShare.vue +1 -0
- package/src/components/ScheduleRoomPanel/ScheduleRoomPanel.vue +1 -0
- package/src/components/ScheduleRoomPanel/ScheduledRoomList.vue +1 -0
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +30 -31
- package/src/components/UIKitModal/chatErrorModal/chatErrorModal.ts +205 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/en-US/index.ts +56 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/index.ts +4 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.ts +56 -0
- package/src/components/UIKitModal/chatErrorModal/index.ts +16 -0
- package/src/components/VideoSettingPanel/index.vue +1 -0
- package/src/hooks/useReadReceipt/useReadReceipt.ts +5 -4
- package/src/index.ts +1 -1
- package/src/{chat/index.ts → subEntry/chat/chat.ts} +25 -18
- package/src/subEntry/chat/index.ts +13 -0
- package/src/{chat → subEntry/chat}/server.ts +3 -3
- package/src/types/beauty.ts +20 -0
- package/src/types/participant.ts +3 -0
- package/src/types/room.ts +49 -1
- package/src/utils/call.ts +8 -0
- package/dist/chat/index.js +0 -59
- package/dist/index-ZILx4LYk.js +0 -4826
- package/dist/states/SearchState.d.ts +0 -314
- /package/dist/{chat → subEntry/chat}/server.d.ts +0 -0
|
@@ -1,81 +1,71 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var F = (f, o, e) => o in f ? V(f, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : f[o] = e;
|
|
3
|
+
var L = (f, o, e) => F(f, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
+
import K, { TUIRole as v, TUIRequestAction as m, TUIRoomEvents as l, TUIVideoStreamType as _, TUIKickedOutOfRoomReason as R } from "@tencentcloud/tuiroom-engine-js";
|
|
5
5
|
import { useRoomEngine as B } from "../../hooks/useRoomEngine.js";
|
|
6
|
-
import { eventCenter as
|
|
6
|
+
import { eventCenter as s } from "../../utils/eventCenter.js";
|
|
7
7
|
import { useLoginState as Q } from "../LoginState.js";
|
|
8
8
|
import { useRoomState as x } from "../RoomState/index.js";
|
|
9
9
|
import { participantTransfer as g } from "./common.js";
|
|
10
10
|
import { useRoomParticipantStore as G } from "./store.js";
|
|
11
|
-
import { RoomParticipantEvent as
|
|
12
|
-
import { DeviceStatus as
|
|
11
|
+
import { RoomParticipantEvent as t, RoomParticipantRole as U, KickedOutOfRoomReason as I } from "../../types/participant.js";
|
|
12
|
+
import { DeviceStatus as C, DeviceType as a } from "../../types/device.js";
|
|
13
13
|
const {
|
|
14
14
|
speakingUsers: J,
|
|
15
15
|
networkQualities: j,
|
|
16
|
-
receivedRequestMap:
|
|
16
|
+
receivedRequestMap: h,
|
|
17
17
|
getParticipantInfo: b,
|
|
18
|
-
addParticipantInfo:
|
|
19
|
-
updateParticipantInfo:
|
|
18
|
+
addParticipantInfo: D,
|
|
19
|
+
updateParticipantInfo: k,
|
|
20
20
|
removeParticipantInfo: z,
|
|
21
21
|
reset: H,
|
|
22
22
|
removePendingParticipantInfo: W
|
|
23
|
-
} = G(),
|
|
23
|
+
} = G(), u = B(), { loginUserInfo: A } = Q(), { currentRoom: T } = x(), S = class S {
|
|
24
24
|
constructor() {
|
|
25
25
|
S.instance || (S.instance = this), this.onRemoteUserEnterRoom = this.onRemoteUserEnterRoom.bind(this), this.onRemoteUserLeaveRoom = this.onRemoteUserLeaveRoom.bind(this), this.onUserAudioStateChanged = this.onUserAudioStateChanged.bind(this), this.onUserVideoStateChanged = this.onUserVideoStateChanged.bind(this), this.onUserVoiceVolumeChanged = this.onUserVoiceVolumeChanged.bind(this), this.onUserInfoChanged = this.onUserInfoChanged.bind(this), this.onSendMessageForUserDisableChanged = this.onSendMessageForUserDisableChanged.bind(this), this.onKickedOutOfRoom = this.onKickedOutOfRoom.bind(this), this.onAllUserCameraDisableChanged = this.onAllUserCameraDisableChanged.bind(this), this.onAllUserMicrophoneDisableChanged = this.onAllUserMicrophoneDisableChanged.bind(this), this.onScreenShareForAllUserDisableChanged = this.onScreenShareForAllUserDisableChanged.bind(this), this.onSendMessageForAllUserDisableChanged = this.onSendMessageForAllUserDisableChanged.bind(this), this.onUserNetworkQualityChanged = this.onUserNetworkQualityChanged.bind(this), this.onRequestReceived = this.onRequestReceived.bind(this), this.onRequestCancelled = this.onRequestCancelled.bind(this), this.onRequestProcessed = this.onRequestProcessed.bind(this), this.bindRoomEngineEvents();
|
|
26
26
|
}
|
|
27
|
-
onRemoteUserEnterRoom(
|
|
28
|
-
const { userInfo:
|
|
29
|
-
W({ userId:
|
|
30
|
-
userId:
|
|
31
|
-
userName:
|
|
32
|
-
avatarUrl:
|
|
27
|
+
onRemoteUserEnterRoom(o) {
|
|
28
|
+
const { userInfo: e } = o, n = g.transformTUIUserInfoToParticipantInfo(e);
|
|
29
|
+
W({ userId: n.userId }), D(n), s.emit(t.onParticipantJoined, { userInfo: {
|
|
30
|
+
userId: n.userId,
|
|
31
|
+
userName: n.userName,
|
|
32
|
+
avatarUrl: n.avatarUrl
|
|
33
33
|
} });
|
|
34
34
|
}
|
|
35
|
-
onRemoteUserLeaveRoom(
|
|
36
|
-
const { userInfo:
|
|
37
|
-
z({ userId:
|
|
38
|
-
const
|
|
39
|
-
|
|
35
|
+
onRemoteUserLeaveRoom(o) {
|
|
36
|
+
const { userInfo: e } = o, { userId: n } = e;
|
|
37
|
+
z({ userId: n });
|
|
38
|
+
const r = g.transformTUIUserInfoToParticipantInfo(e);
|
|
39
|
+
s.emit(t.onParticipantLeft, {
|
|
40
40
|
userInfo: {
|
|
41
|
-
userId:
|
|
42
|
-
userName:
|
|
43
|
-
avatarUrl:
|
|
41
|
+
userId: r.userId,
|
|
42
|
+
userName: r.userName,
|
|
43
|
+
avatarUrl: r.avatarUrl
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
onUserAudioStateChanged(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
!t && o && k({ userId: n }), t = b({ userId: n }), t && (A({ userId: n, microphoneStatus: o ? I.On : I.Off }), s === w.kChangedByAdmin && o === !1 && r.emit(i.onParticipantDeviceClosed, {
|
|
52
|
-
userId: n,
|
|
53
|
-
device: a.Microphone,
|
|
54
|
-
operator: ((d = E.value) == null ? void 0 : d.roomOwner) || { userId: "", userName: "", avatarUrl: "" }
|
|
55
|
-
}));
|
|
47
|
+
onUserAudioStateChanged(o) {
|
|
48
|
+
const { userId: e, hasAudio: n } = o;
|
|
49
|
+
let r = b({ userId: e });
|
|
50
|
+
!r && n && D({ userId: e }), r = b({ userId: e }), r && k({ userId: e, microphoneStatus: n ? C.On : C.Off });
|
|
56
51
|
}
|
|
57
|
-
onUserVideoStateChanged(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (!d && s && k({ userId: n }), d = b({ userId: n }), !d)
|
|
52
|
+
onUserVideoStateChanged(o) {
|
|
53
|
+
const { userId: e, streamType: n, hasVideo: r } = o;
|
|
54
|
+
let i = b({ userId: e });
|
|
55
|
+
if (!i && r && D({ userId: e }), i = b({ userId: e }), !i)
|
|
62
56
|
return;
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
userId: n,
|
|
66
|
-
device: o === L.kScreenStream ? a.ScreenShare : a.Camera,
|
|
67
|
-
operator: ((c = E.value) == null ? void 0 : c.roomOwner) || { userId: "", userName: "", avatarUrl: "" }
|
|
68
|
-
});
|
|
57
|
+
const d = n === _.kScreenStream ? { screenShareStatus: r ? C.On : C.Off } : { cameraStatus: r ? C.On : C.Off };
|
|
58
|
+
k({ userId: e, ...d });
|
|
69
59
|
}
|
|
70
|
-
onUserVoiceVolumeChanged(
|
|
71
|
-
const { userVolumeList:
|
|
72
|
-
|
|
73
|
-
const { userId:
|
|
74
|
-
J.value.set(
|
|
60
|
+
onUserVoiceVolumeChanged(o) {
|
|
61
|
+
const { userVolumeList: e } = o;
|
|
62
|
+
e.forEach((n) => {
|
|
63
|
+
const { userId: r, volume: i } = n;
|
|
64
|
+
J.value.set(r, i);
|
|
75
65
|
});
|
|
76
66
|
}
|
|
77
|
-
transformRoleToParticipantRole(
|
|
78
|
-
switch (
|
|
67
|
+
transformRoleToParticipantRole(o) {
|
|
68
|
+
switch (o) {
|
|
79
69
|
case v.kRoomOwner:
|
|
80
70
|
return U.Owner;
|
|
81
71
|
case v.kAdministrator:
|
|
@@ -86,241 +76,263 @@ const {
|
|
|
86
76
|
return U.GeneralUser;
|
|
87
77
|
}
|
|
88
78
|
}
|
|
89
|
-
onUserInfoChanged({ userInfo:
|
|
90
|
-
var
|
|
91
|
-
const { userId:
|
|
92
|
-
if (
|
|
93
|
-
const c = g.transformTUIUserInfoToParticipantInfo(
|
|
94
|
-
|
|
79
|
+
onUserInfoChanged({ userInfo: o }) {
|
|
80
|
+
var p;
|
|
81
|
+
const { userId: e, nameCard: n, roomCustomInfo: r, userRole: i } = o, d = (p = b({ userId: e })) == null ? void 0 : p.role;
|
|
82
|
+
if (k({ userId: e, nameCard: n, metaData: r || {}, role: this.transformRoleToParticipantRole(i) }), d !== U.Owner && o.userRole === v.kRoomOwner) {
|
|
83
|
+
const c = g.transformTUIUserInfoToParticipantInfo(o);
|
|
84
|
+
s.emit(t.onOwnerChanged, {
|
|
95
85
|
newOwner: { userId: c.userId, userName: c.userName, avatarUrl: c.avatarUrl }
|
|
96
86
|
});
|
|
97
87
|
}
|
|
98
|
-
if (d !== U.Admin &&
|
|
99
|
-
const c = g.transformTUIUserInfoToParticipantInfo(
|
|
100
|
-
|
|
88
|
+
if (d !== U.Admin && o.userRole === v.kAdministrator) {
|
|
89
|
+
const c = g.transformTUIUserInfoToParticipantInfo(o);
|
|
90
|
+
s.emit(t.onAdminSet, {
|
|
101
91
|
userInfo: { userId: c.userId, userName: c.userName, avatarUrl: c.avatarUrl }
|
|
102
92
|
});
|
|
103
93
|
}
|
|
104
|
-
if (d === U.Admin &&
|
|
105
|
-
const c = g.transformTUIUserInfoToParticipantInfo(
|
|
106
|
-
|
|
94
|
+
if (d === U.Admin && o.userRole !== v.kAdministrator) {
|
|
95
|
+
const c = g.transformTUIUserInfoToParticipantInfo(o);
|
|
96
|
+
s.emit(t.onAdminRevoked, {
|
|
107
97
|
userInfo: { userId: c.userId, userName: c.userName, avatarUrl: c.avatarUrl }
|
|
108
98
|
});
|
|
109
99
|
}
|
|
110
100
|
}
|
|
111
|
-
onSendMessageForUserDisableChanged(
|
|
112
|
-
var
|
|
113
|
-
const { userId:
|
|
114
|
-
|
|
115
|
-
userId:
|
|
116
|
-
isMessageDisabled:
|
|
117
|
-
}),
|
|
118
|
-
userId:
|
|
119
|
-
muted:
|
|
101
|
+
onSendMessageForUserDisableChanged(o) {
|
|
102
|
+
var r;
|
|
103
|
+
const { userId: e, isDisable: n } = o;
|
|
104
|
+
k({
|
|
105
|
+
userId: e,
|
|
106
|
+
isMessageDisabled: n
|
|
107
|
+
}), e === ((r = A.value) == null ? void 0 : r.userId) && s.emit(t.onParticipantMessageMuted, {
|
|
108
|
+
userId: e,
|
|
109
|
+
muted: n,
|
|
120
110
|
operator: { userId: "", userName: "", avatarUrl: "" }
|
|
121
111
|
});
|
|
122
112
|
}
|
|
123
|
-
onAllUserCameraDisableChanged(
|
|
124
|
-
|
|
125
|
-
|
|
113
|
+
onAllUserCameraDisableChanged(o) {
|
|
114
|
+
var n;
|
|
115
|
+
const { isDisable: e } = o;
|
|
116
|
+
s.emit(t.onAllDevicesDisabled, { device: a.Camera, disable: e, operator: ((n = T.value) == null ? void 0 : n.roomOwner) || { userId: "", userName: "", avatarUrl: "" } });
|
|
126
117
|
}
|
|
127
|
-
onAllUserMicrophoneDisableChanged(
|
|
128
|
-
|
|
129
|
-
|
|
118
|
+
onAllUserMicrophoneDisableChanged(o) {
|
|
119
|
+
var n;
|
|
120
|
+
const { isDisable: e } = o;
|
|
121
|
+
s.emit(t.onAllDevicesDisabled, { device: a.Microphone, disable: e, operator: ((n = T.value) == null ? void 0 : n.roomOwner) || { userId: "", userName: "", avatarUrl: "" } });
|
|
130
122
|
}
|
|
131
|
-
onScreenShareForAllUserDisableChanged(
|
|
132
|
-
|
|
133
|
-
|
|
123
|
+
onScreenShareForAllUserDisableChanged(o) {
|
|
124
|
+
var n;
|
|
125
|
+
const { isDisable: e } = o;
|
|
126
|
+
s.emit(t.onAllDevicesDisabled, { device: a.ScreenShare, disable: e, operator: ((n = T.value) == null ? void 0 : n.roomOwner) || { userId: "", userName: "", avatarUrl: "" } });
|
|
134
127
|
}
|
|
135
|
-
onSendMessageForAllUserDisableChanged(
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
onSendMessageForAllUserDisableChanged(o) {
|
|
129
|
+
var n;
|
|
130
|
+
const { isDisable: e } = o;
|
|
131
|
+
s.emit(t.onAllMessagesDisabled, { disable: e, operator: ((n = T.value) == null ? void 0 : n.roomOwner) || { userId: "", userName: "", avatarUrl: "" } });
|
|
138
132
|
}
|
|
139
|
-
onKickedOutOfRoom(
|
|
140
|
-
const { reason:
|
|
141
|
-
[R.kKickedByAdmin]:
|
|
142
|
-
[R.kKickedByLoggedOnOtherDevice]:
|
|
143
|
-
[R.kKickedByServer]:
|
|
144
|
-
[R.kNetworkDisconnected]:
|
|
145
|
-
[R.kJoinRoomStatusInvalidDuringOffline]:
|
|
146
|
-
[R.kCountOfJoinedRoomsExceedLimit]:
|
|
133
|
+
onKickedOutOfRoom(o) {
|
|
134
|
+
const { reason: e, message: n } = o, r = {
|
|
135
|
+
[R.kKickedByAdmin]: I.KickedByAdmin,
|
|
136
|
+
[R.kKickedByLoggedOnOtherDevice]: I.ReplacedByAnotherDevice,
|
|
137
|
+
[R.kKickedByServer]: I.KickedByServer,
|
|
138
|
+
[R.kNetworkDisconnected]: I.ConnectionTimeout,
|
|
139
|
+
[R.kJoinRoomStatusInvalidDuringOffline]: I.InvalidStatusOnReconnect,
|
|
140
|
+
[R.kCountOfJoinedRoomsExceedLimit]: I.RoomLimitExceeded
|
|
147
141
|
};
|
|
148
|
-
H(),
|
|
142
|
+
H(), s.emit(t.onKickedFromRoom, { reason: r[e], message: n });
|
|
149
143
|
}
|
|
150
|
-
onUserNetworkQualityChanged(
|
|
151
|
-
const { userNetworkList:
|
|
152
|
-
|
|
153
|
-
const { userId:
|
|
154
|
-
j.value.set(
|
|
144
|
+
onUserNetworkQualityChanged(o) {
|
|
145
|
+
const { userNetworkList: e } = o;
|
|
146
|
+
e.forEach((n) => {
|
|
147
|
+
const { userId: r, quality: i, upLoss: d, downLoss: p, delay: c } = n;
|
|
148
|
+
j.value.set(r, { quality: i, upLoss: d, downLoss: p, delay: c });
|
|
155
149
|
});
|
|
156
150
|
}
|
|
157
|
-
onRequestReceived({ request:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
151
|
+
onRequestReceived({ request: o }) {
|
|
152
|
+
var i, d, p;
|
|
153
|
+
const { fromUser: e, toUser: n } = o, r = {
|
|
154
|
+
timestamp: o.timestamp,
|
|
155
|
+
senderUserId: e.userId,
|
|
156
|
+
senderUserName: e.userName,
|
|
157
|
+
senderNameCard: e.nameCard,
|
|
158
|
+
senderAvatarUrl: e.avatarUrl,
|
|
159
|
+
content: o.content
|
|
165
160
|
};
|
|
166
|
-
switch (
|
|
167
|
-
case
|
|
168
|
-
|
|
169
|
-
invitation: { ...
|
|
161
|
+
switch (o.requestAction) {
|
|
162
|
+
case m.kRequestToOpenRemoteCamera:
|
|
163
|
+
h.set(`${a.Camera}_${e.userId}`, o), s.emit(t.onDeviceInvitationReceived, {
|
|
164
|
+
invitation: { ...r, deviceType: a.Camera }
|
|
165
|
+
});
|
|
166
|
+
break;
|
|
167
|
+
case m.kRequestToOpenRemoteMicrophone:
|
|
168
|
+
h.set(`${a.Microphone}_${e.userId}`, o), s.emit(t.onDeviceInvitationReceived, {
|
|
169
|
+
invitation: { ...r, deviceType: a.Microphone }
|
|
170
|
+
});
|
|
171
|
+
break;
|
|
172
|
+
case m.kApplyToAdminToOpenLocalCamera:
|
|
173
|
+
h.set(`${a.Camera}_${e.userId}`, o), s.emit(t.onDeviceRequestReceived, {
|
|
174
|
+
request: { ...r, deviceType: a.Camera }
|
|
175
|
+
});
|
|
176
|
+
break;
|
|
177
|
+
case m.kApplyToAdminToOpenLocalMicrophone:
|
|
178
|
+
h.set(`${a.Microphone}_${e.userId}`, o), s.emit(t.onDeviceRequestReceived, {
|
|
179
|
+
request: { ...r, deviceType: a.Microphone }
|
|
170
180
|
});
|
|
171
181
|
break;
|
|
172
|
-
case
|
|
173
|
-
|
|
174
|
-
|
|
182
|
+
case m.kApplyToAdminToOpenLocalScreenShare:
|
|
183
|
+
h.set(`${a.ScreenShare}_${e.userId}`, o), s.emit(t.onDeviceRequestReceived, {
|
|
184
|
+
request: { ...r, deviceType: a.ScreenShare }
|
|
175
185
|
});
|
|
176
186
|
break;
|
|
177
|
-
case
|
|
178
|
-
|
|
179
|
-
|
|
187
|
+
case m.kCloseRemoteCamera:
|
|
188
|
+
n.userId === ((i = A.value) == null ? void 0 : i.userId) && s.emit(t.onParticipantDeviceClosed, {
|
|
189
|
+
device: a.Camera,
|
|
190
|
+
operator: { userId: e.userId, userName: e.userName, avatarUrl: e.avatarUrl }
|
|
180
191
|
});
|
|
181
192
|
break;
|
|
182
|
-
case
|
|
183
|
-
|
|
184
|
-
|
|
193
|
+
case m.kCloseRemoteMicrophone:
|
|
194
|
+
n.userId === ((d = A.value) == null ? void 0 : d.userId) && s.emit(t.onParticipantDeviceClosed, {
|
|
195
|
+
device: a.Microphone,
|
|
196
|
+
operator: { userId: e.userId, userName: e.userName, avatarUrl: e.avatarUrl }
|
|
185
197
|
});
|
|
186
198
|
break;
|
|
187
|
-
case
|
|
188
|
-
|
|
189
|
-
|
|
199
|
+
case m.kCloseRemoteScreenShare:
|
|
200
|
+
n.userId === ((p = A.value) == null ? void 0 : p.userId) && s.emit(t.onParticipantDeviceClosed, {
|
|
201
|
+
device: a.ScreenShare,
|
|
202
|
+
operator: { userId: e.userId, userName: e.userName, avatarUrl: e.avatarUrl }
|
|
190
203
|
});
|
|
191
204
|
break;
|
|
192
205
|
}
|
|
193
206
|
}
|
|
194
|
-
onRequestCancelled({ request:
|
|
195
|
-
const { requestAction:
|
|
196
|
-
timestamp:
|
|
197
|
-
senderUserId:
|
|
198
|
-
senderUserName:
|
|
199
|
-
senderNameCard:
|
|
200
|
-
senderAvatarUrl:
|
|
207
|
+
onRequestCancelled({ request: o }) {
|
|
208
|
+
const { requestAction: e, fromUser: n } = o, r = {
|
|
209
|
+
timestamp: o.timestamp,
|
|
210
|
+
senderUserId: n.userId,
|
|
211
|
+
senderUserName: n.userName,
|
|
212
|
+
senderNameCard: n.nameCard,
|
|
213
|
+
senderAvatarUrl: n.avatarUrl,
|
|
201
214
|
content: "",
|
|
202
215
|
deviceType: a.Camera
|
|
203
|
-
},
|
|
204
|
-
switch (
|
|
205
|
-
case
|
|
206
|
-
|
|
207
|
-
invitation: { ...
|
|
216
|
+
}, i = t.onDeviceInvitationCancelled, d = t.onDeviceRequestCancelled;
|
|
217
|
+
switch (e) {
|
|
218
|
+
case m.kRequestToOpenRemoteCamera:
|
|
219
|
+
h.delete(`${a.Camera}_${n.userId}`), s.emit(i, {
|
|
220
|
+
invitation: { ...r, deviceType: a.Camera }
|
|
208
221
|
});
|
|
209
222
|
break;
|
|
210
|
-
case
|
|
211
|
-
|
|
212
|
-
invitation: { ...
|
|
223
|
+
case m.kRequestToOpenRemoteMicrophone:
|
|
224
|
+
h.delete(`${a.Microphone}_${n.userId}`), s.emit(i, {
|
|
225
|
+
invitation: { ...r, deviceType: a.Microphone }
|
|
213
226
|
});
|
|
214
227
|
break;
|
|
215
|
-
case
|
|
216
|
-
|
|
217
|
-
request: { ...
|
|
228
|
+
case m.kApplyToAdminToOpenLocalCamera:
|
|
229
|
+
h.delete(`${a.Camera}_${n.userId}`), s.emit(d, {
|
|
230
|
+
request: { ...r, deviceType: a.Camera }
|
|
218
231
|
});
|
|
219
232
|
break;
|
|
220
|
-
case
|
|
221
|
-
|
|
222
|
-
request: { ...
|
|
233
|
+
case m.kApplyToAdminToOpenLocalMicrophone:
|
|
234
|
+
h.delete(`${a.Microphone}_${n.userId}`), s.emit(d, {
|
|
235
|
+
request: { ...r, deviceType: a.Microphone }
|
|
223
236
|
});
|
|
224
237
|
break;
|
|
225
|
-
case
|
|
226
|
-
|
|
227
|
-
request: { ...
|
|
238
|
+
case m.kApplyToAdminToOpenLocalScreenShare:
|
|
239
|
+
h.delete(`${a.ScreenShare}_${n.userId}`), s.emit(d, {
|
|
240
|
+
request: { ...r, deviceType: a.ScreenShare }
|
|
228
241
|
});
|
|
229
242
|
break;
|
|
230
243
|
}
|
|
231
244
|
}
|
|
232
|
-
onRequestProcessed({ request:
|
|
233
|
-
const { requestAction:
|
|
234
|
-
timestamp:
|
|
245
|
+
onRequestProcessed({ request: o, userInfo: e }) {
|
|
246
|
+
const { requestAction: n, fromUser: r } = o, i = {
|
|
247
|
+
timestamp: o.timestamp,
|
|
248
|
+
senderUserId: r.userId,
|
|
249
|
+
senderUserName: r.userName,
|
|
250
|
+
senderNameCard: r.nameCard,
|
|
251
|
+
senderAvatarUrl: r.avatarUrl,
|
|
252
|
+
content: o.content
|
|
253
|
+
}, d = {
|
|
235
254
|
userId: e.userId,
|
|
236
255
|
userName: e.userName,
|
|
237
|
-
|
|
238
|
-
avatarUrl: e.avatarUrl,
|
|
239
|
-
content: "",
|
|
240
|
-
deviceType: a.Camera
|
|
241
|
-
}, d = {
|
|
242
|
-
userId: n.userId,
|
|
243
|
-
userName: n.userName,
|
|
244
|
-
avatarUrl: n.avatarUrl
|
|
256
|
+
avatarUrl: e.avatarUrl
|
|
245
257
|
};
|
|
246
|
-
switch (
|
|
247
|
-
case
|
|
248
|
-
|
|
249
|
-
request: { ...
|
|
258
|
+
switch (n) {
|
|
259
|
+
case m.kApplyToAdminToOpenLocalCamera:
|
|
260
|
+
h.delete(`${a.Camera}_${r.userId}`), s.emit(t.onDeviceRequestProcessed, {
|
|
261
|
+
request: { ...i, deviceType: a.Camera },
|
|
250
262
|
operator: d
|
|
251
263
|
});
|
|
252
264
|
break;
|
|
253
|
-
case
|
|
254
|
-
|
|
255
|
-
request: { ...
|
|
265
|
+
case m.kApplyToAdminToOpenLocalMicrophone:
|
|
266
|
+
h.delete(`${a.Microphone}_${r.userId}`), s.emit(t.onDeviceRequestProcessed, {
|
|
267
|
+
request: { ...i, deviceType: a.Microphone },
|
|
256
268
|
operator: d
|
|
257
269
|
});
|
|
258
270
|
break;
|
|
259
|
-
case
|
|
260
|
-
|
|
261
|
-
request: { ...
|
|
271
|
+
case m.kApplyToAdminToOpenLocalScreenShare:
|
|
272
|
+
h.delete(`${a.ScreenShare}_${r.userId}`), s.emit(t.onDeviceRequestProcessed, {
|
|
273
|
+
request: { ...i, deviceType: a.ScreenShare },
|
|
262
274
|
operator: d
|
|
263
275
|
});
|
|
264
276
|
break;
|
|
265
277
|
}
|
|
266
278
|
}
|
|
267
279
|
bindRoomEngineEvents() {
|
|
268
|
-
|
|
269
|
-
var e, n,
|
|
270
|
-
(
|
|
271
|
-
|
|
280
|
+
K.once("ready", () => {
|
|
281
|
+
var o, e, n, r, i, d, p, c, O, N, y, M, q, P, $, w;
|
|
282
|
+
(o = u.instance) == null || o.on(
|
|
283
|
+
l.onRemoteUserEnterRoom,
|
|
272
284
|
this.onRemoteUserEnterRoom
|
|
273
|
-
), (
|
|
274
|
-
|
|
285
|
+
), (e = u.instance) == null || e.on(
|
|
286
|
+
l.onRemoteUserLeaveRoom,
|
|
275
287
|
this.onRemoteUserLeaveRoom
|
|
276
|
-
), (
|
|
277
|
-
|
|
288
|
+
), (n = u.instance) == null || n.on(
|
|
289
|
+
l.onUserVideoStateChanged,
|
|
278
290
|
this.onUserVideoStateChanged
|
|
279
|
-
), (
|
|
280
|
-
|
|
291
|
+
), (r = u.instance) == null || r.on(
|
|
292
|
+
l.onUserAudioStateChanged,
|
|
281
293
|
this.onUserAudioStateChanged
|
|
282
|
-
), (
|
|
283
|
-
|
|
294
|
+
), (i = u.instance) == null || i.on(
|
|
295
|
+
l.onUserVoiceVolumeChanged,
|
|
284
296
|
this.onUserVoiceVolumeChanged
|
|
285
|
-
), (d =
|
|
286
|
-
|
|
297
|
+
), (d = u.instance) == null || d.on(
|
|
298
|
+
l.onUserInfoChanged,
|
|
287
299
|
this.onUserInfoChanged
|
|
288
|
-
), (
|
|
289
|
-
|
|
300
|
+
), (p = u.instance) == null || p.on(
|
|
301
|
+
l.onSendMessageForUserDisableChanged,
|
|
290
302
|
this.onSendMessageForUserDisableChanged
|
|
291
|
-
), (c =
|
|
292
|
-
|
|
303
|
+
), (c = u.instance) == null || c.on(
|
|
304
|
+
l.onUserNetworkQualityChanged,
|
|
293
305
|
this.onUserNetworkQualityChanged
|
|
294
|
-
), (
|
|
295
|
-
|
|
306
|
+
), (O = u.instance) == null || O.on(
|
|
307
|
+
l.onKickedOutOfRoom,
|
|
296
308
|
this.onKickedOutOfRoom
|
|
297
|
-
), (
|
|
298
|
-
|
|
309
|
+
), (N = u.instance) == null || N.on(
|
|
310
|
+
l.onAllUserCameraDisableChanged,
|
|
299
311
|
this.onAllUserCameraDisableChanged
|
|
300
|
-
), (
|
|
301
|
-
|
|
312
|
+
), (y = u.instance) == null || y.on(
|
|
313
|
+
l.onAllUserMicrophoneDisableChanged,
|
|
302
314
|
this.onAllUserMicrophoneDisableChanged
|
|
303
|
-
), (
|
|
304
|
-
|
|
315
|
+
), (M = u.instance) == null || M.on(
|
|
316
|
+
l.onScreenShareForAllUserDisableChanged,
|
|
305
317
|
this.onScreenShareForAllUserDisableChanged
|
|
306
|
-
), (
|
|
307
|
-
|
|
318
|
+
), (q = u.instance) == null || q.on(
|
|
319
|
+
l.onSendMessageForAllUserDisableChanged,
|
|
308
320
|
this.onSendMessageForAllUserDisableChanged
|
|
309
|
-
), (
|
|
310
|
-
|
|
321
|
+
), (P = u.instance) == null || P.on(
|
|
322
|
+
l.onRequestReceived,
|
|
311
323
|
this.onRequestReceived
|
|
312
|
-
), (
|
|
313
|
-
|
|
324
|
+
), ($ = u.instance) == null || $.on(
|
|
325
|
+
l.onRequestCancelled,
|
|
314
326
|
this.onRequestCancelled
|
|
315
|
-
), (
|
|
316
|
-
|
|
327
|
+
), (w = u.instance) == null || w.on(
|
|
328
|
+
l.onRequestProcessed,
|
|
317
329
|
this.onRequestProcessed
|
|
318
330
|
);
|
|
319
331
|
});
|
|
320
332
|
}
|
|
321
333
|
};
|
|
322
|
-
|
|
323
|
-
let
|
|
334
|
+
L(S, "instance");
|
|
335
|
+
let E = S;
|
|
324
336
|
export {
|
|
325
|
-
|
|
337
|
+
E as default
|
|
326
338
|
};
|
|
@@ -74,6 +74,8 @@ export interface IParticipantManager {
|
|
|
74
74
|
device: DeviceType;
|
|
75
75
|
userId: string;
|
|
76
76
|
}): Promise<void>;
|
|
77
|
+
muteMicrophone(): Promise<void>;
|
|
78
|
+
unmuteMicrophone(): Promise<void>;
|
|
77
79
|
}
|
|
78
80
|
/**
|
|
79
81
|
* 用户自定义信息类型
|
|
@@ -266,6 +268,8 @@ export default class ParticipantManager implements IParticipantManager {
|
|
|
266
268
|
device: DeviceType;
|
|
267
269
|
userId: string;
|
|
268
270
|
}): Promise<void>;
|
|
271
|
+
muteMicrophone(): Promise<void>;
|
|
272
|
+
unmuteMicrophone(): Promise<void>;
|
|
269
273
|
private onRequestReceived;
|
|
270
274
|
/**
|
|
271
275
|
* 处理请求取消事件
|