MediaSFU React Native
    Preparing search index...

    Function modifyCoHostSettings

    • Modifies the co-host settings for a given room.

      Parameters

      • options: ModifyCoHostSettingsOptions

        The options for modifying co-host settings.

        • roomName: string
        • OptionalshowAlert?: ShowAlert
        • selectedParticipant: string
        • coHost: string
        • coHostResponsibility: CoHostResponsibility[]
        • updateIsCoHostModalVisible: (isVisible: boolean) => void
        • updateCoHostResponsibility: (coHostResponsibility: CoHostResponsibility[]) => void
        • updateCoHost: (coHost: string) => void
        • socket: Socket

      Returns Promise<void>

      A promise that resolves when the co-host settings have been modified.

      const options: ModifyCoHostSettingsOptions = {
      roomName: "mainRoom",
      showAlert: (alert) => console.log(alert.message),
      selectedParticipant: "User123",
      coHost: "No coHost",
      coHostResponsibility: [{ name: "media", value: true }],
      updateIsCoHostModalVisible: setModalVisible,
      updateCoHostResponsibility: setCoHostResponsibility,
      updateCoHost: setCoHost,
      socket: socketInstance,
      };

      modifyCoHostSettings(options);
      // Sets User123 as the new co-host with specific responsibilities and emits the update event.