Update participant shape

This commit is contained in:
Robert Long 2021-11-23 12:12:11 -08:00
parent 7610226975
commit e6c93c6b80

View file

@ -387,7 +387,7 @@ function InRoomView({
for (const callFeed of userMediaFeeds) { for (const callFeed of userMediaFeeds) {
participants.push({ participants.push({
id: callFeed.stream.id, id: callFeed.stream.id,
callFeed, usermediaCallFeed: callFeed,
isActiveSpeaker: isActiveSpeaker:
screenshareFeeds.length === 0 screenshareFeeds.length === 0
? callFeed.userId === activeSpeaker ? callFeed.userId === activeSpeaker
@ -396,11 +396,10 @@ function InRoomView({
} }
for (const callFeed of screenshareFeeds) { for (const callFeed of screenshareFeeds) {
participants.push({ const participant = participants.find(
id: callFeed.stream.id, (p) => p.usermediaCallFeed.userId === callFeed.userId
callFeed, );
isActiveSpeaker: true, participant.screenshareCallFeed = callFeed;
});
} }
return participants; return participants;