fix(participants) don't treat Jigasi like a fake participant
We only really want to know if a participant is Jigasi for displaying a specific icon, for all other intents and purposes it's a normal participant.
This commit is contained in:
parent
8127ea2479
commit
88f8f48465
|
@ -32,7 +32,7 @@ const AVATAR_CHECKED_URLS = new Map();
|
||||||
/* eslint-disable arrow-body-style, no-unused-vars */
|
/* eslint-disable arrow-body-style, no-unused-vars */
|
||||||
const AVATAR_CHECKER_FUNCTIONS = [
|
const AVATAR_CHECKER_FUNCTIONS = [
|
||||||
(participant: IParticipant) => {
|
(participant: IParticipant) => {
|
||||||
return isJigasiParticipant(participant) ? JIGASI_PARTICIPANT_ICON : null;
|
return participant?.isJigasi ? JIGASI_PARTICIPANT_ICON : null;
|
||||||
},
|
},
|
||||||
(participant: IParticipant) => {
|
(participant: IParticipant) => {
|
||||||
return isWhiteboardParticipant(participant) ? WHITEBOARD_PARTICIPANT_ICON : null;
|
return isWhiteboardParticipant(participant) ? WHITEBOARD_PARTICIPANT_ICON : null;
|
||||||
|
@ -281,16 +281,6 @@ export function getFakeParticipants(stateful: IStateful) {
|
||||||
return toState(stateful)['features/base/participants'].fakeParticipants;
|
return toState(stateful)['features/base/participants'].fakeParticipants;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns whether the fake participant is Jigasi.
|
|
||||||
*
|
|
||||||
* @param {IParticipant|undefined} participant - The participant entity.
|
|
||||||
* @returns {boolean} - True if it's a Jigasi participant.
|
|
||||||
*/
|
|
||||||
function isJigasiParticipant(participant?: IParticipant): boolean {
|
|
||||||
return participant?.fakeParticipant === FakeParticipant.Jigasi;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the fake participant is a local screenshare.
|
* Returns whether the fake participant is a local screenshare.
|
||||||
*
|
*
|
||||||
|
|
|
@ -80,7 +80,7 @@ import {
|
||||||
} from './functions';
|
} from './functions';
|
||||||
import logger from './logger';
|
import logger from './logger';
|
||||||
import { PARTICIPANT_JOINED_FILE, PARTICIPANT_LEFT_FILE } from './sounds';
|
import { PARTICIPANT_JOINED_FILE, PARTICIPANT_LEFT_FILE } from './sounds';
|
||||||
import { FakeParticipant, IJitsiParticipant } from './types';
|
import { IJitsiParticipant } from './types';
|
||||||
|
|
||||||
import './subscriber';
|
import './subscriber';
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ StateListenerRegistry.register(
|
||||||
store.dispatch(participantUpdated({
|
store.dispatch(participantUpdated({
|
||||||
conference,
|
conference,
|
||||||
id: participant.getId(),
|
id: participant.getId(),
|
||||||
fakeParticipant: value ? FakeParticipant.Jigasi : undefined
|
isJigasi: value
|
||||||
})),
|
})),
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
'features_screen-sharing': (participant: IJitsiParticipant, value: string) =>
|
'features_screen-sharing': (participant: IJitsiParticipant, value: string) =>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
export enum FakeParticipant {
|
export enum FakeParticipant {
|
||||||
Jigasi = 'Jigasi',
|
|
||||||
LocalScreenShare = 'LocalScreenShare',
|
LocalScreenShare = 'LocalScreenShare',
|
||||||
RemoteScreenShare = 'RemoteScreenShare',
|
RemoteScreenShare = 'RemoteScreenShare',
|
||||||
SharedVideo = 'SharedVideo',
|
SharedVideo = 'SharedVideo',
|
||||||
|
@ -21,6 +20,7 @@ export interface IParticipant {
|
||||||
};
|
};
|
||||||
getId?: Function;
|
getId?: Function;
|
||||||
id: string;
|
id: string;
|
||||||
|
isJigasi?: boolean;
|
||||||
isReplaced?: boolean;
|
isReplaced?: boolean;
|
||||||
isReplacing?: number;
|
isReplacing?: number;
|
||||||
jwtId?: string;
|
jwtId?: string;
|
||||||
|
|
Loading…
Reference in New Issue