mediasfu-reactnative-expo
Version:
mediasfu-reactnative-expo – Expo-managed React Native WebRTC SDK for video conferencing, webinars, live streaming, broadcast, screen sharing, whiteboard, chat, recording, live subtitles, translation, and AI agent rooms on iOS, Android, and web. Prebuilt r
38 lines • 1.7 kB
JavaScript
import { compareActiveNames as sharedCompareActiveNames } from 'mediasfu-shared';
/**
* Compares the current active names with the previous active names and triggers an action if there are changes.
*
* @param {CompareActiveNamesOptions} options - The options for comparing active names.
* @param {boolean} [options.restart=false] - Whether to restart the comparison.
* @param {CompareActiveNamesParameters} options.parameters - The parameters for the comparison.
* @param {Function} options.parameters.getUpdatedAllParams - Function to get updated parameters.
* @param {string[]} options.parameters.activeNames - The current active names.
* @param {string[]} options.parameters.prevActiveNames - The previous active names.
* @param {Function} options.parameters.updatePrevActiveNames - Function to update the previous active names.
* @param {Function} options.parameters.trigger - Function to trigger an action when names change.
*
* @returns {Promise<void>} A promise that resolves when the comparison is complete.
*
* @throws Will log an error message if an error occurs during the comparison.
*
* @example
* const options = {
* restart: false,
* parameters: {
* getUpdatedAllParams: getUpdatedAllParamsFunction,
* activeNames: ['name1', 'name2'],
* prevActiveNames: ['name1'],
* updatePrevActiveNames: updatePrevActiveNamesFunction,
* trigger: triggerFunction,
* },
* };
*
* compareActiveNames(options)
* .then(() => {
* console.log('Active names compared successfully');
* });
*/
export const compareActiveNames = async (options) => {
await sharedCompareActiveNames(options);
};
//# sourceMappingURL=compareActiveNames.js.map