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