UNPKG

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

46 lines 1.64 kB
import { trigger as sharedTrigger } from 'mediasfu-shared'; /** * Triggers an update to the screen client based on the provided parameters. * * @param {TriggerOptions} options - The options for triggering the update. * @param {string[]} options.ref_ActiveNames - Reference to the active names. * @param {TriggerParameters} options.parameters - The parameters for the trigger. * * @returns {Promise<void>} A promise that resolves when the trigger is complete. * * @throws Will throw an error if the updateScreenClient operation fails. * * @remarks * This function handles various conditions to determine the main screen person, * adjusts the screen states, and emits an update to the screen client via socket. * * @example * ```typescript * await trigger({ * ref_ActiveNames: ['user1', 'user2'], * parameters: { * socket: socketInstance, * localSocket: localSocketInstance, * roomName: 'room1', * screenStates: [{ mainScreenPerson: 'user1', mainScreenFilled: true, adminOnMainScreen: false }], * participants: [{ name: 'admin', islevel: '2' }], * updateDateState: 0, * lastUpdate: null, * nForReadjust: 0, * eventType: 'conference', * shared: false, * shareScreenStarted: false, * whiteboardStarted: false, * whiteboardEnded: false, * updateUpdateDateState: (date) => {}, * updateLastUpdate: (date) => {}, * updateNForReadjust: (n) => {}, * autoAdjust: async ({ n, parameters }) => [n, 0], * }, * }); * ``` */ export const trigger = async (options) => { await sharedTrigger(options); }; //# sourceMappingURL=trigger.js.map