mediasfu-reactnative
Version:
MediaSFU Prebuilt React Native SDK
22 lines • 769 B
JavaScript
/**
* Toggles the visibility of the co-host modal.
*
* @param {Function} updateIsCoHostModalVisible - Function to update the visibility state of the co-host modal.
* @param {boolean} isCoHostModalVisible - Current visibility state of the co-host modal.
*
* @example
* ```typescript
* const options: LaunchCoHostOptions = {
* updateIsCoHostModalVisible: setModalVisible,
* isCoHostModalVisible: false,
* };
*
* launchCoHost(options);
* // Toggles the co-host modal to visible.
* ```
*/
export const launchCoHost = ({ updateIsCoHostModalVisible, isCoHostModalVisible, }) => {
// Open or close the co-host modal based on its current visibility state
updateIsCoHostModalVisible(!isCoHostModalVisible);
};
//# sourceMappingURL=launchCoHost.js.map