@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.
Files changed (130) hide show
  1. package/es/components/Chat/ChatEditor/index.vue.mjs +1 -1
  2. package/es/components/Chat/ChatEditor/index.vue2.mjs +4 -4
  3. package/es/components/Chat/ChatEditor/useChatEditor.d.ts +1 -2
  4. package/es/components/Chat/ChatEditor/useChatEditor.mjs +4 -12
  5. package/es/components/ManageMember/MemberControl/index.vue.mjs +1 -1
  6. package/es/components/ManageMember/MemberControl/index.vue2.mjs +5 -4
  7. package/es/components/ManageMember/MemberControl/useMemberControlHooks.mjs +35 -12
  8. package/es/components/ManageMember/useIndexHooks.mjs +2 -1
  9. package/es/components/RoomFooter/ApplyControl/MemberApplyControl.vue.mjs +1 -1
  10. package/es/components/RoomFooter/ApplyControl/MemberApplyControl.vue2.mjs +2 -2
  11. package/es/components/RoomFooter/EndControl/useEndControlHooks.mjs +1 -1
  12. package/es/components/RoomFooter/VirtualBackground.vue.mjs +1 -1
  13. package/es/components/RoomFooter/VirtualBackground.vue2.mjs +87 -27
  14. package/es/components/RoomFooter/index/index.vue.mjs +1 -1
  15. package/es/components/RoomFooter/index/index.vue2.mjs +0 -2
  16. package/es/components/RoomHeader/RoomInfo/useRoomInfoHooks.mjs +2 -2
  17. package/es/components/RoomHeader/index/LayoutControl.vue.mjs +1 -1
  18. package/es/components/RoomHeader/index/LayoutControl.vue2.mjs +1 -3
  19. package/es/components/RoomHeader/index/NetworkInfo.vue.mjs +1 -1
  20. package/es/components/RoomHeader/index/NetworkInfo.vue2.mjs +0 -2
  21. package/es/components/common/base/MessageBox/index.mjs +3 -1
  22. package/es/conference.d.ts +1 -1
  23. package/es/conference.mjs +9 -0
  24. package/es/conference.vue.mjs +1 -1
  25. package/es/conference.vue2.mjs +1 -14
  26. package/es/constants/room.d.ts +3 -1
  27. package/es/extension/RoomMessageCard/RoomMessageCard.vue.mjs +1 -1
  28. package/es/extension/RoomMessageCard/RoomMessageCard.vue2.mjs +2 -2
  29. package/es/extension/chatExtension.mjs +4 -2
  30. package/es/hooks/useDeviceManager.d.ts +3 -1
  31. package/es/hooks/useMasterApplyControl.mjs +16 -10
  32. package/es/hooks/useRoomEngine.d.ts +3 -1
  33. package/es/index.d.ts +3 -2
  34. package/es/index.mjs +1519 -1456
  35. package/es/locales/en-US.d.ts +9 -9
  36. package/es/locales/en-US.mjs +10 -10
  37. package/es/locales/zh-CN.d.ts +11 -11
  38. package/es/locales/zh-CN.mjs +12 -12
  39. package/es/services/function/virtualBackground.d.ts +2 -0
  40. package/es/services/function/virtualBackground.mjs +19 -9
  41. package/es/services/function/waterMark.mjs +3 -0
  42. package/es/services/manager/componentManager.mjs +1 -1
  43. package/es/services/manager/roomActionManager.mjs +1 -1
  44. package/es/services/roomService.d.ts +3 -4
  45. package/es/services/roomService.mjs +2 -26
  46. package/es/stores/chat.mjs +3 -3
  47. package/es/stores/room.d.ts +1 -1
  48. package/es/stores/room.mjs +11 -10
  49. package/lib/components/Chat/ChatEditor/index.vue.js +1 -1
  50. package/lib/components/Chat/ChatEditor/index.vue2.js +4 -4
  51. package/lib/components/Chat/ChatEditor/useChatEditor.d.ts +1 -2
  52. package/lib/components/Chat/ChatEditor/useChatEditor.js +3 -11
  53. package/lib/components/ManageMember/MemberControl/index.vue.js +1 -1
  54. package/lib/components/ManageMember/MemberControl/index.vue2.js +4 -3
  55. package/lib/components/ManageMember/MemberControl/useMemberControlHooks.js +35 -12
  56. package/lib/components/ManageMember/useIndexHooks.js +2 -1
  57. package/lib/components/RoomFooter/ApplyControl/MemberApplyControl.vue.js +1 -1
  58. package/lib/components/RoomFooter/ApplyControl/MemberApplyControl.vue2.js +2 -2
  59. package/lib/components/RoomFooter/EndControl/useEndControlHooks.js +1 -1
  60. package/lib/components/RoomFooter/VirtualBackground.vue.js +1 -1
  61. package/lib/components/RoomFooter/VirtualBackground.vue2.js +86 -26
  62. package/lib/components/RoomFooter/index/index.vue.js +1 -1
  63. package/lib/components/RoomFooter/index/index.vue2.js +0 -2
  64. package/lib/components/RoomHeader/RoomInfo/useRoomInfoHooks.js +2 -2
  65. package/lib/components/RoomHeader/index/LayoutControl.vue.js +1 -1
  66. package/lib/components/RoomHeader/index/LayoutControl.vue2.js +1 -3
  67. package/lib/components/RoomHeader/index/NetworkInfo.vue.js +1 -1
  68. package/lib/components/RoomHeader/index/NetworkInfo.vue2.js +0 -2
  69. package/lib/components/common/base/MessageBox/index.js +3 -1
  70. package/lib/conference.d.ts +1 -1
  71. package/lib/conference.js +9 -0
  72. package/lib/conference.vue.js +1 -1
  73. package/lib/conference.vue2.js +10 -23
  74. package/lib/constants/room.d.ts +3 -1
  75. package/lib/extension/RoomMessageCard/RoomMessageCard.vue.js +1 -1
  76. package/lib/extension/RoomMessageCard/RoomMessageCard.vue2.js +2 -2
  77. package/lib/extension/chatExtension.js +4 -2
  78. package/lib/hooks/useDeviceManager.d.ts +3 -1
  79. package/lib/hooks/useMasterApplyControl.js +16 -10
  80. package/lib/hooks/useRoomEngine.d.ts +3 -1
  81. package/lib/index.d.ts +3 -2
  82. package/lib/index.js +1517 -1454
  83. package/lib/locales/en-US.d.ts +9 -9
  84. package/lib/locales/en-US.js +10 -10
  85. package/lib/locales/zh-CN.d.ts +11 -11
  86. package/lib/locales/zh-CN.js +12 -12
  87. package/lib/services/function/virtualBackground.d.ts +2 -0
  88. package/lib/services/function/virtualBackground.js +19 -9
  89. package/lib/services/function/waterMark.js +3 -0
  90. package/lib/services/manager/componentManager.js +1 -1
  91. package/lib/services/manager/roomActionManager.js +1 -1
  92. package/lib/services/roomService.d.ts +3 -4
  93. package/lib/services/roomService.js +2 -26
  94. package/lib/stores/chat.js +3 -3
  95. package/lib/stores/room.d.ts +1 -1
  96. package/lib/stores/room.js +11 -10
  97. package/package.json +2 -2
  98. package/src/TUIRoom/assets/style/global.scss +1 -1
  99. package/src/TUIRoom/components/Chat/ChatEditor/index.vue +4 -4
  100. package/src/TUIRoom/components/Chat/ChatEditor/useChatEditor.ts +4 -13
  101. package/src/TUIRoom/components/ManageMember/MemberControl/index.vue +5 -4
  102. package/src/TUIRoom/components/ManageMember/MemberControl/useMemberControlHooks.ts +36 -13
  103. package/src/TUIRoom/components/ManageMember/useIndexHooks.ts +3 -2
  104. package/src/TUIRoom/components/RoomFooter/ApplyControl/MemberApplyControl.vue +2 -2
  105. package/src/TUIRoom/components/RoomFooter/EndControl/useEndControlHooks.ts +1 -1
  106. package/src/TUIRoom/components/RoomFooter/VirtualBackground.vue +100 -16
  107. package/src/TUIRoom/components/RoomFooter/index/index.vue +0 -3
  108. package/src/TUIRoom/components/RoomHeader/RoomInfo/useRoomInfoHooks.ts +2 -2
  109. package/src/TUIRoom/components/RoomHeader/index/LayoutControl.vue +0 -2
  110. package/src/TUIRoom/components/RoomHeader/index/NetworkInfo.vue +0 -2
  111. package/src/TUIRoom/components/common/base/MessageBox/index.ts +2 -1
  112. package/src/TUIRoom/conference.vue +8 -13
  113. package/src/TUIRoom/extension/RoomMessageCard/RoomMessageCard.vue +1 -1
  114. package/src/TUIRoom/extension/RoomMessageCard/roomMessageCard.scss +3 -0
  115. package/src/TUIRoom/extension/chatExtension.ts +3 -1
  116. package/src/TUIRoom/hooks/useMasterApplyControl.ts +15 -10
  117. package/src/TUIRoom/index.ts +12 -3
  118. package/src/TUIRoom/locales/en-US.ts +9 -9
  119. package/src/TUIRoom/locales/zh-CN.ts +11 -11
  120. package/src/TUIRoom/services/function/virtualBackground.ts +21 -9
  121. package/src/TUIRoom/services/function/waterMark.ts +6 -0
  122. package/src/TUIRoom/services/manager/componentManager.ts +1 -1
  123. package/src/TUIRoom/services/manager/roomActionManager.ts +1 -1
  124. package/src/TUIRoom/services/roomService.ts +0 -29
  125. package/src/TUIRoom/stores/chat.ts +5 -6
  126. package/src/TUIRoom/stores/room.ts +13 -12
  127. package/es/utils/aegis/config.mjs +0 -12
  128. package/es/utils/aegis/index.mjs +0 -63
  129. package/lib/utils/aegis/config.js +0 -12
  130. package/lib/utils/aegis/index.js +0 -63
@@ -64,7 +64,7 @@ export default function () {
64
64
  }
65
65
  } catch (error: any) {
66
66
  if (error.code === TUIErrorCode.ERR_ALL_SEAT_OCCUPIED) {
67
- TUIMessage({ type: 'warning', message: t('The current number of people on stage has reached the limit') });
67
+ TUIMessage({ type: 'warning', message: t('The stage is full') });
68
68
  } else {
69
69
  logger.error('Failure to process a user request', error);
70
70
  }
@@ -83,7 +83,7 @@ export default function () {
83
83
  }
84
84
  } catch (error: any) {
85
85
  if (error.code === TUIErrorCode.ERR_ALL_SEAT_OCCUPIED) {
86
- TUIMessage({ type: 'warning', message: t('The current number of people on stage has reached the limit') });
86
+ TUIMessage({ type: 'warning', message: t('The stage is full') });
87
87
  } else {
88
88
  logger.error('Failed application for consent to go on stage', error);
89
89
  }
@@ -106,12 +106,13 @@ export default function () {
106
106
 
107
107
  // Process all users’ requests to access the microphone
108
108
  async function handleAllUserApply(isAgreeOrRejectAllUserApply: boolean) {
109
+ let hasErrorOccurred = false;
109
110
  const applyUserList = applyToAnchorList.value.map(item => ({
110
111
  userId: item.userId,
111
112
  userName: item.userName,
112
113
  applyToAnchorRequestId: item.applyToAnchorRequestId,
113
114
  }));
114
- for (const { userId, userName, applyToAnchorRequestId } of applyUserList) {
115
+ for (const { applyToAnchorRequestId } of applyUserList) {
115
116
  const action = isAgreeOrRejectAllUserApply ? 'Agree' : 'Reject';
116
117
  const actionFailedMessage = `${action} sb on stage failed, please retry`;
117
118
  try {
@@ -123,12 +124,15 @@ export default function () {
123
124
  roomStore.removeApplyToAnchorUser(applyToAnchorRequestId);
124
125
  }
125
126
  } catch (error) {
126
- logger.error(actionFailedMessage);
127
- TUIMessage({
128
- type: 'warning',
129
- message: t(`${action} sb on stage failed, please retry`, { name: userName || userId }),
130
- duration: MESSAGE_DURATION.NORMAL,
131
- });
127
+ if (!hasErrorOccurred) {
128
+ logger.error(actionFailedMessage);
129
+ TUIMessage({
130
+ type: 'warning',
131
+ message: t('The stage is full'),
132
+ duration: MESSAGE_DURATION.NORMAL,
133
+ });
134
+ hasErrorOccurred = true;
135
+ }
132
136
  }
133
137
  }
134
138
  }
@@ -253,7 +257,8 @@ export default function () {
253
257
  }
254
258
  const onlyOneUserTakeStage = newVal.length === 1;
255
259
  const firstUser = applyToAnchorList.value[0];
256
- const userName = firstUser?.userName || firstUser?.userId;
260
+ const lastIndex = applyToAnchorList.value.length - 1;
261
+ const userName = applyToAnchorList.value[lastIndex]?.userName || applyToAnchorList.value[lastIndex]?.userId;
257
262
  const message = onlyOneUserTakeStage
258
263
  ? `${userName} ${t('Applying for the stage')}`
259
264
  : `${userName} ${t('and so on number people applying to stage', { number: applyToAnchorList.value.length })}`;
@@ -1,11 +1,20 @@
1
1
  import ConferenceMainView from './conference.vue';
2
2
  import PreConferenceView from './preConference.vue';
3
3
  import TUIRoomEngine from '@tencentcloud/tuiroom-engine-electron';
4
- import { conference, RoomEvent } from './conference';
4
+ import { conference, RoomEvent, FeatureButton } from './conference';
5
5
  import RoomMessageCard from './extension/RoomMessageCard/RoomMessageCard.vue';
6
+ import { roomService } from './services';
6
7
  export * from './components/common/base/index';
7
-
8
- export { ConferenceMainView, PreConferenceView, TUIRoomEngine, conference, RoomEvent, RoomMessageCard };
8
+ export {
9
+ ConferenceMainView,
10
+ PreConferenceView,
11
+ TUIRoomEngine,
12
+ roomService,
13
+ conference,
14
+ RoomEvent,
15
+ FeatureButton,
16
+ RoomMessageCard,
17
+ };
9
18
 
10
19
  ConferenceMainView.install = (app) => {
11
20
  app.component('ConferenceView', ConferenceMainView);
@@ -38,7 +38,7 @@ export default {
38
38
  'Join Room': 'Join Room',
39
39
  'Enter room ID': 'Enter room ID',
40
40
  'video conferencing': ' \'s video conferencing',
41
- 'Quick Meeting': ' \'s Quick Meeting',
41
+ 'Quick Conference': ' \'s Quick Conference',
42
42
  'Room ID': 'Room ID',
43
43
  'Low Definition': 'Low Definition',
44
44
  'Standard Definition': 'Standard Definition',
@@ -71,9 +71,9 @@ export default {
71
71
  'Full screen': 'Full screen',
72
72
  Members: 'Members',
73
73
  'Search Member': 'Search Member',
74
- 'Transfer owner': 'Transfer owner',
74
+ 'Make host': 'Make host',
75
75
  'Set as administrator': 'Set as administrator',
76
- 'Revoke administrator': 'Revoke administrator',
76
+ 'Remove administrator': 'Remove administrator',
77
77
  // @ts-ignore
78
78
  'The administrator status of sb has been withdrawn': ({ named }) => `The administrator status of ${named('name')} has been withdrawn`,
79
79
  // @ts-ignore
@@ -208,8 +208,6 @@ export default {
208
208
  'Sb invites you to turn on the microphone': ({ named }) => `${named('role')} invites you to turn on the microphone`,
209
209
  'All videos disabled': 'All videos disabled',
210
210
  'All videos enabled': 'All videos enabled',
211
- 'Disabling text chat for all is enabled': 'Disabling text chat for all is enabled',
212
- 'Unblocked all text chat': 'Unblocked all text chat',
213
211
  'Your camera has been turned off': 'Your camera has been turned off',
214
212
  // @ts-ignore
215
213
  'Sb invites you to turn on the camera': ({ named }) => `${named('role')} invites you to turn on the camera`,
@@ -252,7 +250,7 @@ export default {
252
250
  'An invitation to open the microphone has been sent to sb.': ({ named }) => `An invitation to open the microphone has been sent to ${named('name')}`,
253
251
  // @ts-ignore
254
252
  'An invitation to open the camera has been sent to sb.': ({ named }) => `An invitation to open the camera has been sent to ${named('name')}`,
255
- 'Transfer owner failed, please try again.': 'Transfer owner failed, please try again.',
253
+ 'Make host failed, please try again.': 'Make host failed, please try again.',
256
254
  // @ts-ignore
257
255
  'Sb has been set as an administrator': ({ named }) => `${named('name')} has been set as an administrator.`,
258
256
  'Succeed on stage': 'Succeed on stage',
@@ -273,8 +271,7 @@ export default {
273
271
  'You are now an administrator': 'You are now an administrator',
274
272
  'The RoomOwner has withdrawn your administrator privileges': 'The RoomOwner has withdrawn your administrator privileges',
275
273
  'This member has already received the same request, please try again later': 'This member has already received the same request, please try again later',
276
- 'Failed to go on stage, invitation has timed out': 'Failed to go on stage, invitation has timed out',
277
- 'The current number of people on stage has reached the limit': 'The current number of people on stage has reached the limit',
274
+ 'The request to go on stage has timed out': 'The request to go on stage has timed out',
278
275
  // @ts-ignore
279
276
  'The invitation to sb to go on stage has timed out': ({ named }) => `The invitation to ${named('name')} to go on stage has timed out`,
280
277
  'Currently no member has applied to go on stage': 'Currently no member has applied to go on stage',
@@ -291,8 +288,10 @@ export default {
291
288
  'people applying to stage': 'people applying to stage',
292
289
  // @ts-ignore
293
290
  'and so on number people applying to stage': ({ named }) => `and so on ${named('number')} people applying to stage`,
291
+ 'The stage is full, please contact the host': 'The stage is full, please contact the host',
292
+ 'The stage is full': 'The stage is full',
294
293
  // Room Chat Fusion Card Translation
295
- 'quick meeting': 'quick meeting',
294
+ 'quick conference': 'quick conference',
296
295
  Meeting: 'Meeting',
297
296
  'Meeting in progress': 'Meeting in progress',
298
297
  Initiating: 'Initiating',
@@ -306,4 +305,5 @@ export default {
306
305
  'Currently in a meeting, please exit the current meeting before proceeding.': 'Currently in a meeting, please exit the current meeting before proceeding.',
307
306
  'Failed to initiate meeting': 'Failed to initiate meeting',
308
307
  'Failed to enter the meeting': 'Failed to enter the meeting',
308
+ 'Failed to disable chat': 'Failed to disable chat',
309
309
  };
@@ -35,7 +35,7 @@ export default {
35
35
  'Join Room': '进入房间',
36
36
  'Enter room ID': '输入房间号',
37
37
  'video conferencing': ' 的视频会议',
38
- 'Quick Meeting': '的快速会议',
38
+ 'Quick Conference': '的快速会议',
39
39
  'Room ID': '房间号',
40
40
  'Low Definition': '流畅',
41
41
  'Standard Definition': '标清',
@@ -68,9 +68,9 @@ export default {
68
68
  'Full screen': '全屏',
69
69
  Members: '成员',
70
70
  'Search Member': '搜索成员',
71
- 'Transfer owner': '转交房主',
71
+ 'Make host': '转交房主',
72
72
  'Set as administrator': '设为管理员',
73
- 'Revoke administrator': '撤销管理员',
73
+ 'Remove administrator': '撤销管理员',
74
74
  // @ts-ignore
75
75
  'The administrator status of sb has been withdrawn': ({ named }) => `已将 ${named('name')} 的管理员身份撤回`,
76
76
  // @ts-ignore
@@ -208,8 +208,6 @@ export default {
208
208
  'Sb invites you to turn on the microphone': ({ named }) => `${named('role')}邀请你打开麦克风`,
209
209
  'All videos disabled': '已开启全体禁画',
210
210
  'All videos enabled': '已解除全体禁画',
211
- 'Disabling text chat for all is enabled': '已开启全体禁止文字聊天',
212
- 'Unblocked all text chat': '已解除全体禁止文字聊天',
213
211
  'Your camera has been turned off': '已关闭您的摄像头',
214
212
  // @ts-ignore
215
213
  'Sb invites you to turn on the camera': ({ named }) => `${named('role')}邀请你打开摄像头`,
@@ -222,9 +220,9 @@ export default {
222
220
  'kicked out of the room by other device': '相同账号在其他客户端进入房间',
223
221
  'kicked out of the room by serve': '被服务端踢出房间',
224
222
  // @ts-ignore
225
- 'Reject sb stage failed, please retry': ({ named }) => `拒绝 ${named('name')} 上台失败, 请重试`,
223
+ 'Reject sb on stage failed, please retry': ({ named }) => `拒绝 ${named('name')} 上台失败, 请重试`,
226
224
  // @ts-ignore
227
- 'Agree sb stage failed, please retry': ({ named }) => `同意 ${named('name')} 上台失败, 请重试`,
225
+ 'Agree sb on stage failed, please retry': ({ named }) => `同意 ${named('name')} 上台失败, 请重试`,
228
226
  'Has been fully muted and cannot open the microphone': '已被全员静音,无法打开麦克风',
229
227
  'Has been muted by the host and cannot open the microphone': '已被主持人静音,无法打开麦克风',
230
228
  'To apply to speak in the room, please raise your hand first to apply for the microphone': '申请发言房间,请先举手申请上麦',
@@ -252,7 +250,7 @@ export default {
252
250
  'An invitation to open the microphone has been sent to sb.': ({ named }) => `已向 ${named('name')} 发出开启麦克风邀请`,
253
251
  // @ts-ignore
254
252
  'An invitation to open the camera has been sent to sb.': ({ named }) => `已向 ${named('name')} 发出开启摄像头邀请`,
255
- 'Transfer owner failed, please try again.': '转交房主失败,请重试',
253
+ 'Make host failed, please try again.': '转交房主失败,请重试',
256
254
  // @ts-ignore
257
255
  'Sb has been set as an administrator': ({ named }) => `已将 ${named('name')} 设为管理员`,
258
256
  'Succeed on stage': '上台成功',
@@ -273,8 +271,7 @@ export default {
273
271
  'You are now an administrator': '您已成为管理员',
274
272
  'The RoomOwner has withdrawn your administrator privileges': '房主已收回您的管理员权限',
275
273
  'This member has already received the same request, please try again later': '该成员已收到相同请求,请稍后再试',
276
- 'Failed to go on stage, invitation has timed out': '上台失败,邀请已超时',
277
- 'The current number of people on stage has reached the limit': '当前上台人数已达上限',
274
+ 'The request to go on stage has timed out': '上台请求已超时',
278
275
  // @ts-ignore
279
276
  'The invitation to sb to go on stage has timed out': ({ named }) => `对${named('name')}的上台邀请已超时`,
280
277
  'Currently no member has applied to go on stage': '暂无成员申请上台',
@@ -291,8 +288,10 @@ export default {
291
288
  'people applying to stage': '人正在申请上台',
292
289
  // @ts-ignore
293
290
  'and so on number people applying to stage': ({ named }) => `等 ${named('number')} 人正在申请上台`,
291
+ 'The stage is full, please contact the host': '台上人数已满,请联系主持人',
292
+ 'The stage is full': '台上人数已满',
294
293
  // Room Chat Fusion Card Translation
295
- 'quick meeting': '快速会议',
294
+ 'quick conference': '快速会议',
296
295
  Meeting: '会议',
297
296
  'Meeting in progress': '会议 进行中',
298
297
  Initiating: '正在发起',
@@ -306,4 +305,5 @@ export default {
306
305
  'Currently in a meeting, please exit the current meeting before proceeding.': '正在会议中,请先退出当前会议后再进行操作',
307
306
  'Failed to initiate meeting': '发起会议失败',
308
307
  'Failed to enter the meeting': '进入会议失败',
308
+ 'Failed to disable chat': '禁言失败',
309
309
  };
@@ -5,6 +5,7 @@ interface IVirtualBackground {
5
5
  dispose(): void;
6
6
  initVirtualBackground(): Promise<void>;
7
7
  toggleVirtualBackground(enabled: boolean): Promise<void>;
8
+ toggleTestVirtualBackground(enabled: boolean): Promise<void>;
8
9
  }
9
10
 
10
11
  export class VirtualBackground implements IVirtualBackground {
@@ -27,6 +28,7 @@ export class VirtualBackground implements IVirtualBackground {
27
28
 
28
29
  private handleUnmount = async () => {
29
30
  await this.toggleVirtualBackground(false);
31
+ await this.toggleTestVirtualBackground(false);
30
32
  };
31
33
 
32
34
  public dispose() {
@@ -43,14 +45,24 @@ export class VirtualBackground implements IVirtualBackground {
43
45
  public async toggleVirtualBackground(enabled: boolean): Promise<void> {
44
46
  await this.initVirtualBackground();
45
47
  const { sdkAppId, userId, userSig } = this.service.basicStore;
46
- await this.trtcCloud.callExperimentalAPI(JSON.stringify({
47
- api: 'enableVirtualBackground',
48
- params: {
49
- sdkAppId,
50
- userId,
51
- userSig,
52
- enable: enabled,
53
- },
54
- }));
48
+ const params = {
49
+ sdkAppId,
50
+ userId,
51
+ userSig,
52
+ enable: enabled,
53
+ };
54
+ await this.trtcCloud.callExperimentalAPI(JSON.stringify({ api: 'enableVirtualBackground', params }));
55
+ }
56
+
57
+ public async toggleTestVirtualBackground(enabled: boolean): Promise<void> {
58
+ await this.initVirtualBackground();
59
+ const { sdkAppId, userId, userSig } = this.service.basicStore;
60
+ const params = {
61
+ sdkAppId,
62
+ userId,
63
+ userSig,
64
+ enable: enabled,
65
+ };
66
+ await this.trtcCloud.callExperimentalAPI(JSON.stringify({ api: 'enableTestVirtualBackground', params }));
55
67
  }
56
68
  }
@@ -88,6 +88,9 @@ export class WaterMark implements IWaterMark {
88
88
  targetElement.appendChild(watermarkContainer);
89
89
 
90
90
  const addWatermarkElements = () => {
91
+ // clear old watermark elements
92
+ watermarkContainer.innerHTML = '';
93
+
91
94
  // Calculate watermark spacing based on max width
92
95
  const maxWidth = 200;
93
96
  const watermarkSpacing = maxWidth + 25;
@@ -106,6 +109,9 @@ export class WaterMark implements IWaterMark {
106
109
 
107
110
  addWatermarkElements();
108
111
 
112
+ const resizeObserver = new ResizeObserver(addWatermarkElements);
113
+ resizeObserver.observe(watermarkContainer);
114
+
109
115
  const observerCallback = (mutations: MutationRecord[], observer: MutationObserver) => {
110
116
  mutations.forEach((mutation) => {
111
117
  if (mutation.removedNodes.length > 0) {
@@ -47,7 +47,7 @@ const defaultConfig = {
47
47
  ManageMemberControl: { visible: true },
48
48
  InviteControl: { visible: true },
49
49
  ChatControl: { visible: true },
50
- MoreControl: { visible: true },
50
+ MoreControl: { visible: false },
51
51
  VirtualBackground: { visible: false },
52
52
  };
53
53
 
@@ -132,7 +132,7 @@ export class RoomActionManager {
132
132
 
133
133
  const roomParams = {
134
134
  roomId,
135
- name: roomName,
135
+ roomName,
136
136
  roomType: TUIRoomType.kConference,
137
137
  isSeatEnabled: roomMode !== 'FreeToSpeak',
138
138
  seatMode:
@@ -74,7 +74,6 @@ export class RoomService implements IRoomService {
74
74
  this.onKickedOffLine = this.onKickedOffLine.bind(this);
75
75
  this.onAllUserCameraDisableChanged = this.onAllUserCameraDisableChanged.bind(this);
76
76
  this.onAllUserMicrophoneDisableChanged = this.onAllUserMicrophoneDisableChanged.bind(this);
77
- this.onSendMessageForAllUserDisableChanged = this.onSendMessageForAllUserDisableChanged.bind(this);
78
77
  }
79
78
 
80
79
  static getInstance(): RoomService {
@@ -119,10 +118,6 @@ export class RoomService implements IRoomService {
119
118
  roomEngine.instance?.on(TUIRoomEvents.onKickedOffLine, this.onKickedOffLine);
120
119
  roomEngine.instance?.on(TUIRoomEvents.onAllUserCameraDisableChanged, this.onAllUserCameraDisableChanged);
121
120
  roomEngine.instance?.on(TUIRoomEvents.onAllUserMicrophoneDisableChanged, this.onAllUserMicrophoneDisableChanged);
122
- roomEngine.instance?.on(
123
- TUIRoomEvents.onSendMessageForAllUserDisableChanged,
124
- this.onSendMessageForAllUserDisableChanged,
125
- );
126
121
  }
127
122
 
128
123
  public unBindRoomEngineEvents() {
@@ -136,10 +131,6 @@ export class RoomService implements IRoomService {
136
131
  roomEngine.instance?.off(TUIRoomEvents.onKickedOffLine, this.onKickedOffLine);
137
132
  roomEngine.instance?.off(TUIRoomEvents.onAllUserCameraDisableChanged, this.onAllUserCameraDisableChanged);
138
133
  roomEngine.instance?.off(TUIRoomEvents.onAllUserMicrophoneDisableChanged, this.onAllUserMicrophoneDisableChanged);
139
- roomEngine.instance?.off(
140
- TUIRoomEvents.onSendMessageForAllUserDisableChanged,
141
- this.onSendMessageForAllUserDisableChanged,
142
- );
143
134
  }
144
135
 
145
136
  private onError(error: any) {
@@ -287,26 +278,6 @@ export class RoomService implements IRoomService {
287
278
  this.roomStore.setDisableMicrophoneForAllUserByAdmin(isDisable);
288
279
  }
289
280
 
290
- private async onSendMessageForAllUserDisableChanged(eventInfo: { roomId: string; isDisable: boolean }) {
291
- const { isDisable } = eventInfo;
292
- if (
293
- isDisable !== this.roomStore.isMessageDisableForAllUser
294
- && this.roomStore.localUser.userRole === TUIRole.kGeneralUser
295
- ) {
296
- this.handleMessageStateChange(isDisable);
297
- }
298
- this.roomStore.setDisableMessageAllUserByAdmin(isDisable);
299
- }
300
-
301
- private async handleMessageStateChange(isDisableMessage: boolean) {
302
- const tipMessage = isDisableMessage ? t('Disabling text chat for all is enabled') : t('Unblocked all text chat');
303
- this.emit(EventType.ROOM_NOTICE_MESSAGE, {
304
- type: 'success',
305
- message: tipMessage,
306
- duration: MESSAGE_DURATION.NORMAL,
307
- });
308
- }
309
-
310
281
  private async handleAudioStateChange(isDisableAudio: boolean) {
311
282
  const tipMessage = isDisableAudio ? t('All audios disabled') : t('All audios enabled');
312
283
  this.emit(EventType.ROOM_NOTICE_MESSAGE, {
@@ -14,7 +14,7 @@ interface MessageItem {
14
14
 
15
15
  interface ChatState {
16
16
  messageList: MessageItem[];
17
- isMessageDisableByAdmin: boolean;
17
+ isMessageDisabled: boolean;
18
18
  unReadCount: number;
19
19
  isCompleted: boolean;
20
20
  // Is the list of all messages pulled
@@ -24,7 +24,7 @@ interface ChatState {
24
24
  export const useChatStore = defineStore('chat', {
25
25
  state: (): ChatState => ({
26
26
  messageList: [],
27
- isMessageDisableByAdmin: false,
27
+ isMessageDisabled: false,
28
28
  unReadCount: 0,
29
29
  isCompleted: false,
30
30
  nextReqMessageId: '',
@@ -49,16 +49,15 @@ export const useChatStore = defineStore('chat', {
49
49
  addHistoryMessages(messageList: MessageItem[]) {
50
50
  const messageIds = this.messageList.map(message => message.ID);
51
51
  const filteredMessageList = messageList.filter(message => messageIds.indexOf(message.ID) === -1);
52
- this.messageList = filteredMessageList.concat(this.messageList).sort((
53
- messageA: MessageItem, messageB: MessageItem) => messageA.sequence - messageB.sequence);
52
+ this.messageList = filteredMessageList.concat(this.messageList).sort((messageA: MessageItem, messageB: MessageItem) => messageA.sequence - messageB.sequence);
54
53
  },
55
54
  setSendMessageDisableChanged(isDisable: boolean) {
56
- this.isMessageDisableByAdmin = isDisable;
55
+ this.isMessageDisabled = isDisable;
57
56
  },
58
57
  reset() {
59
58
  this.messageList = [];
60
59
  this.unReadCount = 0;
61
- this.isMessageDisableByAdmin = false;
60
+ this.isMessageDisabled = false;
62
61
  },
63
62
  },
64
63
  });
@@ -36,10 +36,10 @@ export type UserInfo = {
36
36
  hasScreenStream?: boolean,
37
37
  isVideoVisible?: boolean,
38
38
  isScreenVisible?: boolean,
39
+ isMessageDisabled?: boolean,
39
40
  userRole?: TUIRole,
40
41
  // Is it on the seat
41
42
  onSeat?: boolean,
42
- isChatMutedByMasterOrAdmin?: boolean,
43
43
  // Whether the user is being asked to turn on the microphone
44
44
  isRequestingUserOpenMic?: boolean,
45
45
  // The requestId for requesting the user to turn on the microphone
@@ -83,10 +83,11 @@ interface RoomState {
83
83
  masterUserId: string,
84
84
  isMicrophoneDisableForAllUser: boolean,
85
85
  isCameraDisableForAllUser: boolean,
86
- isMessageDisableForAllUser: boolean,
87
86
  isSeatEnabled: boolean,
88
87
  seatMode: TUISeatMode,
89
88
  maxMembersCount: number,
89
+ maxSeatCount: number,
90
+ roomName: string,
90
91
  hasVideoStreamObject: Record<string, UserInfo>,
91
92
  currentStreamIdListInVisibleView: string[],
92
93
  hasOtherScreenShare: boolean,
@@ -138,10 +139,11 @@ export const useRoomStore = defineStore('room', {
138
139
  masterUserId: '',
139
140
  isMicrophoneDisableForAllUser: false,
140
141
  isCameraDisableForAllUser: false,
141
- isMessageDisableForAllUser: false,
142
142
  isSeatEnabled: false,
143
143
  seatMode: TUISeatMode.kFreeToTake,
144
144
  maxMembersCount: 5, // Includes local streams and screen shares, above which subsequent streams are played
145
+ maxSeatCount: 20,
146
+ roomName: '',
145
147
  hasVideoStreamObject: {},
146
148
  // Visual area user flow list
147
149
  currentStreamIdListInVisibleView: [],
@@ -288,9 +290,9 @@ export const useRoomStore = defineStore('room', {
288
290
  hasScreenStream: false,
289
291
  isVideoVisible: false,
290
292
  isScreenVisible: false,
293
+ isMessageDisabled: false,
291
294
  userRole: TUIRole.kGeneralUser,
292
295
  onSeat: !this.isSpeakAfterTakingSeatMode,
293
- isChatMutedByMasterOrAdmin: false,
294
296
  isUserApplyingToAnchor: false,
295
297
  isInvitingUserToAnchor: false,
296
298
  cameraStreamInfo: {
@@ -517,8 +519,8 @@ export const useRoomStore = defineStore('room', {
517
519
  setRoomInfo(roomInfo: TUIRoomInfo) {
518
520
  const {
519
521
  roomOwner, isMicrophoneDisableForAllUser,
520
- isCameraDisableForAllUser, isMessageDisableForAllUser,
521
- isSeatEnabled, seatMode,
522
+ isCameraDisableForAllUser,
523
+ isSeatEnabled, seatMode, maxSeatCount, roomName,
522
524
  } = roomInfo;
523
525
  if (this.localUser.userId === roomOwner) {
524
526
  this.localUser.userRole = TUIRole.kRoomOwner;
@@ -527,11 +529,12 @@ export const useRoomStore = defineStore('room', {
527
529
  this.masterUserId = roomOwner;
528
530
  this.isMicrophoneDisableForAllUser = isMicrophoneDisableForAllUser;
529
531
  this.isCameraDisableForAllUser = isCameraDisableForAllUser;
530
- this.isMessageDisableForAllUser = isMessageDisableForAllUser;
531
532
  this.isSeatEnabled = isSeatEnabled;
532
533
  this.seatMode = seatMode;
533
534
  this.canControlSelfAudio = !this.isMicrophoneDisableForAllUser;
534
535
  this.canControlSelfVideo = !this.isCameraDisableForAllUser;
536
+ this.maxSeatCount = maxSeatCount;
537
+ this.roomName = roomName;
535
538
  },
536
539
  setDisableMicrophoneForAllUserByAdmin(isDisable: boolean) {
537
540
  this.isMicrophoneDisableForAllUser = isDisable;
@@ -539,9 +542,6 @@ export const useRoomStore = defineStore('room', {
539
542
  setDisableCameraForAllUserByAdmin(isDisable: boolean) {
540
543
  this.isCameraDisableForAllUser = isDisable;
541
544
  },
542
- setDisableMessageAllUserByAdmin(isDisable: boolean) {
543
- this.isMessageDisableForAllUser = isDisable;
544
- },
545
545
  setMasterUserId(userId: string) {
546
546
  this.masterUserId = userId;
547
547
  },
@@ -627,7 +627,7 @@ export const useRoomStore = defineStore('room', {
627
627
  setMuteUserChat(userId: string, muted: boolean) {
628
628
  const remoteUserInfo = this.remoteUserObj[userId];
629
629
  if (remoteUserInfo) {
630
- remoteUserInfo.isChatMutedByMasterOrAdmin = muted;
630
+ remoteUserInfo.isMessageDisabled = muted;
631
631
  }
632
632
  },
633
633
  setRemoteUserRole(userId: string, role: TUIRole) {
@@ -737,12 +737,13 @@ export const useRoomStore = defineStore('room', {
737
737
  this.masterUserId = '';
738
738
  this.isMicrophoneDisableForAllUser = false;
739
739
  this.isCameraDisableForAllUser = false;
740
- this.isMessageDisableForAllUser = false;
741
740
  this.isSeatEnabled = false;
742
741
  this.seatMode = TUISeatMode.kFreeToTake;
743
742
  this.hasVideoStreamObject = {};
744
743
  this.hasOtherScreenShare = false;
745
744
  this.isOnStateTabActive = true;
745
+ this.maxSeatCount = 20;
746
+ this.roomName = '';
746
747
  },
747
748
  },
748
749
  });
@@ -1,12 +0,0 @@
1
- var define_import_meta_env_default = { BASE_URL: "/", MODE: "production", DEV: false, PROD: true, SSR: false };
2
- const { VITE_RUNTIME_ENV } = define_import_meta_env_default;
3
- const isUploadLoaded = ["github", "official"].indexOf(VITE_RUNTIME_ENV) !== -1;
4
- const isUploadDetailEvent = VITE_RUNTIME_ENV === "official";
5
- const aegisId = "iHWefAYqooXkVQhcyK";
6
- const projectName = "TUIRoomKit-Electron";
7
- export {
8
- aegisId,
9
- isUploadDetailEvent,
10
- isUploadLoaded,
11
- projectName
12
- };
@@ -1,63 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => {
4
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- return value;
6
- };
7
- import { aegisId, projectName, isUploadLoaded, isUploadDetailEvent } from "./config.mjs";
8
- let aegis;
9
- const script = document.createElement("script");
10
- script.type = "text/javascript";
11
- script.src = "https://cdn-go.cn/aegis/aegis-sdk/latest/aegis.min.js";
12
- document.getElementsByTagName("head")[0].appendChild(script);
13
- script.onload = () => {
14
- aegis = new Aegis({
15
- id: aegisId,
16
- uin: "",
17
- reportApiSpeed: true,
18
- // interface speed measurement
19
- reportAssetSpeed: true,
20
- // Static resource speed measurement
21
- spa: true
22
- // spa Page open
23
- });
24
- if (roomAegis.storedReportEventList) {
25
- roomAegis.storedReportEventList.forEach((data) => {
26
- aegis.reportEvent(data);
27
- });
28
- }
29
- };
30
- class TUIRoomAegis {
31
- constructor() {
32
- __publicField(this, "sdkAppId", 0);
33
- __publicField(this, "projectName", projectName);
34
- __publicField(this, "isUploadLoaded", isUploadLoaded);
35
- __publicField(this, "isUploadDetailEvent", isUploadDetailEvent);
36
- __publicField(this, "hasUploadedEventList", []);
37
- __publicField(this, "storedReportEventList", []);
38
- }
39
- setSdkAppId(sdkAppId) {
40
- this.sdkAppId = sdkAppId;
41
- }
42
- reportEvent(data) {
43
- if (!this.isUploadLoaded) {
44
- return;
45
- }
46
- const { name: eventName, ext1: eventDesc } = data;
47
- if (this.isUploadDetailEvent || eventName === "loaded") {
48
- const uploadData = { ...data, ext2: this.projectName, ext3: this.sdkAppId };
49
- if (aegis) {
50
- if (this.hasUploadedEventList.indexOf(`${eventName}_${eventDesc}`) < 0) {
51
- this.hasUploadedEventList.push(`${eventName}_${eventDesc}`);
52
- aegis.reportEvent(uploadData);
53
- }
54
- } else {
55
- this.storedReportEventList.push(uploadData);
56
- }
57
- }
58
- }
59
- }
60
- const roomAegis = new TUIRoomAegis();
61
- export {
62
- roomAegis as default
63
- };
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var define_import_meta_env_default = { BASE_URL: "/", MODE: "production", DEV: false, PROD: true, SSR: false };
4
- const { VITE_RUNTIME_ENV } = define_import_meta_env_default;
5
- const isUploadLoaded = ["github", "official"].indexOf(VITE_RUNTIME_ENV) !== -1;
6
- const isUploadDetailEvent = VITE_RUNTIME_ENV === "official";
7
- const aegisId = "iHWefAYqooXkVQhcyK";
8
- const projectName = "TUIRoomKit-Electron";
9
- exports.aegisId = aegisId;
10
- exports.isUploadDetailEvent = isUploadDetailEvent;
11
- exports.isUploadLoaded = isUploadLoaded;
12
- exports.projectName = projectName;