@tencentcloud/roomkit-electron-vue3 2.3.3 → 2.4.0

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 (106) hide show
  1. package/es/components/ManageMember/MemberControl/index.vue.mjs +1 -1
  2. package/es/components/ManageMember/MemberControl/index.vue2.mjs +5 -4
  3. package/es/components/ManageMember/MemberControl/useMemberControlHooks.mjs +19 -4
  4. package/es/components/ManageMember/useIndexHooks.mjs +2 -1
  5. package/es/components/RoomFooter/ApplyControl/MemberApplyControl.vue.mjs +1 -1
  6. package/es/components/RoomFooter/ApplyControl/MemberApplyControl.vue2.mjs +2 -2
  7. package/es/components/RoomFooter/VirtualBackground.vue.mjs +1 -1
  8. package/es/components/RoomFooter/VirtualBackground.vue2.mjs +87 -27
  9. package/es/components/RoomFooter/index/index.vue.mjs +1 -1
  10. package/es/components/RoomFooter/index/index.vue2.mjs +0 -2
  11. package/es/components/RoomHeader/RoomInfo/useRoomInfoHooks.mjs +2 -2
  12. package/es/components/RoomHeader/index/LayoutControl.vue.mjs +1 -1
  13. package/es/components/RoomHeader/index/LayoutControl.vue2.mjs +1 -3
  14. package/es/components/RoomHeader/index/NetworkInfo.vue.mjs +1 -1
  15. package/es/components/RoomHeader/index/NetworkInfo.vue2.mjs +0 -2
  16. package/es/components/common/base/MessageBox/index.mjs +3 -1
  17. package/es/conference.d.ts +1 -1
  18. package/es/conference.vue.mjs +1 -1
  19. package/es/conference.vue2.mjs +1 -14
  20. package/es/constants/room.d.ts +3 -1
  21. package/es/extension/RoomMessageCard/RoomMessageCard.vue.mjs +1 -1
  22. package/es/extension/RoomMessageCard/RoomMessageCard.vue2.mjs +2 -2
  23. package/es/extension/chatExtension.mjs +1 -1
  24. package/es/hooks/useDeviceManager.d.ts +3 -1
  25. package/es/hooks/useMasterApplyControl.mjs +16 -10
  26. package/es/hooks/useRoomEngine.d.ts +3 -1
  27. package/es/index.d.ts +2 -1
  28. package/es/index.mjs +1494 -1437
  29. package/es/locales/en-US.d.ts +8 -7
  30. package/es/locales/en-US.mjs +8 -7
  31. package/es/locales/zh-CN.d.ts +10 -9
  32. package/es/locales/zh-CN.mjs +10 -9
  33. package/es/services/function/virtualBackground.d.ts +2 -0
  34. package/es/services/function/virtualBackground.mjs +19 -9
  35. package/es/services/function/waterMark.mjs +3 -0
  36. package/es/services/manager/componentManager.mjs +1 -1
  37. package/es/services/manager/roomActionManager.mjs +1 -1
  38. package/es/services/roomService.d.ts +3 -2
  39. package/es/stores/room.mjs +9 -1
  40. package/lib/components/ManageMember/MemberControl/index.vue.js +1 -1
  41. package/lib/components/ManageMember/MemberControl/index.vue2.js +4 -3
  42. package/lib/components/ManageMember/MemberControl/useMemberControlHooks.js +19 -4
  43. package/lib/components/ManageMember/useIndexHooks.js +2 -1
  44. package/lib/components/RoomFooter/ApplyControl/MemberApplyControl.vue.js +1 -1
  45. package/lib/components/RoomFooter/ApplyControl/MemberApplyControl.vue2.js +2 -2
  46. package/lib/components/RoomFooter/VirtualBackground.vue.js +1 -1
  47. package/lib/components/RoomFooter/VirtualBackground.vue2.js +86 -26
  48. package/lib/components/RoomFooter/index/index.vue.js +1 -1
  49. package/lib/components/RoomFooter/index/index.vue2.js +0 -2
  50. package/lib/components/RoomHeader/RoomInfo/useRoomInfoHooks.js +2 -2
  51. package/lib/components/RoomHeader/index/LayoutControl.vue.js +1 -1
  52. package/lib/components/RoomHeader/index/LayoutControl.vue2.js +1 -3
  53. package/lib/components/RoomHeader/index/NetworkInfo.vue.js +1 -1
  54. package/lib/components/RoomHeader/index/NetworkInfo.vue2.js +0 -2
  55. package/lib/components/common/base/MessageBox/index.js +3 -1
  56. package/lib/conference.d.ts +1 -1
  57. package/lib/conference.vue.js +1 -1
  58. package/lib/conference.vue2.js +10 -23
  59. package/lib/constants/room.d.ts +3 -1
  60. package/lib/extension/RoomMessageCard/RoomMessageCard.vue.js +1 -1
  61. package/lib/extension/RoomMessageCard/RoomMessageCard.vue2.js +2 -2
  62. package/lib/extension/chatExtension.js +1 -1
  63. package/lib/hooks/useDeviceManager.d.ts +3 -1
  64. package/lib/hooks/useMasterApplyControl.js +16 -10
  65. package/lib/hooks/useRoomEngine.d.ts +3 -1
  66. package/lib/index.d.ts +2 -1
  67. package/lib/index.js +1493 -1436
  68. package/lib/locales/en-US.d.ts +8 -7
  69. package/lib/locales/en-US.js +8 -7
  70. package/lib/locales/zh-CN.d.ts +10 -9
  71. package/lib/locales/zh-CN.js +10 -9
  72. package/lib/services/function/virtualBackground.d.ts +2 -0
  73. package/lib/services/function/virtualBackground.js +19 -9
  74. package/lib/services/function/waterMark.js +3 -0
  75. package/lib/services/manager/componentManager.js +1 -1
  76. package/lib/services/manager/roomActionManager.js +1 -1
  77. package/lib/services/roomService.d.ts +3 -2
  78. package/lib/stores/room.js +9 -1
  79. package/package.json +2 -2
  80. package/src/TUIRoom/assets/style/global.scss +1 -1
  81. package/src/TUIRoom/components/ManageMember/MemberControl/index.vue +5 -4
  82. package/src/TUIRoom/components/ManageMember/MemberControl/useMemberControlHooks.ts +20 -5
  83. package/src/TUIRoom/components/ManageMember/useIndexHooks.ts +3 -2
  84. package/src/TUIRoom/components/RoomFooter/ApplyControl/MemberApplyControl.vue +2 -2
  85. package/src/TUIRoom/components/RoomFooter/VirtualBackground.vue +100 -16
  86. package/src/TUIRoom/components/RoomFooter/index/index.vue +0 -3
  87. package/src/TUIRoom/components/RoomHeader/RoomInfo/useRoomInfoHooks.ts +2 -2
  88. package/src/TUIRoom/components/RoomHeader/index/LayoutControl.vue +0 -2
  89. package/src/TUIRoom/components/RoomHeader/index/NetworkInfo.vue +0 -2
  90. package/src/TUIRoom/components/common/base/MessageBox/index.ts +2 -1
  91. package/src/TUIRoom/conference.vue +6 -13
  92. package/src/TUIRoom/extension/RoomMessageCard/RoomMessageCard.vue +1 -1
  93. package/src/TUIRoom/extension/chatExtension.ts +1 -1
  94. package/src/TUIRoom/hooks/useMasterApplyControl.ts +15 -10
  95. package/src/TUIRoom/index.ts +2 -1
  96. package/src/TUIRoom/locales/en-US.ts +8 -7
  97. package/src/TUIRoom/locales/zh-CN.ts +10 -9
  98. package/src/TUIRoom/services/function/virtualBackground.ts +21 -9
  99. package/src/TUIRoom/services/function/waterMark.ts +6 -0
  100. package/src/TUIRoom/services/manager/componentManager.ts +1 -1
  101. package/src/TUIRoom/services/manager/roomActionManager.ts +1 -1
  102. package/src/TUIRoom/stores/room.ts +9 -1
  103. package/es/utils/aegis/config.mjs +0 -12
  104. package/es/utils/aegis/index.mjs +0 -63
  105. package/lib/utils/aegis/config.js +0 -12
  106. package/lib/utils/aegis/index.js +0 -63
@@ -38,7 +38,7 @@ declare const _default: {
38
38
  'Join Room': string;
39
39
  'Enter room ID': string;
40
40
  'video conferencing': string;
41
- 'Quick Meeting': string;
41
+ 'Quick Conference': string;
42
42
  'Room ID': string;
43
43
  'Low Definition': string;
44
44
  'Standard Definition': string;
@@ -71,9 +71,9 @@ declare const _default: {
71
71
  'Full screen': string;
72
72
  Members: string;
73
73
  'Search Member': string;
74
- 'Transfer owner': string;
74
+ 'Make host': string;
75
75
  'Set as administrator': string;
76
- 'Revoke administrator': string;
76
+ 'Remove administrator': string;
77
77
  'The administrator status of sb has been withdrawn': ({ named }: {
78
78
  named: any;
79
79
  }) => string;
@@ -262,7 +262,7 @@ declare const _default: {
262
262
  'An invitation to open the camera has been sent to sb.': ({ named }: {
263
263
  named: any;
264
264
  }) => string;
265
- 'Transfer owner failed, please try again.': string;
265
+ 'Make host failed, please try again.': string;
266
266
  'Sb has been set as an administrator': ({ named }: {
267
267
  named: any;
268
268
  }) => string;
@@ -286,8 +286,7 @@ declare const _default: {
286
286
  'You are now an administrator': string;
287
287
  'The RoomOwner has withdrawn your administrator privileges': string;
288
288
  'This member has already received the same request, please try again later': string;
289
- 'Failed to go on stage, invitation has timed out': string;
290
- 'The current number of people on stage has reached the limit': string;
289
+ 'The request to go on stage has timed out': string;
291
290
  'The invitation to sb to go on stage has timed out': ({ named }: {
292
291
  named: any;
293
292
  }) => string;
@@ -306,7 +305,9 @@ declare const _default: {
306
305
  'and so on number people applying to stage': ({ named }: {
307
306
  named: any;
308
307
  }) => string;
309
- 'quick meeting': string;
308
+ 'The stage is full, please contact the host': string;
309
+ 'The stage is full': string;
310
+ 'quick conference': string;
310
311
  Meeting: string;
311
312
  'Meeting in progress': string;
312
313
  Initiating: string;
@@ -40,7 +40,7 @@ const EN = {
40
40
  "Join Room": "Join Room",
41
41
  "Enter room ID": "Enter room ID",
42
42
  "video conferencing": " 's video conferencing",
43
- "Quick Meeting": " 's Quick Meeting",
43
+ "Quick Conference": " 's Quick Conference",
44
44
  "Room ID": "Room ID",
45
45
  "Low Definition": "Low Definition",
46
46
  "Standard Definition": "Standard Definition",
@@ -73,9 +73,9 @@ const EN = {
73
73
  "Full screen": "Full screen",
74
74
  Members: "Members",
75
75
  "Search Member": "Search Member",
76
- "Transfer owner": "Transfer owner",
76
+ "Make host": "Make host",
77
77
  "Set as administrator": "Set as administrator",
78
- "Revoke administrator": "Revoke administrator",
78
+ "Remove administrator": "Remove administrator",
79
79
  // @ts-ignore
80
80
  "The administrator status of sb has been withdrawn": ({ named }) => `The administrator status of ${named("name")} has been withdrawn`,
81
81
  // @ts-ignore
@@ -254,7 +254,7 @@ const EN = {
254
254
  "An invitation to open the microphone has been sent to sb.": ({ named }) => `An invitation to open the microphone has been sent to ${named("name")}`,
255
255
  // @ts-ignore
256
256
  "An invitation to open the camera has been sent to sb.": ({ named }) => `An invitation to open the camera has been sent to ${named("name")}`,
257
- "Transfer owner failed, please try again.": "Transfer owner failed, please try again.",
257
+ "Make host failed, please try again.": "Make host failed, please try again.",
258
258
  // @ts-ignore
259
259
  "Sb has been set as an administrator": ({ named }) => `${named("name")} has been set as an administrator.`,
260
260
  "Succeed on stage": "Succeed on stage",
@@ -275,8 +275,7 @@ const EN = {
275
275
  "You are now an administrator": "You are now an administrator",
276
276
  "The RoomOwner has withdrawn your administrator privileges": "The RoomOwner has withdrawn your administrator privileges",
277
277
  "This member has already received the same request, please try again later": "This member has already received the same request, please try again later",
278
- "Failed to go on stage, invitation has timed out": "Failed to go on stage, invitation has timed out",
279
- "The current number of people on stage has reached the limit": "The current number of people on stage has reached the limit",
278
+ "The request to go on stage has timed out": "The request to go on stage has timed out",
280
279
  // @ts-ignore
281
280
  "The invitation to sb to go on stage has timed out": ({ named }) => `The invitation to ${named("name")} to go on stage has timed out`,
282
281
  "Currently no member has applied to go on stage": "Currently no member has applied to go on stage",
@@ -293,8 +292,10 @@ const EN = {
293
292
  "people applying to stage": "people applying to stage",
294
293
  // @ts-ignore
295
294
  "and so on number people applying to stage": ({ named }) => `and so on ${named("number")} people applying to stage`,
295
+ "The stage is full, please contact the host": "The stage is full, please contact the host",
296
+ "The stage is full": "The stage is full",
296
297
  // Room Chat Fusion Card Translation
297
- "quick meeting": "quick meeting",
298
+ "quick conference": "quick conference",
298
299
  Meeting: "Meeting",
299
300
  "Meeting in progress": "Meeting in progress",
300
301
  Initiating: "Initiating",
@@ -35,7 +35,7 @@ declare const _default: {
35
35
  'Join Room': string;
36
36
  'Enter room ID': string;
37
37
  'video conferencing': string;
38
- 'Quick Meeting': string;
38
+ 'Quick Conference': string;
39
39
  'Room ID': string;
40
40
  'Low Definition': string;
41
41
  'Standard Definition': string;
@@ -68,9 +68,9 @@ declare const _default: {
68
68
  'Full screen': string;
69
69
  Members: string;
70
70
  'Search Member': string;
71
- 'Transfer owner': string;
71
+ 'Make host': string;
72
72
  'Set as administrator': string;
73
- 'Revoke administrator': string;
73
+ 'Remove administrator': string;
74
74
  'The administrator status of sb has been withdrawn': ({ named }: {
75
75
  named: any;
76
76
  }) => string;
@@ -226,10 +226,10 @@ declare const _default: {
226
226
  'kicked out of the room by the host': string;
227
227
  'kicked out of the room by other device': string;
228
228
  'kicked out of the room by serve': string;
229
- 'Reject sb stage failed, please retry': ({ named }: {
229
+ 'Reject sb on stage failed, please retry': ({ named }: {
230
230
  named: any;
231
231
  }) => string;
232
- 'Agree sb stage failed, please retry': ({ named }: {
232
+ 'Agree sb on stage failed, please retry': ({ named }: {
233
233
  named: any;
234
234
  }) => string;
235
235
  'Has been fully muted and cannot open the microphone': string;
@@ -262,7 +262,7 @@ declare const _default: {
262
262
  'An invitation to open the camera has been sent to sb.': ({ named }: {
263
263
  named: any;
264
264
  }) => string;
265
- 'Transfer owner failed, please try again.': string;
265
+ 'Make host failed, please try again.': string;
266
266
  'Sb has been set as an administrator': ({ named }: {
267
267
  named: any;
268
268
  }) => string;
@@ -286,8 +286,7 @@ declare const _default: {
286
286
  'You are now an administrator': string;
287
287
  'The RoomOwner has withdrawn your administrator privileges': string;
288
288
  'This member has already received the same request, please try again later': string;
289
- 'Failed to go on stage, invitation has timed out': string;
290
- 'The current number of people on stage has reached the limit': string;
289
+ 'The request to go on stage has timed out': string;
291
290
  'The invitation to sb to go on stage has timed out': ({ named }: {
292
291
  named: any;
293
292
  }) => string;
@@ -306,7 +305,9 @@ declare const _default: {
306
305
  'and so on number people applying to stage': ({ named }: {
307
306
  named: any;
308
307
  }) => string;
309
- 'quick meeting': string;
308
+ 'The stage is full, please contact the host': string;
309
+ 'The stage is full': string;
310
+ 'quick conference': string;
310
311
  Meeting: string;
311
312
  'Meeting in progress': string;
312
313
  Initiating: string;
@@ -37,7 +37,7 @@ const ZH = {
37
37
  "Join Room": "进入房间",
38
38
  "Enter room ID": "输入房间号",
39
39
  "video conferencing": " 的视频会议",
40
- "Quick Meeting": "的快速会议",
40
+ "Quick Conference": "的快速会议",
41
41
  "Room ID": "房间号",
42
42
  "Low Definition": "流畅",
43
43
  "Standard Definition": "标清",
@@ -70,9 +70,9 @@ const ZH = {
70
70
  "Full screen": "全屏",
71
71
  Members: "成员",
72
72
  "Search Member": "搜索成员",
73
- "Transfer owner": "转交房主",
73
+ "Make host": "转交房主",
74
74
  "Set as administrator": "设为管理员",
75
- "Revoke administrator": "撤销管理员",
75
+ "Remove administrator": "撤销管理员",
76
76
  // @ts-ignore
77
77
  "The administrator status of sb has been withdrawn": ({ named }) => `已将 ${named("name")} 的管理员身份撤回`,
78
78
  // @ts-ignore
@@ -224,9 +224,9 @@ const ZH = {
224
224
  "kicked out of the room by other device": "相同账号在其他客户端进入房间",
225
225
  "kicked out of the room by serve": "被服务端踢出房间",
226
226
  // @ts-ignore
227
- "Reject sb stage failed, please retry": ({ named }) => `拒绝 ${named("name")} 上台失败, 请重试`,
227
+ "Reject sb on stage failed, please retry": ({ named }) => `拒绝 ${named("name")} 上台失败, 请重试`,
228
228
  // @ts-ignore
229
- "Agree sb stage failed, please retry": ({ named }) => `同意 ${named("name")} 上台失败, 请重试`,
229
+ "Agree sb on stage failed, please retry": ({ named }) => `同意 ${named("name")} 上台失败, 请重试`,
230
230
  "Has been fully muted and cannot open the microphone": "已被全员静音,无法打开麦克风",
231
231
  "Has been muted by the host and cannot open the microphone": "已被主持人静音,无法打开麦克风",
232
232
  "To apply to speak in the room, please raise your hand first to apply for the microphone": "申请发言房间,请先举手申请上麦",
@@ -254,7 +254,7 @@ const ZH = {
254
254
  "An invitation to open the microphone has been sent to sb.": ({ named }) => `已向 ${named("name")} 发出开启麦克风邀请`,
255
255
  // @ts-ignore
256
256
  "An invitation to open the camera has been sent to sb.": ({ named }) => `已向 ${named("name")} 发出开启摄像头邀请`,
257
- "Transfer owner failed, please try again.": "转交房主失败,请重试",
257
+ "Make host failed, please try again.": "转交房主失败,请重试",
258
258
  // @ts-ignore
259
259
  "Sb has been set as an administrator": ({ named }) => `已将 ${named("name")} 设为管理员`,
260
260
  "Succeed on stage": "上台成功",
@@ -275,8 +275,7 @@ const ZH = {
275
275
  "You are now an administrator": "您已成为管理员",
276
276
  "The RoomOwner has withdrawn your administrator privileges": "房主已收回您的管理员权限",
277
277
  "This member has already received the same request, please try again later": "该成员已收到相同请求,请稍后再试",
278
- "Failed to go on stage, invitation has timed out": "上台失败,邀请已超时",
279
- "The current number of people on stage has reached the limit": "当前上台人数已达上限",
278
+ "The request to go on stage has timed out": "上台请求已超时",
280
279
  // @ts-ignore
281
280
  "The invitation to sb to go on stage has timed out": ({ named }) => `对${named("name")}的上台邀请已超时`,
282
281
  "Currently no member has applied to go on stage": "暂无成员申请上台",
@@ -293,8 +292,10 @@ const ZH = {
293
292
  "people applying to stage": "人正在申请上台",
294
293
  // @ts-ignore
295
294
  "and so on number people applying to stage": ({ named }) => `等 ${named("number")} 人正在申请上台`,
295
+ "The stage is full, please contact the host": "台上人数已满,请联系主持人",
296
+ "The stage is full": "台上人数已满",
296
297
  // Room Chat Fusion Card Translation
297
- "quick meeting": "快速会议",
298
+ "quick conference": "快速会议",
298
299
  Meeting: "会议",
299
300
  "Meeting in progress": "会议 进行中",
300
301
  Initiating: "正在发起",
@@ -4,6 +4,7 @@ interface IVirtualBackground {
4
4
  dispose(): void;
5
5
  initVirtualBackground(): Promise<void>;
6
6
  toggleVirtualBackground(enabled: boolean): Promise<void>;
7
+ toggleTestVirtualBackground(enabled: boolean): Promise<void>;
7
8
  }
8
9
  export declare class VirtualBackground implements IVirtualBackground {
9
10
  private service;
@@ -15,5 +16,6 @@ export declare class VirtualBackground implements IVirtualBackground {
15
16
  dispose(): void;
16
17
  initVirtualBackground(): Promise<void>;
17
18
  toggleVirtualBackground(enabled: boolean): Promise<void>;
19
+ toggleTestVirtualBackground(enabled: boolean): Promise<void>;
18
20
  }
19
21
  export {};
@@ -13,6 +13,7 @@ class VirtualBackground {
13
13
  __publicField(this, "virtualBackgroundPluginReady", false);
14
14
  __publicField(this, "handleUnmount", async () => {
15
15
  await this.toggleVirtualBackground(false);
16
+ await this.toggleTestVirtualBackground(false);
16
17
  });
17
18
  this.service = service;
18
19
  if (environment.isElectron)
@@ -38,15 +39,24 @@ class VirtualBackground {
38
39
  async toggleVirtualBackground(enabled) {
39
40
  await this.initVirtualBackground();
40
41
  const { sdkAppId, userId, userSig } = this.service.basicStore;
41
- await this.trtcCloud.callExperimentalAPI(JSON.stringify({
42
- api: "enableVirtualBackground",
43
- params: {
44
- sdkAppId,
45
- userId,
46
- userSig,
47
- enable: enabled
48
- }
49
- }));
42
+ const params = {
43
+ sdkAppId,
44
+ userId,
45
+ userSig,
46
+ enable: enabled
47
+ };
48
+ await this.trtcCloud.callExperimentalAPI(JSON.stringify({ api: "enableVirtualBackground", params }));
49
+ }
50
+ async toggleTestVirtualBackground(enabled) {
51
+ await this.initVirtualBackground();
52
+ const { sdkAppId, userId, userSig } = this.service.basicStore;
53
+ const params = {
54
+ sdkAppId,
55
+ userId,
56
+ userSig,
57
+ enable: enabled
58
+ };
59
+ await this.trtcCloud.callExperimentalAPI(JSON.stringify({ api: "enableTestVirtualBackground", params }));
50
60
  }
51
61
  }
52
62
  exports.VirtualBackground = VirtualBackground;
@@ -79,6 +79,7 @@ class WaterMark {
79
79
  watermarkContainer.classList.add("watermark-container");
80
80
  targetElement.appendChild(watermarkContainer);
81
81
  const addWatermarkElements = () => {
82
+ watermarkContainer.innerHTML = "";
82
83
  const maxWidth = 200;
83
84
  const watermarkSpacing = maxWidth + 25;
84
85
  for (let y = -watermarkSpacing; y < watermarkContainer.offsetHeight + watermarkSpacing; y += watermarkSpacing) {
@@ -93,6 +94,8 @@ class WaterMark {
93
94
  }
94
95
  };
95
96
  addWatermarkElements();
97
+ const resizeObserver = new ResizeObserver(addWatermarkElements);
98
+ resizeObserver.observe(watermarkContainer);
96
99
  const observerCallback = (mutations, observer) => {
97
100
  mutations.forEach((mutation) => {
98
101
  if (mutation.removedNodes.length > 0) {
@@ -35,7 +35,7 @@ const defaultConfig = {
35
35
  ManageMemberControl: { visible: true },
36
36
  InviteControl: { visible: true },
37
37
  ChatControl: { visible: true },
38
- MoreControl: { visible: true },
38
+ MoreControl: { visible: false },
39
39
  VirtualBackground: { visible: false }
40
40
  };
41
41
  const _ComponentManager = class _ComponentManager {
@@ -104,7 +104,7 @@ class RoomActionManager {
104
104
  const { roomId, roomName, roomMode } = options;
105
105
  const roomParams = {
106
106
  roomId,
107
- name: roomName,
107
+ roomName,
108
108
  roomType: TUIRoomEngine.TUIRoomType.kConference,
109
109
  isSeatEnabled: roomMode !== "FreeToSpeak",
110
110
  seatMode: roomMode === "SpeakAfterTakingSeat" ? TUIRoomEngine.TUISeatMode.kApplyToTake : void 0
@@ -5,9 +5,10 @@ import { LifeCycleManager } from './manager/lifeCycleManager';
5
5
  import { SelfInfoOptions, UserManager } from './manager/userManager';
6
6
  import { ConfigManager, LanguageOption, ThemeOption } from './manager/configManager';
7
7
  import { ComponentConfig, ComponentManager, ComponentName } from './manager/componentManager';
8
+ import { default as TUIRoomEngine } from '@tencentcloud/tuiroom-engine-electron';
8
9
  import { EventType, IRoomService, RoomInitData, RoomParam } from './types';
9
10
 
10
- export declare const roomEngine: Record<string, any>;
11
+ export declare const roomEngine: Record<string, TUIRoomEngine | null>;
11
12
  export declare class RoomService implements IRoomService {
12
13
  static instance?: RoomService;
13
14
  private emitter;
@@ -18,7 +19,7 @@ export declare class RoomService implements IRoomService {
18
19
  roomActionManager: RoomActionManager;
19
20
  waterMark: WaterMark;
20
21
  virtualBackground: VirtualBackground;
21
- roomEngine: Record<string, any>;
22
+ roomEngine: Record<string, TUIRoomEngine | null>;
22
23
  t: any;
23
24
  get basicStore(): any;
24
25
  get roomStore(): any;
@@ -57,6 +57,8 @@ const useRoomStore = pinia.defineStore("room", {
57
57
  seatMode: TUIRoomEngine.TUISeatMode.kFreeToTake,
58
58
  maxMembersCount: 5,
59
59
  // Includes local streams and screen shares, above which subsequent streams are played
60
+ maxSeatCount: 20,
61
+ roomName: "",
60
62
  hasVideoStreamObject: {},
61
63
  // Visual area user flow list
62
64
  currentStreamIdListInVisibleView: [],
@@ -427,7 +429,9 @@ const useRoomStore = pinia.defineStore("room", {
427
429
  isCameraDisableForAllUser,
428
430
  isMessageDisableForAllUser,
429
431
  isSeatEnabled,
430
- seatMode
432
+ seatMode,
433
+ maxSeatCount,
434
+ roomName
431
435
  } = roomInfo;
432
436
  if (this.localUser.userId === roomOwner) {
433
437
  this.localUser.userRole = TUIRoomEngine.TUIRole.kRoomOwner;
@@ -440,6 +444,8 @@ const useRoomStore = pinia.defineStore("room", {
440
444
  this.seatMode = seatMode;
441
445
  this.canControlSelfAudio = !this.isMicrophoneDisableForAllUser;
442
446
  this.canControlSelfVideo = !this.isCameraDisableForAllUser;
447
+ this.maxSeatCount = maxSeatCount;
448
+ this.roomName = roomName;
443
449
  },
444
450
  setDisableMicrophoneForAllUserByAdmin(isDisable) {
445
451
  this.isMicrophoneDisableForAllUser = isDisable;
@@ -645,6 +651,8 @@ const useRoomStore = pinia.defineStore("room", {
645
651
  this.hasVideoStreamObject = {};
646
652
  this.hasOtherScreenShare = false;
647
653
  this.isOnStateTabActive = true;
654
+ this.maxSeatCount = 20;
655
+ this.roomName = "";
648
656
  }
649
657
  }
650
658
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencentcloud/roomkit-electron-vue3",
3
- "version": "2.3.3",
3
+ "version": "2.4.0",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.mjs",
6
6
  "types": "./es/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@tencentcloud/chat": "latest",
22
22
  "@tencentcloud/tui-core": "latest",
23
- "@tencentcloud/tuiroom-engine-electron": "^2.3.3",
23
+ "@tencentcloud/tuiroom-engine-electron": "^2.4.0",
24
24
  "@tencentcloud/universal-api": "^2.0.9",
25
25
  "interactjs": "^1.10.26",
26
26
  "mitt": "^3.0.0"
@@ -10,7 +10,7 @@ body, html {
10
10
  margin: 0;
11
11
  padding: 0;
12
12
  user-select: none;
13
- overflow: auto;
13
+ overflow: hidden;
14
14
  touch-action: manipulation;
15
15
  }
16
16
 
@@ -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 { isFreeSpeakMode, isSpeakAfterTakingSeatMode, localUser, isGeneralUser } = storeToRefs(roomStore);
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
  **/
@@ -117,14 +124,14 @@ export default function useMemberControl(props?: any) {
117
124
  const transferOwner = computed(() => ({
118
125
  key: 'transferOwner',
119
126
  icon: TransferOwnerIcon,
120
- title: t('Transfer owner'),
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('Revoke administrator') : t('Set as administrator'),
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
  }
@@ -301,7 +316,7 @@ export default function useMemberControl(props?: any) {
301
316
  } catch (error) {
302
317
  TUIMessage({
303
318
  type: 'error',
304
- message: t('Transfer owner failed, please try again.'),
319
+ message: t('Make host failed, please try again.'),
305
320
  duration: MESSAGE_DURATION.NORMAL,
306
321
  });
307
322
  }
@@ -309,7 +324,7 @@ export default function useMemberControl(props?: any) {
309
324
  }
310
325
 
311
326
  /**
312
- * Set/revoke administrator permissions
327
+ * Set/Remove administrator permissions
313
328
  */
314
329
  async function handleSetOrRevokeAdmin(userInfo: UserInfo) {
315
330
  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 userName = applyToAnchorList.value[0]?.userName || applyToAnchorList.value[0]?.userId;
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 `${userName} ${t('and so on number people applying to stage', { number: applyToAnchorList.value.length })}`;
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('Failed to go on stage, invitation has timed out') });
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 current number of people on stage has reached the limit') });
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
  }