@tencentcloud/roomkit-electron-vue3 2.8.1 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,6 +55,11 @@ interface IConference {
55
55
  replaceFriendList: (userList: Array<any>) => void;
56
56
  setUserListSortComparator: (comparator: Comparator<UserInfo>) => void;
57
57
  setStreamListSortComparator: (comparator: Comparator<StreamInfo>) => void;
58
+ setParticipants: (participants: Array<{
59
+ userName: string;
60
+ userId: string;
61
+ avatarUrl: string;
62
+ }>) => void;
58
63
  }
59
64
  declare class Conference implements IConference {
60
65
  login(params: {
@@ -85,6 +90,11 @@ declare class Conference implements IConference {
85
90
  replaceFriendList(userList: Array<any>): void;
86
91
  setUserListSortComparator(comparator: Comparator<UserInfo>): void;
87
92
  setStreamListSortComparator(comparator: Comparator<StreamInfo>): void;
93
+ setParticipants(participants: Array<{
94
+ userName: string;
95
+ userId: string;
96
+ avatarUrl: string;
97
+ }>): void;
88
98
  }
89
99
  export declare const conference: Conference;
90
100
  export {};
package/es/conference.mjs CHANGED
@@ -106,6 +106,16 @@ class Conference {
106
106
  setStreamListSortComparator(comparator) {
107
107
  roomService.userManager.setStreamListSortComparator(comparator);
108
108
  }
109
+ setParticipants(participants) {
110
+ const list = participants.map((item) => {
111
+ const { userId, userName, avatarUrl } = item;
112
+ return {
113
+ userID: userId,
114
+ profile: { userID: userId, nick: userName, avatar: avatarUrl }
115
+ };
116
+ });
117
+ roomService.scheduleConferenceManager.replaceFriendList(list);
118
+ }
109
119
  }
110
120
  const conference = new Conference();
111
121
  export {
@@ -37,8 +37,11 @@ interface IScheduleConferenceManager {
37
37
  fetchFriendList(): Promise<void>;
38
38
  replaceFriendList(userList: Array<{
39
39
  userID: string;
40
- avatar: string;
41
- nick: string;
40
+ profile: {
41
+ userID: string;
42
+ nick: string;
43
+ avatar: string;
44
+ };
42
45
  }>): void;
43
46
  }
44
47
  export interface IScheduleConferenceOptions {
@@ -79,8 +82,11 @@ export declare class ScheduleConferenceManager implements IScheduleConferenceMan
79
82
  fetchFriendList(): Promise<any>;
80
83
  replaceFriendList(userList: Array<{
81
84
  userID: string;
82
- avatar: string;
83
- nick: string;
85
+ profile: {
86
+ userID: string;
87
+ nick: string;
88
+ avatar: string;
89
+ };
84
90
  }>): void;
85
91
  generateRoomId(attempt?: number): Promise<string>;
86
92
  scheduleConference(options: IScheduleConferenceOptions): Promise<any>;
@@ -55,6 +55,11 @@ interface IConference {
55
55
  replaceFriendList: (userList: Array<any>) => void;
56
56
  setUserListSortComparator: (comparator: Comparator<UserInfo>) => void;
57
57
  setStreamListSortComparator: (comparator: Comparator<StreamInfo>) => void;
58
+ setParticipants: (participants: Array<{
59
+ userName: string;
60
+ userId: string;
61
+ avatarUrl: string;
62
+ }>) => void;
58
63
  }
59
64
  declare class Conference implements IConference {
60
65
  login(params: {
@@ -85,6 +90,11 @@ declare class Conference implements IConference {
85
90
  replaceFriendList(userList: Array<any>): void;
86
91
  setUserListSortComparator(comparator: Comparator<UserInfo>): void;
87
92
  setStreamListSortComparator(comparator: Comparator<StreamInfo>): void;
93
+ setParticipants(participants: Array<{
94
+ userName: string;
95
+ userId: string;
96
+ avatarUrl: string;
97
+ }>): void;
88
98
  }
89
99
  export declare const conference: Conference;
90
100
  export {};
package/lib/conference.js CHANGED
@@ -108,6 +108,16 @@ class Conference {
108
108
  setStreamListSortComparator(comparator) {
109
109
  roomService.roomService.userManager.setStreamListSortComparator(comparator);
110
110
  }
111
+ setParticipants(participants) {
112
+ const list = participants.map((item) => {
113
+ const { userId, userName, avatarUrl } = item;
114
+ return {
115
+ userID: userId,
116
+ profile: { userID: userId, nick: userName, avatar: avatarUrl }
117
+ };
118
+ });
119
+ roomService.roomService.scheduleConferenceManager.replaceFriendList(list);
120
+ }
111
121
  }
112
122
  const conference = new Conference();
113
123
  exports.FeatureButton = FeatureButton;
@@ -37,8 +37,11 @@ interface IScheduleConferenceManager {
37
37
  fetchFriendList(): Promise<void>;
38
38
  replaceFriendList(userList: Array<{
39
39
  userID: string;
40
- avatar: string;
41
- nick: string;
40
+ profile: {
41
+ userID: string;
42
+ nick: string;
43
+ avatar: string;
44
+ };
42
45
  }>): void;
43
46
  }
44
47
  export interface IScheduleConferenceOptions {
@@ -79,8 +82,11 @@ export declare class ScheduleConferenceManager implements IScheduleConferenceMan
79
82
  fetchFriendList(): Promise<any>;
80
83
  replaceFriendList(userList: Array<{
81
84
  userID: string;
82
- avatar: string;
83
- nick: string;
85
+ profile: {
86
+ userID: string;
87
+ nick: string;
88
+ avatar: string;
89
+ };
84
90
  }>): void;
85
91
  generateRoomId(attempt?: number): Promise<string>;
86
92
  scheduleConference(options: IScheduleConferenceOptions): Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencentcloud/roomkit-electron-vue3",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
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.8.1",
23
+ "@tencentcloud/tuiroom-engine-electron": "^2.8.2",
24
24
  "@tencentcloud/chat-uikit-engine": "2.3.3",
25
25
  "@tencentcloud/chat-uikit-vue": "2.3.3",
26
26
  "@tencentcloud/universal-api": "^2.0.9",
@@ -91,6 +91,14 @@ interface IConference {
91
91
  setUserListSortComparator: (comparator: Comparator<UserInfo>) => void;
92
92
 
93
93
  setStreamListSortComparator: (comparator: Comparator<StreamInfo>) => void;
94
+
95
+ setParticipants: (
96
+ participants: Array<{
97
+ userName: string;
98
+ userId: string;
99
+ avatarUrl: string;
100
+ }>
101
+ ) => void;
94
102
  }
95
103
  class Conference implements IConference {
96
104
  public login(params: {
@@ -196,6 +204,23 @@ class Conference implements IConference {
196
204
  public setStreamListSortComparator(comparator: Comparator<StreamInfo>) {
197
205
  roomService.userManager.setStreamListSortComparator(comparator);
198
206
  }
207
+
208
+ public setParticipants(
209
+ participants: Array<{
210
+ userName: string;
211
+ userId: string;
212
+ avatarUrl: string;
213
+ }>
214
+ ) {
215
+ const list = participants.map(item => {
216
+ const { userId, userName, avatarUrl } = item;
217
+ return {
218
+ userID: userId,
219
+ profile: { userID: userId, nick: userName, avatar: avatarUrl },
220
+ };
221
+ });
222
+ roomService.scheduleConferenceManager.replaceFriendList(list);
223
+ }
199
224
  }
200
225
 
201
226
  export const conference = new Conference();
@@ -53,8 +53,7 @@ interface IScheduleConferenceManager {
53
53
  replaceFriendList(
54
54
  userList: Array<{
55
55
  userID: string;
56
- avatar: string;
57
- nick: string;
56
+ profile: { userID: string; nick: string; avatar: string };
58
57
  }>
59
58
  ): void;
60
59
  }
@@ -235,8 +234,7 @@ export class ScheduleConferenceManager implements IScheduleConferenceManager {
235
234
  replaceFriendList(
236
235
  userList: Array<{
237
236
  userID: string;
238
- avatar: string;
239
- nick: string;
237
+ profile: { userID: string; nick: string; avatar: string };
240
238
  }>
241
239
  ) {
242
240
  this.customFriendList = userList;