MediaSFU React Native
    Preparing search index...

    Function userWaiting

    • Handles the event when a user joins the waiting room, displaying a notification and updating the count of waiting requests.

      Parameters

      • options: UserWaitingOptions

        The options for managing the user waiting event.

        • name: string
        • OptionalshowAlert?: ShowAlert
        • totalReqWait: number
        • updateTotalReqWait: (total: number) => void

      Returns Promise<void>

      A promise that resolves when the waiting event is fully handled.

      const options = {
      name: "John Doe",
      showAlert: (alert) => console.log(alert.message),
      totalReqWait: 3,
      updateTotalReqWait: (total) => console.log("Updated total:", total),
      };

      userWaiting(options)
      .then(() => console.log("User waiting handled"))
      .catch((error) => console.error("Error:", error));