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
67 lines • 1.88 kB
JavaScript
import { updatePanelists as sharedUpdatePanelists, addPanelist as sharedAddPanelist, removePanelist as sharedRemovePanelist, } from 'mediasfu-shared';
/**
* Updates the entire panelist list.
* Only hosts (islevel === "2") can update panelists.
*
* @param {UpdatePanelistsOptions} options - Options for updating panelists.
*
* @example
* ```typescript
* await updatePanelists({
* socket,
* panelists: [participant1, participant2],
* roomName: "room123",
* member: "currentUser",
* islevel: "2",
* showAlert: (alert) => console.log(alert.message),
* });
* ```
*/
export const updatePanelists = async (options) => {
await sharedUpdatePanelists(options);
};
/**
* Adds a participant to the panelist list.
* Respects the maximum panelist limit.
*
* @param {AddPanelistOptions} options - Options for adding a panelist.
* @returns {Promise<boolean>} True if added successfully, false otherwise.
*
* @example
* ```typescript
* const success = await addPanelist({
* socket,
* participant: { id: "123", name: "John" },
* currentPanelists: [],
* maxPanelists: 10,
* roomName: "room123",
* member: "currentUser",
* islevel: "2",
* showAlert: (alert) => console.log(alert.message),
* });
* ```
*/
export const addPanelist = async (options) => {
return sharedAddPanelist(options);
};
/**
* Removes a participant from the panelist list.
*
* @param {RemovePanelistOptions} options - Options for removing a panelist.
*
* @example
* ```typescript
* await removePanelist({
* socket,
* participant: { id: "123", name: "John" },
* roomName: "room123",
* member: "currentUser",
* islevel: "2",
* showAlert: (alert) => console.log(alert.message),
* });
* ```
*/
export const removePanelist = async (options) => {
await sharedRemovePanelist(options);
};
//# sourceMappingURL=updatePanelists.js.map