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,46 +1,49 @@
|
|
|
1
1
|
import { ref as o } from "vue";
|
|
2
|
-
import { TUIStore as
|
|
3
|
-
let
|
|
4
|
-
const d = o(void 0), a = o(void 0), u = o(void 0),
|
|
2
|
+
import { TUIStore as r, StoreName as v, TUIChatService as m } from "@tencentcloud/chat-uikit-engine";
|
|
3
|
+
let f;
|
|
4
|
+
const d = o(void 0), a = o(void 0), u = o(void 0), l = o(void 0), p = o(void 0), c = o(void 0), R = o(/* @__PURE__ */ new Set()), n = o(/* @__PURE__ */ new Set());
|
|
5
5
|
function M() {
|
|
6
|
-
d.value = void 0, a.value = void 0, u.value = void 0,
|
|
6
|
+
d.value = void 0, a.value = void 0, u.value = void 0, l.value = void 0, c.value = void 0, n.value = /* @__PURE__ */ new Set();
|
|
7
7
|
}
|
|
8
8
|
function L(t) {
|
|
9
|
-
|
|
9
|
+
p.value = t;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function D(t) {
|
|
12
12
|
c.value = t;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function w({ messageID: t, duration: i }) {
|
|
15
15
|
n.value.add(t), setTimeout(() => {
|
|
16
16
|
n.value.delete(t);
|
|
17
17
|
}, i);
|
|
18
18
|
}
|
|
19
|
+
async function k() {
|
|
20
|
+
return m.getMessageList();
|
|
21
|
+
}
|
|
19
22
|
function g() {
|
|
20
23
|
return {
|
|
21
24
|
// state
|
|
22
25
|
activeConversationID: d,
|
|
23
26
|
messageList: a,
|
|
24
27
|
hasMoreOlderMessage: u,
|
|
25
|
-
hasMoreNewerMessage:
|
|
26
|
-
enableReadReceipt:
|
|
28
|
+
hasMoreNewerMessage: l,
|
|
29
|
+
enableReadReceipt: p,
|
|
27
30
|
isDisableScroll: c,
|
|
28
|
-
recalledMessageIDSet:
|
|
31
|
+
recalledMessageIDSet: R,
|
|
29
32
|
highlightMessageIDSet: n,
|
|
30
33
|
// actions
|
|
31
|
-
loadMoreOlderMessage:
|
|
34
|
+
loadMoreOlderMessage: k,
|
|
32
35
|
// TODO
|
|
33
36
|
// loadMoreNewerMessage: TUIChatService.getMessageList,
|
|
34
37
|
setEnableReadReceipt: L,
|
|
35
|
-
setIsDisableScroll:
|
|
36
|
-
highlightMessage:
|
|
38
|
+
setIsDisableScroll: D,
|
|
39
|
+
highlightMessage: w
|
|
37
40
|
};
|
|
38
41
|
}
|
|
39
|
-
const
|
|
42
|
+
const y = () => {
|
|
40
43
|
function t(s) {
|
|
41
44
|
if (!d.value)
|
|
42
45
|
return;
|
|
43
|
-
function
|
|
46
|
+
function S(e) {
|
|
44
47
|
return {
|
|
45
48
|
...e,
|
|
46
49
|
// 🎯 re-create frequently changing properties to ensure React can detect changes
|
|
@@ -66,25 +69,25 @@ const k = () => {
|
|
|
66
69
|
replyMessage: () => e.replyMessage()
|
|
67
70
|
};
|
|
68
71
|
}
|
|
69
|
-
const C = s.map(
|
|
72
|
+
const C = s.map(S);
|
|
70
73
|
a.value = C, a.value.forEach((e) => {
|
|
71
|
-
e.isRevoked &&
|
|
74
|
+
e.isRevoked && R.value.add(e.ID);
|
|
72
75
|
});
|
|
73
76
|
}
|
|
74
77
|
function i(s) {
|
|
75
78
|
u.value = !s;
|
|
76
79
|
}
|
|
77
|
-
function
|
|
78
|
-
(!s || s !==
|
|
80
|
+
function I(s) {
|
|
81
|
+
(!s || s !== f) && (M(), d.value = s), f = s || void 0;
|
|
79
82
|
}
|
|
80
|
-
|
|
81
|
-
currentConversationID:
|
|
82
|
-
}),
|
|
83
|
+
r.watch(v.CONV, {
|
|
84
|
+
currentConversationID: I
|
|
85
|
+
}), r.watch(v.CHAT, {
|
|
83
86
|
messageList: t,
|
|
84
87
|
isCompleted: i
|
|
85
88
|
});
|
|
86
89
|
};
|
|
87
|
-
|
|
90
|
+
y();
|
|
88
91
|
export {
|
|
89
92
|
g as useMessageListState
|
|
90
93
|
};
|
|
@@ -2,46 +2,46 @@ import { watch as I } from "vue";
|
|
|
2
2
|
import { useRoomEngine as D } from "../../hooks/useRoomEngine.js";
|
|
3
3
|
import { dataReport as P } from "../../report/dataReport.js";
|
|
4
4
|
import { MetricsKey as g } from "../../report/MetricsKey.js";
|
|
5
|
-
import { eventCenter as
|
|
5
|
+
import { eventCenter as v } from "../../utils/eventCenter.js";
|
|
6
6
|
import { useLoginState as O } from "../LoginState.js";
|
|
7
|
-
import { useRoomState as
|
|
8
|
-
import
|
|
9
|
-
import { participantTransfer as
|
|
7
|
+
import { useRoomState as M } from "../RoomState/index.js";
|
|
8
|
+
import T from "./callEventManager.js";
|
|
9
|
+
import { participantTransfer as R } from "./common.js";
|
|
10
10
|
import A from "./participantEventManager.js";
|
|
11
11
|
import E from "./participantManager.js";
|
|
12
|
-
import
|
|
13
|
-
import { useRoomParticipantStore as
|
|
14
|
-
let
|
|
15
|
-
async function
|
|
12
|
+
import h from "./scheduleEventManager.js";
|
|
13
|
+
import { useRoomParticipantStore as s } from "./store.js";
|
|
14
|
+
let p = null, u = !1;
|
|
15
|
+
async function w() {
|
|
16
16
|
var a, r, c;
|
|
17
|
-
const e = D(), { loginUserInfo: i } = O(), { addParticipantInfo: t } =
|
|
17
|
+
const e = D(), { loginUserInfo: i } = O(), { addParticipantInfo: t } = s();
|
|
18
18
|
if (!((a = i.value) != null && a.userId))
|
|
19
19
|
return;
|
|
20
|
-
const n = await ((c = e.instance) == null ? void 0 : c.getUserInfo({ userId: (r = i.value) == null ? void 0 : r.userId })), o =
|
|
20
|
+
const n = await ((c = e.instance) == null ? void 0 : c.getUserInfo({ userId: (r = i.value) == null ? void 0 : r.userId })), o = R.transformTUIUserInfoToParticipantInfo(n);
|
|
21
21
|
t(o);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
const { currentRoom: e } =
|
|
23
|
+
function C() {
|
|
24
|
+
if (p || (p = new E(), new A(), new T(), new h()), !u) {
|
|
25
|
+
u = !0;
|
|
26
|
+
const { currentRoom: e } = M(), { reset: i } = s();
|
|
27
27
|
I(() => {
|
|
28
28
|
var t;
|
|
29
29
|
return (t = e.value) == null ? void 0 : t.roomId;
|
|
30
30
|
}, async (t, n) => {
|
|
31
|
-
!n && t && await
|
|
31
|
+
!n && t && await w(), n && !t && i();
|
|
32
32
|
}, { immediate: !0 });
|
|
33
33
|
}
|
|
34
|
-
return
|
|
34
|
+
return p;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
36
|
+
function d(e, i) {
|
|
37
|
+
v.on(e, i);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
39
|
+
function m(e, i) {
|
|
40
|
+
v.off(e, i);
|
|
41
41
|
}
|
|
42
42
|
function Q() {
|
|
43
43
|
P.reportCount(g.T_METRICS_STATE_ROOM_PARTICIPANT_STATE_COUNT);
|
|
44
|
-
const e =
|
|
44
|
+
const e = C(), {
|
|
45
45
|
participantList: i,
|
|
46
46
|
participantListCursor: t,
|
|
47
47
|
participantListWithVideo: n,
|
|
@@ -52,7 +52,7 @@ function Q() {
|
|
|
52
52
|
speakingUsers: l,
|
|
53
53
|
networkQualities: f,
|
|
54
54
|
pendingParticipantList: b
|
|
55
|
-
} =
|
|
55
|
+
} = s();
|
|
56
56
|
return {
|
|
57
57
|
participantList: i,
|
|
58
58
|
participantListCursor: t,
|
|
@@ -83,8 +83,67 @@ function Q() {
|
|
|
83
83
|
cancelOpenDeviceInvitation: e.cancelOpenDeviceInvitation.bind(e),
|
|
84
84
|
acceptOpenDeviceInvitation: e.acceptOpenDeviceInvitation.bind(e),
|
|
85
85
|
declineOpenDeviceInvitation: e.declineOpenDeviceInvitation.bind(e),
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
/**
|
|
87
|
+
* 静音本地麦克风
|
|
88
|
+
* @description 静音本地麦克风, 常用于打开麦克风场景下但不向远端推音频流
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* // 打开麦克风但不向远端推音频流(常用于会议场景下短暂静音场景)
|
|
92
|
+
* import { useDeviceState } from 'tuikit-atomicx-vue3/room';
|
|
93
|
+
* import { useRoomParticipantState } from 'tuikit-atomicx-vue3/room';
|
|
94
|
+
* const { openLocalMicrophone } = useDeviceState();
|
|
95
|
+
* const { muteMicrophone, unmuteMicrophone } = useRoomParticipantState();
|
|
96
|
+
* await openLocalMicrophone();
|
|
97
|
+
* await muteMicrophone();
|
|
98
|
+
* ```
|
|
99
|
+
* @returns {Promise<void>}
|
|
100
|
+
*/
|
|
101
|
+
muteMicrophone: e.muteMicrophone.bind(e),
|
|
102
|
+
/**
|
|
103
|
+
* 取消静音本地麦克风
|
|
104
|
+
* @description 取消静音本地麦克风,恢复 muteMicrophone 操作导致的音频传输中断。
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* import { useDeviceState } from 'tuikit-atomicx-vue3/room';
|
|
108
|
+
* import { useRoomParticipantState } from 'tuikit-atomicx-vue3/room';
|
|
109
|
+
* const { openLocalMicrophone } = useDeviceState();
|
|
110
|
+
* const { muteMicrophone, unmuteMicrophone } = useRoomParticipantState();
|
|
111
|
+
* await openLocalMicrophone();
|
|
112
|
+
* await unmuteMicrophone();
|
|
113
|
+
* ```
|
|
114
|
+
* @returns {Promise<void>}
|
|
115
|
+
*/
|
|
116
|
+
unmuteMicrophone: e.unmuteMicrophone.bind(e),
|
|
117
|
+
/**
|
|
118
|
+
* 订阅房间参与者事件
|
|
119
|
+
* @description 订阅房间参与者相关的事件,当事件触发时会调用回调函数
|
|
120
|
+
* @param {RoomParticipantEvent} event - 要订阅的事件名称,可选值包括:
|
|
121
|
+
* - onParticipantJoined: 参与者加入房间
|
|
122
|
+
* - onParticipantLeft: 参与者离开房间
|
|
123
|
+
* - onOwnerChanged: 房间所有者变更
|
|
124
|
+
* - onAdminSet: 用户被设为管理员
|
|
125
|
+
* - onAdminRevoked: 用户管理员权限被撤销
|
|
126
|
+
* - onKickedFromRoom: 被踢出房间
|
|
127
|
+
* - onParticipantDeviceClosed: 设备被关闭
|
|
128
|
+
* - onParticipantMessageMuted: 被禁言/解禁
|
|
129
|
+
* - onAllDevicesDisabled: 全体设备被禁用/启用
|
|
130
|
+
* - onAllMessagesDisabled: 全体消息被禁用/启用
|
|
131
|
+
* - onDeviceRequestReceived: 收到设备开启申请
|
|
132
|
+
* - onDeviceRequestCancelled: 设备开启申请被取消
|
|
133
|
+
* - onDeviceRequestTimeout: 设备开启申请超时
|
|
134
|
+
* - onDeviceRequestApproved: 设备开启申请被批准
|
|
135
|
+
* - onDeviceRequestRejected: 设备开启申请被拒绝
|
|
136
|
+
* - onDeviceRequestProcessed: 设备开启申请已被处理
|
|
137
|
+
* - onDeviceInvitationReceived: 收到设备开启邀请
|
|
138
|
+
* - onDeviceInvitationCancelled: 设备开启邀请被取消
|
|
139
|
+
* - onDeviceInvitationTimeout: 设备开启邀请超时
|
|
140
|
+
* - onDeviceInvitationAccepted: 设备开启邀请被接受
|
|
141
|
+
* - onDeviceInvitationDeclined: 设备开启邀请被拒绝
|
|
142
|
+
* @param {Function} callback - 事件回调函数,参数类型根据事件类型而定
|
|
143
|
+
* @returns {void}
|
|
144
|
+
*/
|
|
145
|
+
subscribeEvent: d.bind(d),
|
|
146
|
+
unsubscribeEvent: m.bind(m)
|
|
88
147
|
};
|
|
89
148
|
}
|
|
90
149
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TUIVideoStreamType, TUIRole, TUIKickedOutOfRoomReason, TUIUserInfo, TUIRequest, TUIChangeReason } from '@tencentcloud/tuiroom-engine-js';
|
|
2
2
|
import { RoomParticipantRole } from '../../types';
|
|
3
3
|
|
|
4
4
|
export default class ParticipantEventManager {
|
|
@@ -54,7 +54,7 @@ export default class ParticipantEventManager {
|
|
|
54
54
|
onRequestReceived({ request }: {
|
|
55
55
|
request: TUIRequest;
|
|
56
56
|
}): void;
|
|
57
|
-
onRequestCancelled({ request
|
|
57
|
+
onRequestCancelled({ request }: {
|
|
58
58
|
request: TUIRequest;
|
|
59
59
|
userInfo: TUIUserInfo;
|
|
60
60
|
}): void;
|