MediaSFU React Native
    Preparing search index...

    Function updateMediaSettings

    • Updates media settings by calling the respective update functions for each setting type.

      Parameters

      • options: UpdateMediaSettingsOptions

        The options for updating media settings.

        • settings: Settings
        • updateAudioSetting: (value: string) => void
        • updateVideoSetting: (value: string) => void
        • updateScreenshareSetting: (value: string) => void
        • updateChatSetting: (value: string) => void

      Returns void

      Does not return a value, as it directly updates each setting via provided functions.

      const options = {
      settings: ["enabled", "enabled", "disabled", "enabled"],
      updateAudioSetting: (value) => console.log("Audio setting:", value),
      updateVideoSetting: (value) => console.log("Video setting:", value),
      updateScreenshareSetting: (value) => console.log("Screenshare setting:", value),
      updateChatSetting: (value) => console.log("Chat setting:", value),
      };

      updateMediaSettings(options);
      // Logs:
      // "Audio setting: enabled"
      // "Video setting: enabled"
      // "Screenshare setting: disabled"
      // "Chat setting: enabled"