@tencentcloud/roomkit-electron-vue3 2.3.3 → 2.4.1
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/es/components/Chat/ChatEditor/index.vue.mjs +1 -1
- package/es/components/Chat/ChatEditor/index.vue2.mjs +4 -4
- package/es/components/Chat/ChatEditor/useChatEditor.d.ts +1 -2
- package/es/components/Chat/ChatEditor/useChatEditor.mjs +4 -12
- package/es/components/ManageMember/MemberControl/index.vue.mjs +1 -1
- package/es/components/ManageMember/MemberControl/index.vue2.mjs +5 -4
- package/es/components/ManageMember/MemberControl/useMemberControlHooks.mjs +35 -12
- package/es/components/ManageMember/useIndexHooks.mjs +2 -1
- package/es/components/RoomFooter/ApplyControl/MemberApplyControl.vue.mjs +1 -1
- package/es/components/RoomFooter/ApplyControl/MemberApplyControl.vue2.mjs +2 -2
- package/es/components/RoomFooter/EndControl/useEndControlHooks.mjs +1 -1
- package/es/components/RoomFooter/VirtualBackground.vue.mjs +1 -1
- package/es/components/RoomFooter/VirtualBackground.vue2.mjs +87 -27
- package/es/components/RoomFooter/index/index.vue.mjs +1 -1
- package/es/components/RoomFooter/index/index.vue2.mjs +0 -2
- package/es/components/RoomHeader/RoomInfo/useRoomInfoHooks.mjs +2 -2
- package/es/components/RoomHeader/index/LayoutControl.vue.mjs +1 -1
- package/es/components/RoomHeader/index/LayoutControl.vue2.mjs +1 -3
- package/es/components/RoomHeader/index/NetworkInfo.vue.mjs +1 -1
- package/es/components/RoomHeader/index/NetworkInfo.vue2.mjs +0 -2
- package/es/components/common/base/MessageBox/index.mjs +3 -1
- package/es/conference.d.ts +1 -1
- package/es/conference.mjs +9 -0
- package/es/conference.vue.mjs +1 -1
- package/es/conference.vue2.mjs +1 -14
- package/es/constants/room.d.ts +3 -1
- package/es/extension/RoomMessageCard/RoomMessageCard.vue.mjs +1 -1
- package/es/extension/RoomMessageCard/RoomMessageCard.vue2.mjs +2 -2
- package/es/extension/chatExtension.mjs +4 -2
- package/es/hooks/useDeviceManager.d.ts +3 -1
- package/es/hooks/useMasterApplyControl.mjs +16 -10
- package/es/hooks/useRoomEngine.d.ts +3 -1
- package/es/index.d.ts +3 -2
- package/es/index.mjs +1519 -1456
- package/es/locales/en-US.d.ts +9 -9
- package/es/locales/en-US.mjs +10 -10
- package/es/locales/zh-CN.d.ts +11 -11
- package/es/locales/zh-CN.mjs +12 -12
- package/es/services/function/virtualBackground.d.ts +2 -0
- package/es/services/function/virtualBackground.mjs +19 -9
- package/es/services/function/waterMark.mjs +3 -0
- package/es/services/manager/componentManager.mjs +1 -1
- package/es/services/manager/roomActionManager.mjs +1 -1
- package/es/services/roomService.d.ts +3 -4
- package/es/services/roomService.mjs +2 -26
- package/es/stores/chat.mjs +3 -3
- package/es/stores/room.d.ts +1 -1
- package/es/stores/room.mjs +11 -10
- package/lib/components/Chat/ChatEditor/index.vue.js +1 -1
- package/lib/components/Chat/ChatEditor/index.vue2.js +4 -4
- package/lib/components/Chat/ChatEditor/useChatEditor.d.ts +1 -2
- package/lib/components/Chat/ChatEditor/useChatEditor.js +3 -11
- package/lib/components/ManageMember/MemberControl/index.vue.js +1 -1
- package/lib/components/ManageMember/MemberControl/index.vue2.js +4 -3
- package/lib/components/ManageMember/MemberControl/useMemberControlHooks.js +35 -12
- package/lib/components/ManageMember/useIndexHooks.js +2 -1
- package/lib/components/RoomFooter/ApplyControl/MemberApplyControl.vue.js +1 -1
- package/lib/components/RoomFooter/ApplyControl/MemberApplyControl.vue2.js +2 -2
- package/lib/components/RoomFooter/EndControl/useEndControlHooks.js +1 -1
- package/lib/components/RoomFooter/VirtualBackground.vue.js +1 -1
- package/lib/components/RoomFooter/VirtualBackground.vue2.js +86 -26
- package/lib/components/RoomFooter/index/index.vue.js +1 -1
- package/lib/components/RoomFooter/index/index.vue2.js +0 -2
- package/lib/components/RoomHeader/RoomInfo/useRoomInfoHooks.js +2 -2
- package/lib/components/RoomHeader/index/LayoutControl.vue.js +1 -1
- package/lib/components/RoomHeader/index/LayoutControl.vue2.js +1 -3
- package/lib/components/RoomHeader/index/NetworkInfo.vue.js +1 -1
- package/lib/components/RoomHeader/index/NetworkInfo.vue2.js +0 -2
- package/lib/components/common/base/MessageBox/index.js +3 -1
- package/lib/conference.d.ts +1 -1
- package/lib/conference.js +9 -0
- package/lib/conference.vue.js +1 -1
- package/lib/conference.vue2.js +10 -23
- package/lib/constants/room.d.ts +3 -1
- package/lib/extension/RoomMessageCard/RoomMessageCard.vue.js +1 -1
- package/lib/extension/RoomMessageCard/RoomMessageCard.vue2.js +2 -2
- package/lib/extension/chatExtension.js +4 -2
- package/lib/hooks/useDeviceManager.d.ts +3 -1
- package/lib/hooks/useMasterApplyControl.js +16 -10
- package/lib/hooks/useRoomEngine.d.ts +3 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +1517 -1454
- package/lib/locales/en-US.d.ts +9 -9
- package/lib/locales/en-US.js +10 -10
- package/lib/locales/zh-CN.d.ts +11 -11
- package/lib/locales/zh-CN.js +12 -12
- package/lib/services/function/virtualBackground.d.ts +2 -0
- package/lib/services/function/virtualBackground.js +19 -9
- package/lib/services/function/waterMark.js +3 -0
- package/lib/services/manager/componentManager.js +1 -1
- package/lib/services/manager/roomActionManager.js +1 -1
- package/lib/services/roomService.d.ts +3 -4
- package/lib/services/roomService.js +2 -26
- package/lib/stores/chat.js +3 -3
- package/lib/stores/room.d.ts +1 -1
- package/lib/stores/room.js +11 -10
- package/package.json +2 -2
- package/src/TUIRoom/assets/style/global.scss +1 -1
- package/src/TUIRoom/components/Chat/ChatEditor/index.vue +4 -4
- package/src/TUIRoom/components/Chat/ChatEditor/useChatEditor.ts +4 -13
- package/src/TUIRoom/components/ManageMember/MemberControl/index.vue +5 -4
- package/src/TUIRoom/components/ManageMember/MemberControl/useMemberControlHooks.ts +36 -13
- package/src/TUIRoom/components/ManageMember/useIndexHooks.ts +3 -2
- package/src/TUIRoom/components/RoomFooter/ApplyControl/MemberApplyControl.vue +2 -2
- package/src/TUIRoom/components/RoomFooter/EndControl/useEndControlHooks.ts +1 -1
- package/src/TUIRoom/components/RoomFooter/VirtualBackground.vue +100 -16
- package/src/TUIRoom/components/RoomFooter/index/index.vue +0 -3
- package/src/TUIRoom/components/RoomHeader/RoomInfo/useRoomInfoHooks.ts +2 -2
- package/src/TUIRoom/components/RoomHeader/index/LayoutControl.vue +0 -2
- package/src/TUIRoom/components/RoomHeader/index/NetworkInfo.vue +0 -2
- package/src/TUIRoom/components/common/base/MessageBox/index.ts +2 -1
- package/src/TUIRoom/conference.vue +8 -13
- package/src/TUIRoom/extension/RoomMessageCard/RoomMessageCard.vue +1 -1
- package/src/TUIRoom/extension/RoomMessageCard/roomMessageCard.scss +3 -0
- package/src/TUIRoom/extension/chatExtension.ts +3 -1
- package/src/TUIRoom/hooks/useMasterApplyControl.ts +15 -10
- package/src/TUIRoom/index.ts +12 -3
- package/src/TUIRoom/locales/en-US.ts +9 -9
- package/src/TUIRoom/locales/zh-CN.ts +11 -11
- package/src/TUIRoom/services/function/virtualBackground.ts +21 -9
- package/src/TUIRoom/services/function/waterMark.ts +6 -0
- package/src/TUIRoom/services/manager/componentManager.ts +1 -1
- package/src/TUIRoom/services/manager/roomActionManager.ts +1 -1
- package/src/TUIRoom/services/roomService.ts +0 -29
- package/src/TUIRoom/stores/chat.ts +5 -6
- package/src/TUIRoom/stores/room.ts +13 -12
- package/es/utils/aegis/config.mjs +0 -12
- package/es/utils/aegis/index.mjs +0 -63
- package/lib/utils/aegis/config.js +0 -12
- package/lib/utils/aegis/index.js +0 -63
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="['chat-editor', { 'disable':
|
|
2
|
+
<div :class="['chat-editor', { 'disable': isMessageDisabled }]">
|
|
3
3
|
<emoji class="chat-emoji" @choose-emoji="handleChooseEmoji"></emoji>
|
|
4
4
|
<textarea
|
|
5
5
|
ref="editorInputEle"
|
|
6
6
|
v-model="sendMsg"
|
|
7
|
-
:disabled="
|
|
7
|
+
:disabled="isMessageDisabled"
|
|
8
8
|
class="content-bottom-input"
|
|
9
|
-
:placeholder="
|
|
9
|
+
:placeholder="isMessageDisabled ? t('Muted by the moderator') : t('Type a message')"
|
|
10
10
|
@keyup.enter="sendMessage"
|
|
11
11
|
/>
|
|
12
12
|
</div>
|
|
@@ -19,7 +19,7 @@ const {
|
|
|
19
19
|
t,
|
|
20
20
|
editorInputEle,
|
|
21
21
|
sendMsg,
|
|
22
|
-
|
|
22
|
+
isMessageDisabled,
|
|
23
23
|
sendMessage,
|
|
24
24
|
handleChooseEmoji,
|
|
25
25
|
} = useChatEditor();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ref, watch } from 'vue';
|
|
2
2
|
import { storeToRefs } from 'pinia';
|
|
3
3
|
import TUIMessage from '../../common/base/Message/index';
|
|
4
4
|
|
|
@@ -18,23 +18,15 @@ export default function useChatEditor() {
|
|
|
18
18
|
const roomStore = useRoomStore();
|
|
19
19
|
|
|
20
20
|
const { roomId } = storeToRefs(basicStore);
|
|
21
|
-
const {
|
|
22
|
-
const { isMessageDisableForAllUser } = storeToRefs(roomStore);
|
|
21
|
+
const { isMessageDisabled } = storeToRefs(chatStore);
|
|
23
22
|
const editorInputEle = ref();
|
|
24
23
|
const sendMsg = ref('');
|
|
25
24
|
const isEmojiToolbarVisible = ref(false);
|
|
26
|
-
watch(
|
|
25
|
+
watch(isMessageDisabled, (value) => {
|
|
27
26
|
if (value) {
|
|
28
27
|
sendMsg.value = '';
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
|
-
|
|
32
|
-
watch(isMessageDisableForAllUser, (value) => {
|
|
33
|
-
if (value) {
|
|
34
|
-
sendMsg.value = '';
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const cannotSendMessage = computed(() => Boolean(isMessageDisableByAdmin.value || isMessageDisableForAllUser.value));
|
|
38
30
|
const sendMessage = async () => {
|
|
39
31
|
const result = decodeSendTextMsg(sendMsg.value);
|
|
40
32
|
if (result === '') {
|
|
@@ -85,8 +77,7 @@ export default function useChatEditor() {
|
|
|
85
77
|
t,
|
|
86
78
|
editorInputEle,
|
|
87
79
|
sendMsg,
|
|
88
|
-
|
|
89
|
-
cannotSendMessage,
|
|
80
|
+
isMessageDisabled,
|
|
90
81
|
sendMessage,
|
|
91
82
|
handleChooseEmoji,
|
|
92
83
|
isEmojiToolbarVisible,
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
52
|
<script setup lang="ts">
|
|
53
|
-
import { ref, watch, computed } from 'vue';
|
|
53
|
+
import { ref, watch, computed, nextTick } from 'vue';
|
|
54
54
|
import { useI18n } from '../../../locales';
|
|
55
55
|
import TuiButton from '../../common/base/Button.vue';
|
|
56
56
|
import Dialog from '../../common/base/Dialog/index.vue';
|
|
@@ -89,16 +89,16 @@ watch(() => props.showMemberControl, (val) => {
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
function toggleClickMoreBtn() {
|
|
92
|
+
async function toggleClickMoreBtn() {
|
|
93
93
|
if (showMoreControl.value) {
|
|
94
94
|
showMoreControl.value = false;
|
|
95
95
|
} else {
|
|
96
|
-
handleDropDownPosition();
|
|
96
|
+
await handleDropDownPosition();
|
|
97
97
|
showMoreControl.value = true;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
function handleDropDownPosition() {
|
|
101
|
+
async function handleDropDownPosition() {
|
|
102
102
|
const { top, bottom } = moreBtnRef.value?.getBoundingClientRect();
|
|
103
103
|
const { top: containerTop, bottom: containerBottom } = document.getElementById('memberListContainer')?.getBoundingClientRect() as DOMRect;
|
|
104
104
|
if (!containerBottom || !containerTop) {
|
|
@@ -109,6 +109,7 @@ function handleDropDownPosition() {
|
|
|
109
109
|
let dropDownContainerHeight = 0;
|
|
110
110
|
if (!showMoreControl.value) {
|
|
111
111
|
operateListRef.value.style = 'display:block;position:absolute;z-index:-1000';
|
|
112
|
+
await nextTick();
|
|
112
113
|
dropDownContainerHeight = operateListRef.value.offsetHeight;
|
|
113
114
|
operateListRef.value.style = '';
|
|
114
115
|
} else {
|
|
@@ -40,7 +40,14 @@ export default function useMemberControl(props?: any) {
|
|
|
40
40
|
});
|
|
41
41
|
const kickOffDialogContent = computed(() => t('whether to kick sb off the room', { name: props.userInfo.userName || props.userInfo.userId }));
|
|
42
42
|
const transferOwnerTitle = computed(() => t('Transfer the roomOwner to sb', { name: props.userInfo.userName || props.userInfo.userId }));
|
|
43
|
-
const {
|
|
43
|
+
const {
|
|
44
|
+
isFreeSpeakMode,
|
|
45
|
+
isSpeakAfterTakingSeatMode,
|
|
46
|
+
localUser,
|
|
47
|
+
isGeneralUser,
|
|
48
|
+
anchorUserList,
|
|
49
|
+
maxSeatCount,
|
|
50
|
+
} = storeToRefs(roomStore);
|
|
44
51
|
/**
|
|
45
52
|
* Functions related to the Raise Your Hand function
|
|
46
53
|
**/
|
|
@@ -110,21 +117,21 @@ export default function useMemberControl(props?: any) {
|
|
|
110
117
|
const chatControl = computed(() => ({
|
|
111
118
|
key: 'chatControl',
|
|
112
119
|
icon: ChatForbiddenIcon,
|
|
113
|
-
title: props.userInfo.
|
|
120
|
+
title: props.userInfo.isMessageDisabled ? t('Enable chat') : t('Disable chat'),
|
|
114
121
|
func: disableUserChat,
|
|
115
122
|
}));
|
|
116
123
|
|
|
117
124
|
const transferOwner = computed(() => ({
|
|
118
125
|
key: 'transferOwner',
|
|
119
126
|
icon: TransferOwnerIcon,
|
|
120
|
-
title: t('
|
|
127
|
+
title: t('Make host'),
|
|
121
128
|
func: () => handleOpenDialog('transferOwner'),
|
|
122
129
|
}));
|
|
123
130
|
|
|
124
131
|
const setOrRevokeAdmin = computed(() => ({
|
|
125
132
|
key: 'setOrRevokeAdmin',
|
|
126
133
|
icon: props.userInfo.userRole === TUIRole.kAdministrator ? RevokeAdminIcon : SetAdminIcon,
|
|
127
|
-
title: props.userInfo.userRole === TUIRole.kAdministrator ? t('
|
|
134
|
+
title: props.userInfo.userRole === TUIRole.kAdministrator ? t('Remove administrator') : t('Set as administrator'),
|
|
128
135
|
func: handleSetOrRevokeAdmin,
|
|
129
136
|
}));
|
|
130
137
|
|
|
@@ -159,6 +166,14 @@ export default function useMemberControl(props?: any) {
|
|
|
159
166
|
if (isInvitingUserToAnchor) {
|
|
160
167
|
cancelInviteUserOnStage(userInfo);
|
|
161
168
|
} else {
|
|
169
|
+
if (anchorUserList.value.length === maxSeatCount.value) {
|
|
170
|
+
TUIMessage({
|
|
171
|
+
type: 'warning',
|
|
172
|
+
message: `${t('The stage is full')}`,
|
|
173
|
+
duration: MESSAGE_DURATION.NORMAL,
|
|
174
|
+
});
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
162
177
|
inviteUserOnStage(userInfo);
|
|
163
178
|
}
|
|
164
179
|
}
|
|
@@ -263,13 +278,21 @@ export default function useMemberControl(props?: any) {
|
|
|
263
278
|
/**
|
|
264
279
|
* Allow text chat / Cancel text chat
|
|
265
280
|
**/
|
|
266
|
-
function disableUserChat(userInfo: UserInfo) {
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
281
|
+
async function disableUserChat(userInfo: UserInfo) {
|
|
282
|
+
const { isMessageDisabled } = userInfo;
|
|
283
|
+
try {
|
|
284
|
+
await roomEngine.instance?.disableSendingMessageByAdmin({
|
|
285
|
+
userId: userInfo.userId,
|
|
286
|
+
isDisable: !isMessageDisabled,
|
|
287
|
+
});
|
|
288
|
+
roomStore.setMuteUserChat(userInfo.userId, !isMessageDisabled);
|
|
289
|
+
} catch (error) {
|
|
290
|
+
TUIMessage({
|
|
291
|
+
type: 'error',
|
|
292
|
+
message: t('Failed to disable chat'),
|
|
293
|
+
duration: MESSAGE_DURATION.NORMAL,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
273
296
|
}
|
|
274
297
|
|
|
275
298
|
/**
|
|
@@ -301,7 +324,7 @@ export default function useMemberControl(props?: any) {
|
|
|
301
324
|
} catch (error) {
|
|
302
325
|
TUIMessage({
|
|
303
326
|
type: 'error',
|
|
304
|
-
message: t('
|
|
327
|
+
message: t('Make host failed, please try again.'),
|
|
305
328
|
duration: MESSAGE_DURATION.NORMAL,
|
|
306
329
|
});
|
|
307
330
|
}
|
|
@@ -309,7 +332,7 @@ export default function useMemberControl(props?: any) {
|
|
|
309
332
|
}
|
|
310
333
|
|
|
311
334
|
/**
|
|
312
|
-
* Set/
|
|
335
|
+
* Set/Remove administrator permissions
|
|
313
336
|
*/
|
|
314
337
|
async function handleSetOrRevokeAdmin(userInfo: UserInfo) {
|
|
315
338
|
const newRole = userInfo.userRole === TUIRole.kGeneralUser ? TUIRole.kAdministrator : TUIRole.kGeneralUser;
|
|
@@ -155,11 +155,12 @@ export default function useIndex() {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
const applyToAnchorUserContent = computed(() => {
|
|
158
|
-
const
|
|
158
|
+
const lastIndex = applyToAnchorList.value.length - 1;
|
|
159
|
+
const userName = applyToAnchorList.value[lastIndex]?.userName || applyToAnchorList.value[lastIndex]?.userId;
|
|
159
160
|
if (applyToAnchorList.value.length === 1) {
|
|
160
161
|
return `${userName} ${t('Applying for the stage')}`;
|
|
161
162
|
}
|
|
162
|
-
return
|
|
163
|
+
return `${userName} ${t('and so on number people applying to stage', { number: applyToAnchorList.value.length })}`;
|
|
163
164
|
});
|
|
164
165
|
|
|
165
166
|
return {
|
|
@@ -153,7 +153,7 @@ async function sendSeatApplication() {
|
|
|
153
153
|
TUIMessage({ type: 'warning', message: t('Application to go on stage was rejected') });
|
|
154
154
|
break;
|
|
155
155
|
case TUIRequestCallbackType.kRequestTimeout:
|
|
156
|
-
TUIMessage({ type: 'warning', message: t('
|
|
156
|
+
TUIMessage({ type: 'warning', message: t('The request to go on stage has timed out') });
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
159
159
|
},
|
|
@@ -242,7 +242,7 @@ async function handleInvite(agree: boolean) {
|
|
|
242
242
|
});
|
|
243
243
|
} catch (error: any) {
|
|
244
244
|
if (error.code === TUIErrorCode.ERR_ALL_SEAT_OCCUPIED) {
|
|
245
|
-
TUIMessage({ type: 'warning', message: t('The
|
|
245
|
+
TUIMessage({ type: 'warning', message: t('The stage is full, please contact the host') });
|
|
246
246
|
} else {
|
|
247
247
|
logger.error('Failure of a user to accept/reject a roomOwner invitation', error);
|
|
248
248
|
}
|
|
@@ -154,7 +154,7 @@ export default function useEndControl() {
|
|
|
154
154
|
}
|
|
155
155
|
handleUpdateSeatApplicationList();
|
|
156
156
|
}
|
|
157
|
-
if (chatStore.
|
|
157
|
+
if (chatStore.isMessageDisabled) {
|
|
158
158
|
roomEngine.instance?.disableSendingMessageByAdmin({
|
|
159
159
|
userId,
|
|
160
160
|
isDisable: false,
|
|
@@ -8,11 +8,16 @@
|
|
|
8
8
|
v-model="isDialogVisible" :title="t('VirtualBackground')" width="600px" :modal="true"
|
|
9
9
|
:append-to-room-container="true" @close="closeSettingPanel"
|
|
10
10
|
>
|
|
11
|
-
<div id="stream-preview" class="stream-preview"
|
|
11
|
+
<div id="stream-preview" class="stream-preview">
|
|
12
|
+
<div v-if="isLoading" class="mask"></div>
|
|
13
|
+
<div v-if="isLoading" class="spinner"></div>
|
|
14
|
+
</div>
|
|
12
15
|
<div class="setting">
|
|
13
16
|
<div
|
|
14
|
-
:class="[
|
|
15
|
-
|
|
17
|
+
:class="[
|
|
18
|
+
'setting-item', selectedBackground === 'close' ? 'active' : ''
|
|
19
|
+
]"
|
|
20
|
+
@click="applyVirtualBackground('close')"
|
|
16
21
|
>
|
|
17
22
|
<i class="setting-item-icon">
|
|
18
23
|
<img :src="CloseVirtualBackground" alt="close" style="width: 32px;" />
|
|
@@ -20,8 +25,10 @@
|
|
|
20
25
|
<span>{{ t('Close') }}</span>
|
|
21
26
|
</div>
|
|
22
27
|
<div
|
|
23
|
-
:class="[
|
|
24
|
-
|
|
28
|
+
:class="[
|
|
29
|
+
'setting-item', selectedBackground === 'blur' ? 'active' : ''
|
|
30
|
+
]"
|
|
31
|
+
@click="applyVirtualBackground('blur')"
|
|
25
32
|
>
|
|
26
33
|
<i class="setting-item-icon">
|
|
27
34
|
<img :src="BlurredBackground" alt="blurred" />
|
|
@@ -29,12 +36,20 @@
|
|
|
29
36
|
<span>{{ t('BlurredBackground') }}</span>
|
|
30
37
|
</div>
|
|
31
38
|
</div>
|
|
39
|
+
<div class="footer">
|
|
40
|
+
<TuiButton
|
|
41
|
+
class="button" :disabled="!isAllowed" @click="confirmVirtualBackground"
|
|
42
|
+
>
|
|
43
|
+
{{ t('Save') }}
|
|
44
|
+
</TuiButton>
|
|
45
|
+
<TuiButton class="button" type="primary" @click="closeSettingPanel">{{ t('Cancel') }}</TuiButton>
|
|
46
|
+
</div>
|
|
32
47
|
</Dialog>
|
|
33
48
|
</div>
|
|
34
49
|
</template>
|
|
35
50
|
|
|
36
51
|
<script setup lang="ts">
|
|
37
|
-
import { nextTick, ref } from 'vue';
|
|
52
|
+
import { computed, nextTick, ref } from 'vue';
|
|
38
53
|
import IconButton from '../common/base/IconButton.vue';
|
|
39
54
|
import VirtualBackgroundIcon from '../common/icons/VirtualBackgroundIcon.vue';
|
|
40
55
|
import { useI18n } from '../../locales';
|
|
@@ -42,41 +57,65 @@ import { roomService } from '../../services';
|
|
|
42
57
|
import Dialog from '../common/base/Dialog/index.vue';
|
|
43
58
|
import CloseVirtualBackground from '../../assets/imgs/close-virtual-background.png';
|
|
44
59
|
import BlurredBackground from '../../assets/imgs/blurred-background.png';
|
|
60
|
+
import TuiButton from '../common/base/Button.vue';
|
|
45
61
|
|
|
46
62
|
const { t } = useI18n();
|
|
47
63
|
const componentConfig = roomService.componentManager.getComponentConfig('VirtualBackground');
|
|
48
|
-
|
|
49
|
-
const
|
|
64
|
+
const isAllowed = computed(() => roomService.roomStore.localStream.hasVideoStream);
|
|
65
|
+
const appliedBackground = ref<'close' | 'blur'>('close');
|
|
66
|
+
const selectedBackground = ref<'close' | 'blur'>('close');
|
|
50
67
|
const isDialogVisible = ref(false);
|
|
68
|
+
const isLoading = ref(false);
|
|
51
69
|
const openSettingPanel = async () => {
|
|
52
70
|
roomService.virtualBackground.initVirtualBackground();
|
|
53
71
|
isDialogVisible.value = true;
|
|
72
|
+
isLoading.value = true;
|
|
54
73
|
await nextTick();
|
|
55
|
-
roomService.roomEngine.instance?.startCameraDeviceTest({ view: 'stream-preview' });
|
|
74
|
+
await roomService.roomEngine.instance?.startCameraDeviceTest({ view: 'stream-preview' });
|
|
75
|
+
await applyVirtualBackground(appliedBackground.value);
|
|
76
|
+
isLoading.value = false;
|
|
56
77
|
};
|
|
57
|
-
|
|
78
|
+
|
|
79
|
+
const closeSettingPanel = async () => {
|
|
58
80
|
isDialogVisible.value = false;
|
|
59
81
|
roomService.roomEngine.instance?.stopCameraDeviceTest();
|
|
82
|
+
selectedBackground.value = appliedBackground.value;
|
|
60
83
|
};
|
|
61
84
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
85
|
+
const confirmVirtualBackground = async () => {
|
|
86
|
+
if (!isAllowed.value) return;
|
|
87
|
+
appliedBackground.value = selectedBackground.value;
|
|
88
|
+
closeSettingPanel();
|
|
89
|
+
if (selectedBackground.value === 'blur') {
|
|
90
|
+
await roomService.virtualBackground.toggleVirtualBackground(true);
|
|
91
|
+
}
|
|
92
|
+
if (selectedBackground.value === 'close') {
|
|
93
|
+
await roomService.virtualBackground.toggleVirtualBackground(false);
|
|
94
|
+
}
|
|
65
95
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
96
|
+
|
|
97
|
+
const applyVirtualBackground = async (type: 'close' | 'blur') => {
|
|
98
|
+
isLoading.value = true;
|
|
99
|
+
try {
|
|
100
|
+
selectedBackground.value = type;
|
|
101
|
+
await roomService.virtualBackground.toggleTestVirtualBackground(type === 'blur');
|
|
102
|
+
} finally {
|
|
103
|
+
isLoading.value = false;
|
|
104
|
+
}
|
|
69
105
|
};
|
|
70
106
|
</script>
|
|
71
107
|
|
|
72
108
|
<style lang="scss" scoped>
|
|
73
109
|
.stream-preview {
|
|
74
110
|
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
75
113
|
box-sizing: border-box;
|
|
76
114
|
border-radius: 8px;
|
|
77
115
|
overflow: hidden;
|
|
78
116
|
min-height: 310px;
|
|
79
117
|
background-color: #000;
|
|
118
|
+
position: relative;
|
|
80
119
|
}
|
|
81
120
|
|
|
82
121
|
.setting {
|
|
@@ -97,6 +136,7 @@ const closeVirtualBackground = () => {
|
|
|
97
136
|
color: #4F586B;
|
|
98
137
|
font-size: 12px;
|
|
99
138
|
border: 1px solid transparent;
|
|
139
|
+
cursor: pointer;
|
|
100
140
|
|
|
101
141
|
&-icon {
|
|
102
142
|
display: flex;
|
|
@@ -116,4 +156,48 @@ const closeVirtualBackground = () => {
|
|
|
116
156
|
color: #fff;
|
|
117
157
|
}
|
|
118
158
|
}
|
|
159
|
+
|
|
160
|
+
.spinner {
|
|
161
|
+
z-index: 3;
|
|
162
|
+
position: absolute;
|
|
163
|
+
top: 50%;
|
|
164
|
+
left: 50%;
|
|
165
|
+
transform: translate(-50%, -50%);
|
|
166
|
+
width: 40px;
|
|
167
|
+
height: 40px;
|
|
168
|
+
border: 4px solid #f3f3f3;
|
|
169
|
+
border-top: 4px solid #1C66E5;
|
|
170
|
+
border-radius: 50%;
|
|
171
|
+
animation: spin 1s linear infinite;
|
|
172
|
+
}
|
|
173
|
+
.mask {
|
|
174
|
+
position: absolute;
|
|
175
|
+
width: 100%;
|
|
176
|
+
height: 100%;
|
|
177
|
+
background-color: #000;
|
|
178
|
+
z-index: 2;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@keyframes spin {
|
|
182
|
+
0% {
|
|
183
|
+
transform: translate(-50%, -50%) rotate(0deg);
|
|
184
|
+
}
|
|
185
|
+
100% {
|
|
186
|
+
transform: translate(-50%, -50%) rotate(360deg);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.footer {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
gap: 1rem;
|
|
195
|
+
margin-top: 10px;
|
|
196
|
+
padding: 1rem;
|
|
197
|
+
border-radius: 8px;
|
|
198
|
+
.button {
|
|
199
|
+
width: 84px;
|
|
200
|
+
height: 32px;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
119
203
|
</style>
|
|
@@ -77,8 +77,6 @@ import SettingControl from '../SettingControl.vue';
|
|
|
77
77
|
import VirtualBackground from '../VirtualBackground.vue';
|
|
78
78
|
import bus from '../../../hooks/useMitt';
|
|
79
79
|
|
|
80
|
-
import TUIRoomAegis from '../../../utils/aegis';
|
|
81
|
-
|
|
82
80
|
import useRoomFooter from './useRoomFooterHooks';
|
|
83
81
|
|
|
84
82
|
const {
|
|
@@ -89,7 +87,6 @@ const {
|
|
|
89
87
|
} = useRoomFooter();
|
|
90
88
|
|
|
91
89
|
function handleControlClick(name: string) {
|
|
92
|
-
TUIRoomAegis.reportEvent({ name, ext1: name });
|
|
93
90
|
bus.emit('experience-communication', name);
|
|
94
91
|
}
|
|
95
92
|
</script>
|
|
@@ -14,7 +14,7 @@ export default function useRoomInfo() {
|
|
|
14
14
|
const basicStore = useBasicStore();
|
|
15
15
|
const roomStore = useRoomStore();
|
|
16
16
|
const { roomId, isRoomLinkVisible } = storeToRefs(basicStore);
|
|
17
|
-
const { masterUserId } = storeToRefs(roomStore);
|
|
17
|
+
const { masterUserId, roomName } = storeToRefs(roomStore);
|
|
18
18
|
const { t } = useI18n();
|
|
19
19
|
const isShowRoomInfo = ref(false);
|
|
20
20
|
const roomType = computed(() => (roomStore.isFreeSpeakMode ? t('Free Speech Room') : t('On-stage Speaking Room')));
|
|
@@ -25,7 +25,7 @@ export default function useRoomInfo() {
|
|
|
25
25
|
|
|
26
26
|
const isShowRoomInfoTitle = computed(() => masterUserName.value);
|
|
27
27
|
|
|
28
|
-
const conferenceTitle = computed(() => `${
|
|
28
|
+
const conferenceTitle = computed(() => `${roomName.value}`);
|
|
29
29
|
|
|
30
30
|
const roomInfoTabList = computed(() => [
|
|
31
31
|
{ id: 1, title: 'Host', content: masterUserName.value, copyLink: '', isShowCopyIcon: false, visible: true },
|
|
@@ -85,7 +85,6 @@ import { LAYOUT } from '../../../constants/render';
|
|
|
85
85
|
import { useBasicStore } from '../../../stores/basic';
|
|
86
86
|
import { useRoomStore } from '../../../stores/room';
|
|
87
87
|
import { storeToRefs } from 'pinia';
|
|
88
|
-
import TUIRoomAegis from '../../../utils/aegis';
|
|
89
88
|
import { useI18n } from '../../../locales';
|
|
90
89
|
import { IconButtonLayout } from '../../../constants/room';
|
|
91
90
|
import IconButton from '../../common/base/IconButton.vue';
|
|
@@ -107,7 +106,6 @@ const layoutControlConfig = roomService.getComponentConfig('LayoutControl');
|
|
|
107
106
|
|
|
108
107
|
function handleClick(layout: any) {
|
|
109
108
|
basicStore.setLayout(layout);
|
|
110
|
-
TUIRoomAegis.reportEvent({ name: 'layout', ext1: layout });
|
|
111
109
|
}
|
|
112
110
|
|
|
113
111
|
function handleClickLayoutIcon() {
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
import { ref, Ref, onUnmounted, watchEffect, reactive, shallowRef } from 'vue';
|
|
41
41
|
import { useBasicStore } from '../../../stores/basic';
|
|
42
42
|
import { storeToRefs } from 'pinia';
|
|
43
|
-
import TUIRoomAegis from '../../../utils/aegis';
|
|
44
43
|
import { useI18n } from '../../../locales';
|
|
45
44
|
import TUIRoomEngine, { TUIRoomEvents, TUINetwork, TUINetworkQuality } from '@tencentcloud/tuiroom-engine-electron';
|
|
46
45
|
import useRoomEngine from '../../../hooks/useRoomEngine';
|
|
@@ -108,7 +107,6 @@ watchEffect(() => {
|
|
|
108
107
|
|
|
109
108
|
function handleClickNetworkIcon() {
|
|
110
109
|
showNetworkInfo.value = !showNetworkInfo.value;
|
|
111
|
-
TUIRoomAegis.reportEvent({ name: 'networkInfo', ext1: 'networkInfo' });
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
function handleClickOutSide() {
|
|
@@ -10,7 +10,8 @@ export type MessageProps = {
|
|
|
10
10
|
}
|
|
11
11
|
const MessageBox = ({ title, message, callback, confirmButtonText }: MessageProps) => {
|
|
12
12
|
const container = document.createElement('div');
|
|
13
|
-
const fullscreenElement = document.fullscreenElement || document.getElementById('roomContainer') || document.
|
|
13
|
+
const fullscreenElement = document.fullscreenElement || document.getElementById('roomContainer') || document.getElementById('pre-conference-container');
|
|
14
|
+
if (!fullscreenElement) return;
|
|
14
15
|
fullscreenElement.appendChild(container);
|
|
15
16
|
|
|
16
17
|
const onRemove = () => {
|
|
@@ -30,7 +30,6 @@ import { isMobile, isWeChat } from './utils/environment';
|
|
|
30
30
|
import vTap from './directives/vTap';
|
|
31
31
|
import { TUIKickedOutOfRoomReason } from '@tencentcloud/tuiroom-engine-electron';
|
|
32
32
|
|
|
33
|
-
import TUIRoomAegis from './utils/aegis';
|
|
34
33
|
import { MESSAGE_DURATION } from './constants/message';
|
|
35
34
|
|
|
36
35
|
import TUIMessageBox from './components/common/base/MessageBox/index';
|
|
@@ -134,18 +133,6 @@ onUnmounted(() => {
|
|
|
134
133
|
});
|
|
135
134
|
|
|
136
135
|
const { sdkAppId, showHeaderTool } = roomService.basicStore;
|
|
137
|
-
watch(
|
|
138
|
-
() => sdkAppId,
|
|
139
|
-
(val: number) => {
|
|
140
|
-
if (val) {
|
|
141
|
-
TUIRoomAegis.setSdkAppId(val);
|
|
142
|
-
TUIRoomAegis.reportEvent({
|
|
143
|
-
name: 'loaded',
|
|
144
|
-
ext1: 'loaded-success',
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
);
|
|
149
136
|
const tuiRoomClass = computed(() => {
|
|
150
137
|
const roomClassList = ['tui-room', `tui-theme-${roomService.basicStore.defaultTheme}`];
|
|
151
138
|
if (isMobile) {
|
|
@@ -310,6 +297,8 @@ const onKickedOffLine = (eventInfo: { message: string }) => {
|
|
|
310
297
|
.tui-room {
|
|
311
298
|
width: 100%;
|
|
312
299
|
height: 100%;
|
|
300
|
+
min-width: 850px;
|
|
301
|
+
min-height: 400px;
|
|
313
302
|
position: relative;
|
|
314
303
|
color: var(--font-color-1);
|
|
315
304
|
background-color: var(--background-color-1);
|
|
@@ -339,6 +328,8 @@ const onKickedOffLine = (eventInfo: { message: string }) => {
|
|
|
339
328
|
&.tui-room-h5 {
|
|
340
329
|
width: 100%;
|
|
341
330
|
height: 100%;
|
|
331
|
+
min-width: initial;
|
|
332
|
+
min-height: initial;
|
|
342
333
|
}
|
|
343
334
|
}
|
|
344
335
|
|
|
@@ -355,5 +346,9 @@ const onKickedOffLine = (eventInfo: { message: string }) => {
|
|
|
355
346
|
width: 80%;
|
|
356
347
|
border-radius: 10px;
|
|
357
348
|
}
|
|
349
|
+
&.tui-room-h5,.chat-room {
|
|
350
|
+
width: 100%;
|
|
351
|
+
height: 100%;
|
|
352
|
+
}
|
|
358
353
|
}
|
|
359
354
|
</style>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
<div class="content-desc">
|
|
14
14
|
<div class="title">
|
|
15
|
-
{{ `${roomCardData.ownerName || roomCardData.owner}${t('Quick
|
|
15
|
+
{{ `${roomCardData.ownerName || roomCardData.owner}${t('Quick Conference')}` }}
|
|
16
16
|
</div>
|
|
17
17
|
<ul class="users">
|
|
18
18
|
<template
|
|
@@ -233,7 +233,7 @@ export class ChatExtension {
|
|
|
233
233
|
const chatType: ChatType = params?.chatType;
|
|
234
234
|
const extension: ExtensionInfo = {
|
|
235
235
|
weight: -1,
|
|
236
|
-
text: this.service?.t('quick
|
|
236
|
+
text: this.service?.t('quick conference') || '快速会议',
|
|
237
237
|
icon: 'https://qcloudimg.tencent-cloud.cn/raw/148ab10dfe654076b41f0d0945bb82e8.png',
|
|
238
238
|
data: {
|
|
239
239
|
name: 'quickRoom',
|
|
@@ -318,8 +318,10 @@ export class ChatExtension {
|
|
|
318
318
|
roomService.basicStore.setScene('chat');
|
|
319
319
|
roomService.componentManager.setComponentConfig({
|
|
320
320
|
SwitchTheme: { visible: false },
|
|
321
|
+
Language: { visible: false },
|
|
321
322
|
InviteControl: { visible: false },
|
|
322
323
|
RoomLink: { visible: false },
|
|
324
|
+
UserInfo: { visible: false },
|
|
323
325
|
});
|
|
324
326
|
this.chatContext = TUILogin.getContext();
|
|
325
327
|
this.myProfile = await this.getMyProfile();
|