Update participant shape
This commit is contained in:
parent
7610226975
commit
e6c93c6b80
1 changed files with 5 additions and 6 deletions
11
src/Room.jsx
11
src/Room.jsx
|
@ -387,7 +387,7 @@ function InRoomView({
|
|||
for (const callFeed of userMediaFeeds) {
|
||||
participants.push({
|
||||
id: callFeed.stream.id,
|
||||
callFeed,
|
||||
usermediaCallFeed: callFeed,
|
||||
isActiveSpeaker:
|
||||
screenshareFeeds.length === 0
|
||||
? callFeed.userId === activeSpeaker
|
||||
|
@ -396,11 +396,10 @@ function InRoomView({
|
|||
}
|
||||
|
||||
for (const callFeed of screenshareFeeds) {
|
||||
participants.push({
|
||||
id: callFeed.stream.id,
|
||||
callFeed,
|
||||
isActiveSpeaker: true,
|
||||
});
|
||||
const participant = participants.find(
|
||||
(p) => p.usermediaCallFeed.userId === callFeed.userId
|
||||
);
|
||||
participant.screenshareCallFeed = callFeed;
|
||||
}
|
||||
|
||||
return participants;
|
||||
|
|
Loading…
Add table
Reference in a new issue