Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(local-recording) handle repeated values

Saúl Ibarra Corretgé96d41196e615
diff --git a/react/features/base/participants/middleware.ts b/react/features/base/participants/middleware.ts
index fd408bb418..5e312e3767 100644
--- a/react/features/base/participants/middleware.ts
+++ b/react/features/base/participants/middleware.ts
@@ -454,7 +454,7 @@ StateListenerRegistry.register(
features: { 'screen-sharing': true }
})),
'localRecording': (participant: IJitsiParticipant, value: string) =>
- _localRecordingUpdated(store, conference, participant.getId(), value),
+ _localRecordingUpdated(store, conference, participant.getId(), Boolean(value)),
'raisedHand': (participant: IJitsiParticipant, value: string) =>
_raiseHandUpdated(store, conference, participant.getId(), value),
'region': (participant: IJitsiParticipant, value: string) =>
@@ -714,8 +714,13 @@ function _participantJoinedOrUpdated(store: IStore, next: Function, action: AnyA
* @returns {void}
*/
function _localRecordingUpdated({ dispatch, getState }: IStore, conference: IJitsiConference,
- participantId: string, newValue: string) {
+ participantId: string, newValue: boolean) {
const state = getState();
+ const participant = getParticipantById(state, participantId);
+
+ if (participant?.localRecording === newValue) {
+ return;
+ }
dispatch(participantUpdated({
conference,
diff --git a/react/features/base/participants/types.ts b/react/features/base/participants/types.ts
index 1868d7c0bb..2e4a7a6dcb 100644
--- a/react/features/base/participants/types.ts
+++ b/react/features/base/participants/types.ts
@@ -31,7 +31,7 @@ export interface IParticipant {
loadableAvatarUrl?: string;
loadableAvatarUrlUseCORS?: boolean;
local?: boolean;
- localRecording?: string;
+ localRecording?: boolean;
name?: string;
pinned?: boolean;
presence?: string;