Fix InCallView

This commit is contained in:
Robert Long 2022-01-07 11:42:36 -08:00
parent e9fc90c55b
commit 5f4ac97787

View file

@ -52,7 +52,7 @@ export function InCallView({
for (const callFeed of userMediaFeeds) { for (const callFeed of userMediaFeeds) {
participants.push({ participants.push({
id: callFeed.stream.id, id: callFeed.stream.id,
usermediaCallFeed: callFeed, callFeed,
isActiveSpeaker: isActiveSpeaker:
screenshareFeeds.length === 0 screenshareFeeds.length === 0
? callFeed.userId === activeSpeaker ? callFeed.userId === activeSpeaker
@ -61,13 +61,19 @@ export function InCallView({
} }
for (const callFeed of screenshareFeeds) { for (const callFeed of screenshareFeeds) {
const participant = participants.find( const userMediaItem = items.find(
(p) => p.usermediaCallFeed.userId === callFeed.userId (item) => item.callFeed.userId === callFeed.userId
); );
if (participant) { if (userMediaItem) {
participant.screenshareCallFeed = callFeed; userMediaItem.presenter = true;
} }
items.push({
id: callFeed.stream.id,
callFeed,
focused: true,
});
} }
return participants; return participants;