feat(recording) add ability to skip consent in-meeting

When turned on, the consent dialog won't be displayed for the users who
are already in the meeting, it will only be displayed to those who join
after the recording was started.
This commit is contained in:
Saúl Ibarra Corretgé
2025-04-30 13:47:18 +02:00
committed by Saúl Ibarra Corretgé
parent 4878874a68
commit 082c4c325d
4 changed files with 19 additions and 4 deletions

View File

@@ -401,6 +401,8 @@ var config = {
// // If true, mutes audio and video when a recording begins and displays a dialog
// // explaining the effect of unmuting.
// // requireConsent: true,
// // If true consent will be skipped for users who are already in the meeting.
// // skipConsentInMeeting: true,
// },
// recordingService: {

View File

@@ -546,6 +546,7 @@ export interface IConfig {
requireConsent?: boolean;
showPrejoinWarning?: boolean;
showRecordingLink?: boolean;
skipConsentInMeeting?: boolean;
suggestRecording?: boolean;
};
remoteVideoMenu?: {

View File

@@ -180,6 +180,7 @@ export interface IDynamicBrandingState {
requireRecordingConsent?: boolean;
sharedVideoAllowedURLDomains?: Array<string>;
showGiphyIntegration?: boolean;
skipRecordingConsentInMeeting?: boolean;
supportUrl?: string;
useDynamicBrandingData: boolean;
virtualBackgrounds: Array<Image>;
@@ -206,9 +207,10 @@ ReducerRegistry.register<IDynamicBrandingState>(STORE_NAME, (state = DEFAULT_STA
muiBrandedTheme,
pollCreationRequiresPermission,
premeetingBackground,
requireRecordingConsent,
sharedVideoAllowedURLDomains,
showGiphyIntegration,
requireRecordingConsent,
skipRecordingConsentInMeeting,
supportUrl,
virtualBackgrounds
} = action.value;
@@ -228,9 +230,10 @@ ReducerRegistry.register<IDynamicBrandingState>(STORE_NAME, (state = DEFAULT_STA
muiBrandedTheme,
pollCreationRequiresPermission,
premeetingBackground,
requireRecordingConsent,
sharedVideoAllowedURLDomains,
showGiphyIntegration,
requireRecordingConsent,
skipRecordingConsentInMeeting,
supportUrl,
customizationFailed: false,
customizationReady: true,

View File

@@ -439,8 +439,10 @@ export function isLiveStreamingButtonVisible({
* @returns {boolean}
*/
export function shouldRequireRecordingConsent(recorderSession: any, state: IReduxState) {
const { requireRecordingConsent } = state['features/dynamic-branding'] || {};
const { requireConsent } = state['features/base/config'].recordings || {};
const { requireRecordingConsent, skipRecordingConsentInMeeting }
= state['features/dynamic-branding'] || {};
const { conference } = state['features/base/conference'] || {};
const { requireConsent, skipConsentInMeeting } = state['features/base/config'].recordings || {};
const { iAmRecorder } = state['features/base/config'];
const { consentRequested } = state['features/recording'];
@@ -460,6 +462,13 @@ export function shouldRequireRecordingConsent(recorderSession: any, state: IRedu
return false;
}
// If we join a meeting that has an ongoing recording `conference` will be undefined since
// we get the recording state through the initial presence which happens in between the
// WILL_JOIN and JOINED events.
if (conference && (skipConsentInMeeting || skipRecordingConsentInMeeting)) {
return false;
}
const initiator = recorderSession.getInitiator();
if (!initiator || recorderSession.getStatus() === JitsiRecordingConstants.status.OFF) {