feat(API): expose recording consent to external api (#16141)

* expose recording consent to api

* Update react/features/recording/actions.web.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Andrei Gavrilescu
2025-06-17 14:44:00 +03:00
committed by GitHub
parent 196fd455cd
commit a4c20469cd
4 changed files with 75 additions and 22 deletions

View File

@@ -108,6 +108,7 @@ import {
} from '../../react/features/participants-pane/actions';
import { getParticipantsPaneOpen, isForceMuted } from '../../react/features/participants-pane/functions';
import { startLocalVideoRecording, stopLocalVideoRecording } from '../../react/features/recording/actions.any';
import { grantRecordingConsent, grantRecordingConsentAndUnmute } from '../../react/features/recording/actions.web';
import { RECORDING_METADATA_ID, RECORDING_TYPES } from '../../react/features/recording/constants';
import { getActiveSession, supportsLocalRecording } from '../../react/features/recording/functions';
import { startAudioScreenShareFlow, startScreenShareFlow } from '../../react/features/screen-share/actions';
@@ -209,6 +210,10 @@ function initCommands() {
}
APP.store.dispatch(grantModerator(participantId));
},
'grant-recording-consent': unmute => {
unmute ? APP.store.dispatch(grantRecordingConsentAndUnmute())
: APP.store.dispatch(grantRecordingConsent());
},
'display-name': displayName => {
sendAnalytics(createApiEvent('display.name.changed'));
APP.store.dispatch(updateSettings({ displayName: getNormalizedDisplayName(displayName) }));
@@ -1918,6 +1923,19 @@ class API {
});
}
/**
* Notify external application (if API is enabled) that the recording consent dialog open state has changed.
*
* @param {boolean} open - True if the dialog is open, false otherwise.
* @returns {void}
*/
notifyRecordingConsentDialogOpen(open) {
this._sendEvent({
name: 'recording-consent-dialog-open',
open
});
}
/**
* Notify external application of the current meeting requiring a password
* to join.

View File

@@ -38,6 +38,7 @@ const commands = {
endConference: 'end-conference',
email: 'email',
grantModerator: 'grant-moderator',
grantRecordingConsent: 'grant-recording-consent',
hangup: 'video-hangup',
hideNotification: 'hide-notification',
initiatePrivateChat: 'initiate-private-chat',
@@ -151,6 +152,7 @@ const events = {
'proxy-connection-event': 'proxyConnectionEvent',
'raise-hand-updated': 'raiseHandUpdated',
'ready': 'ready',
'recording-consent-dialog-open': 'recordingConsentDialogOpen',
'recording-link-available': 'recordingLinkAvailable',
'recording-status-changed': 'recordingStatusChanged',
'participant-menu-button-clicked': 'participantMenuButtonClick',