getTrackSetting static method

HMSTrackSetting getTrackSetting({
  1. required bool isAudioMixerDisabled,
  2. required bool joinWithMutedVideo,
  3. required bool joinWithMutedAudio,
  4. required bool isSoftwareDecoderDisabled,
  5. required bool isNoiseCancellationEnabled,
  6. HMSAudioMode? audioMode,
})

Implementation

static HMSTrackSetting getTrackSetting({
  required bool isAudioMixerDisabled,
  required bool joinWithMutedVideo,
  required bool joinWithMutedAudio,
  required bool isSoftwareDecoderDisabled,
  required bool isNoiseCancellationEnabled,
  HMSAudioMode? audioMode,
}) {
  return HMSTrackSetting(
      audioTrackSetting: HMSAudioTrackSetting(

          ///If audio mixer is disabled we set the audio source as null
          ///Note that this is only required for iOS
          audioSource: isAudioMixerDisabled
              ? null
              : HMSAudioMixerSource(node: [
                  HMSAudioFilePlayerNode("audioFilePlayerNode"),
                  HMSMicNode(),
                  HMSScreenBroadcastAudioReceiverNode(),
                ]),
          trackInitialState: joinWithMutedAudio
              ? HMSTrackInitState.MUTED
              : HMSTrackInitState.UNMUTED,
          audioMode: audioMode,
          enableNoiseCancellation: isNoiseCancellationEnabled),
      videoTrackSetting: HMSVideoTrackSetting(
          trackInitialState: joinWithMutedVideo
              ? HMSTrackInitState.MUTED
              : HMSTrackInitState.UNMUTED,
          forceSoftwareDecoder: isSoftwareDecoderDisabled,
          isVirtualBackgroundEnabled:
              AppDebugConfig.isVirtualBackgroundEnabled));
}