getTrackSetting static method
HMSTrackSetting
getTrackSetting({})
Implementation
static HMSTrackSetting getTrackSetting({
required bool isAudioMixerDisabled,
required bool joinWithMutedVideo,
required bool joinWithMutedAudio,
required bool isSoftwareDecoderDisabled,
required bool isNoiseCancellationEnabled,
required bool isAutomaticGainControlEnabled,
required bool isNoiseSuppressionEnabled,
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,
enableAutomaticGainControl: isAutomaticGainControlEnabled,
enableNoiseSupression: isNoiseSuppressionEnabled),
videoTrackSetting: HMSVideoTrackSetting(
trackInitialState: joinWithMutedVideo
? HMSTrackInitState.MUTED
: HMSTrackInitState.UNMUTED,
forceSoftwareDecoder: isSoftwareDecoderDisabled,
isVirtualBackgroundEnabled:
AppDebugConfig.isVirtualBackgroundEnabled));
}