feat: Add name overwrite API (#11543)

This commit is contained in:
Robert Pintilii
2022-05-20 11:45:09 +01:00
committed by GitHub
parent f5004a2a0c
commit 769f0a8452
7 changed files with 207 additions and 7 deletions

View File

@@ -40,7 +40,8 @@ import {
isParticipantModerator,
isLocalParticipantModerator,
hasRaisedHand,
grantModerator
grantModerator,
overwriteParticipantsNames
} from '../../react/features/base/participants';
import { updateSettings } from '../../react/features/base/settings';
import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
@@ -428,6 +429,11 @@ function initCommands() {
logger.error('Failed sending endpoint text message', err);
}
},
'overwrite-names': participantList => {
logger.debug('Overwrite names command received');
APP.store.dispatch(overwriteParticipantsNames(participantList));
},
'toggle-e2ee': enabled => {
logger.debug('Toggle E2EE key command received');
APP.store.dispatch(toggleE2EE(enabled));
@@ -1660,6 +1666,19 @@ class API {
});
}
/**
* Notify external application that the breakout rooms changed.
*
* @param {Array} rooms - Array of breakout rooms.
* @returns {void}
*/
notifyBreakoutRoomsUpdated(rooms) {
this._sendEvent({
name: 'breakout-rooms-updated',
rooms
});
}
/**
* Disposes the allocated resources.
*