feat(follow-me): Adds option to limit it for recorder only. (#15120)

* feat(follow-me): Adds option to limit it for recorder only.

* squash: Fix comments.

* squash: Fix comments.
This commit is contained in:
Дамян Минков
2024-09-16 10:01:09 -05:00
committed by GitHub
parent 936fa55ce9
commit 085e6dd3b9
14 changed files with 136 additions and 11 deletions

View File

@@ -56,7 +56,7 @@ export const CONFERENCE_LEFT = 'CONFERENCE_LEFT';
/**
* The type of (redux) action which signals that the conference is out of focus.
* For example, if the user navigates to the Chat screen.
*
*
* {
* type: CONFERENCE_BLURRED,
* }
@@ -65,7 +65,7 @@ export const CONFERENCE_BLURRED = 'CONFERENCE_BLURRED';
/**
* The type of (redux) action which signals that the conference is in focus.
*
*
* {
* type: CONFERENCE_FOCUSED,
* }
@@ -258,6 +258,17 @@ export const SEND_TONES = 'SEND_TONES';
*/
export const SET_FOLLOW_ME = 'SET_FOLLOW_ME';
/**
* The type of (redux) action which updates the current known status of the
* Follow Me feature that is used only by the recorder.
*
* {
* type: SET_FOLLOW_ME_RECORDER,
* enabled: boolean
* }
*/
export const SET_FOLLOW_ME_RECORDER = 'SET_FOLLOW_ME_RECORDER';
/**
* The type of (redux) action which sets the obfuscated room name.
*
@@ -338,7 +349,7 @@ export const SET_START_MUTED_POLICY = 'SET_START_MUTED_POLICY';
/**
* The type of (redux) action which updates the assumed bandwidth bps.
*
*
* {
* type: SET_ASSUMED_BANDWIDTH_BPS,
* assumedBandwidthBps: number

View File

@@ -61,6 +61,7 @@ import {
SEND_TONES,
SET_ASSUMED_BANDWIDTH_BPS,
SET_FOLLOW_ME,
SET_FOLLOW_ME_RECORDER,
SET_OBFUSCATED_ROOM,
SET_PASSWORD,
SET_PASSWORD_FAILED,
@@ -847,6 +848,22 @@ export function setFollowMe(enabled: boolean) {
};
}
/**
* Enables or disables the Follow Me feature used only for the recorder.
*
* @param {boolean} enabled - Whether Follow Me should be enabled and used only by the recorder.
* @returns {{
* type: SET_FOLLOW_ME_RECORDER,
* enabled: boolean
* }}
*/
export function setFollowMeRecorder(enabled: boolean) {
return {
type: SET_FOLLOW_ME_RECORDER,
enabled
};
}
/**
* Enables or disables the Mute reaction sounds feature.
*

View File

@@ -26,6 +26,7 @@ import {
P2P_STATUS_CHANGED,
SET_ASSUMED_BANDWIDTH_BPS,
SET_FOLLOW_ME,
SET_FOLLOW_ME_RECORDER,
SET_OBFUSCATED_ROOM,
SET_PASSWORD,
SET_PENDING_SUBJECT_CHANGE,
@@ -160,6 +161,7 @@ export interface IConferenceState {
e2eeSupported?: boolean;
error?: Error;
followMeEnabled?: boolean;
followMeRecorderEnabled?: boolean;
joining?: IJitsiConference;
leaving?: IJitsiConference;
lobbyWaitingForHost?: boolean;
@@ -252,6 +254,12 @@ ReducerRegistry.register<IConferenceState>('features/base/conference',
case SET_FOLLOW_ME:
return set(state, 'followMeEnabled', action.enabled);
case SET_FOLLOW_ME_RECORDER:
return { ...state,
followMeRecorderEnabled: action.enabled,
followMeEnabled: action.enabled
};
case SET_START_REACTIONS_MUTED:
return set(state, 'startReactionsMuted', action.muted);