Don't consider microphone mute state in importance ordering (#2515)

We're finding that if we reorder participants based on whether their mic is muted, this just creates a lot of distracting layout shifts. People who speak are automatically promoted into the speaker category, so there's little value in additionally caring about mute state.
This commit is contained in:
Robin
2024-07-26 05:27:22 -04:00
committed by GitHub
parent 6b64bdfdb5
commit d062871f41

View File

@@ -150,21 +150,13 @@ enum SortingBin {
*/ */
Speakers, Speakers,
/** /**
* Participants with both video and audio. * Participants with video.
*/
VideoAndAudio,
/**
* Participants with video but no audio.
*/ */
Video, Video,
/** /**
* Participants with audio but no video. * Participants not sharing any video.
*/ */
Audio, NoVideo,
/**
* Participants not sharing any media.
*/
NoMedia,
/** /**
* Yourself, when the "always show self" option is off. * Yourself, when the "always show self" option is off.
*/ */
@@ -457,13 +449,12 @@ export class CallViewModel extends ViewModel {
[ [
m.speaker, m.speaker,
m.presenter, m.presenter,
m.vm.audioEnabled,
m.vm.videoEnabled, m.vm.videoEnabled,
m.vm instanceof LocalUserMediaViewModel m.vm instanceof LocalUserMediaViewModel
? m.vm.alwaysShow ? m.vm.alwaysShow
: of(false), : of(false),
], ],
(speaker, presenter, audio, video, alwaysShow) => { (speaker, presenter, video, alwaysShow) => {
let bin: SortingBin; let bin: SortingBin;
if (m.vm.local) if (m.vm.local)
bin = alwaysShow bin = alwaysShow
@@ -471,9 +462,8 @@ export class CallViewModel extends ViewModel {
: SortingBin.SelfNotAlwaysShown; : SortingBin.SelfNotAlwaysShown;
else if (presenter) bin = SortingBin.Presenters; else if (presenter) bin = SortingBin.Presenters;
else if (speaker) bin = SortingBin.Speakers; else if (speaker) bin = SortingBin.Speakers;
else if (video) else if (video) bin = SortingBin.Video;
bin = audio ? SortingBin.VideoAndAudio : SortingBin.Video; else bin = SortingBin.NoVideo;
else bin = audio ? SortingBin.Audio : SortingBin.NoMedia;
return [m, bin] as const; return [m, bin] as const;
}, },