Skip to content

Commit

Permalink
fix: arrange screen share before the videos.
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoSchw committed Dec 13, 2024
1 parent 0925ec8 commit 93401fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/script/calling/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,13 @@ export class Call {
const selfParticipant = this.getSelfParticipant();
const remoteParticipants = this.getRemoteParticipants().sort((p1, p2) => sortUsersByPriority(p1.user, p2.user));

const [withVideo, withoutVideo] = partition(remoteParticipants, participant => participant.isSendingVideo());
const [withVideoAndScreenShare, withoutVideo] = partition(remoteParticipants, participant =>
participant.isSendingVideo(),
);
const [withScreenShare, withVideo] = partition(withVideoAndScreenShare, participant => participant.sharesScreen());

const newPages = chunk<Participant>(
[selfParticipant, ...withVideo, ...withoutVideo].filter(Boolean),
[selfParticipant, ...withScreenShare, ...withVideo, ...withoutVideo].filter(Boolean),
NUMBER_OF_PARTICIPANTS_IN_ONE_PAGE,
);

Expand Down

0 comments on commit 93401fa

Please sign in to comment.