diff --git a/packages/hms_room_kit/example/pubspec.lock b/packages/hms_room_kit/example/pubspec.lock index c62245892..333c9949d 100644 --- a/packages/hms_room_kit/example/pubspec.lock +++ b/packages/hms_room_kit/example/pubspec.lock @@ -242,10 +242,9 @@ packages: hmssdk_flutter: dependency: transitive description: - name: hmssdk_flutter - sha256: "2da8500708d8a8ebfa3d3ffb2f1deafd0ff23828dfaff6fdd1b4367da6337cf0" - url: "https://pub.dev" - source: hosted + path: "../../hmssdk_flutter" + relative: true + source: path version: "1.10.5" http: dependency: transitive diff --git a/packages/hms_room_kit/lib/src/common/utility_functions.dart b/packages/hms_room_kit/lib/src/common/utility_functions.dart index 5fe8a4657..88f8699c0 100644 --- a/packages/hms_room_kit/lib/src/common/utility_functions.dart +++ b/packages/hms_room_kit/lib/src/common/utility_functions.dart @@ -396,6 +396,8 @@ class Utilities { required bool joinWithMutedAudio, required bool isSoftwareDecoderDisabled, required bool isNoiseCancellationEnabled, + required bool isAutomaticGainControlEnabled, + required bool isNoiseSuppressionEnabled, HMSAudioMode? audioMode, }) { return HMSTrackSetting( @@ -414,7 +416,9 @@ class Utilities { ? HMSTrackInitState.MUTED : HMSTrackInitState.UNMUTED, audioMode: audioMode, - enableNoiseCancellation: isNoiseCancellationEnabled), + enableNoiseCancellation: isNoiseCancellationEnabled, + enableAutomaticGainControl: isAutomaticGainControlEnabled, + enableNoiseSupression: isNoiseSuppressionEnabled), videoTrackSetting: HMSVideoTrackSetting( trackInitialState: joinWithMutedVideo ? HMSTrackInitState.MUTED diff --git a/packages/hms_room_kit/lib/src/hmssdk_interactor.dart b/packages/hms_room_kit/lib/src/hmssdk_interactor.dart index 785557e4b..ec1ff7d8c 100644 --- a/packages/hms_room_kit/lib/src/hmssdk_interactor.dart +++ b/packages/hms_room_kit/lib/src/hmssdk_interactor.dart @@ -50,7 +50,9 @@ class HMSSDKInteractor { joinWithMutedAudio: joinWithMutedAudio, isSoftwareDecoderDisabled: isSoftwareDecoderDisabled, audioMode: audioMode, - isNoiseCancellationEnabled: isNoiseCancellationEnabled); + isNoiseCancellationEnabled: isNoiseCancellationEnabled, + isAutomaticGainControlEnabled: true, + isNoiseSuppressionEnabled: true); hmsSDK = HMSSDK( iOSScreenshareConfig: iOSScreenshareConfig, diff --git a/packages/hms_room_kit/lib/src/preview_meeting_flow.dart b/packages/hms_room_kit/lib/src/preview_meeting_flow.dart index 9391cc15e..86ccbcc9b 100644 --- a/packages/hms_room_kit/lib/src/preview_meeting_flow.dart +++ b/packages/hms_room_kit/lib/src/preview_meeting_flow.dart @@ -42,7 +42,9 @@ class _PreviewMeetingFlowState extends State { Widget build(BuildContext context) { return HMSRoomLayout.skipPreview ? MeetingScreenController( - user: widget.prebuiltOptions?.userId ?? "", + user: widget.prebuiltOptions?.userName ?? + widget.prebuiltOptions?.userId ?? + "", localPeerNetworkQuality: null, options: widget.prebuiltOptions, tokenData: widget.tokenData, diff --git a/packages/hms_room_kit/pubspec.lock b/packages/hms_room_kit/pubspec.lock index df659cc15..5efc4fac2 100644 --- a/packages/hms_room_kit/pubspec.lock +++ b/packages/hms_room_kit/pubspec.lock @@ -219,10 +219,9 @@ packages: hmssdk_flutter: dependency: "direct main" description: - name: hmssdk_flutter - sha256: "2da8500708d8a8ebfa3d3ffb2f1deafd0ff23828dfaff6fdd1b4367da6337cf0" - url: "https://pub.dev" - source: hosted + path: "../hmssdk_flutter" + relative: true + source: path version: "1.10.5" http: dependency: transitive diff --git a/packages/hms_room_kit/pubspec.yaml b/packages/hms_room_kit/pubspec.yaml index 459cb3ea2..a8f6bdcb4 100644 --- a/packages/hms_room_kit/pubspec.yaml +++ b/packages/hms_room_kit/pubspec.yaml @@ -14,7 +14,8 @@ dependencies: flutter: sdk: flutter - hmssdk_flutter: 1.10.5 + hmssdk_flutter: + path: ../hmssdk_flutter intl: ^0.19.0 permission_handler: ^11.0.0 provider: ^6.0.5 diff --git a/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSTrackSettingsExtension.kt b/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSTrackSettingsExtension.kt index 2a742e6a0..205423990 100644 --- a/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSTrackSettingsExtension.kt +++ b/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSTrackSettingsExtension.kt @@ -58,6 +58,20 @@ class HMSTrackSettingsExtension { hmsAudioTrackSettings.enableNoiseCancellation(true) } } + + val enableAutomaticGainControl = audioHashMap["enable_automatic_gain_control"] as? Boolean + enableAutomaticGainControl?.let { + if(it){ + hmsAudioTrackSettings.enableAutomaticGainControl(true) + } + } + + val enableNoiseSupression = audioHashMap["enable_noise_supression"] as? Boolean + enableNoiseSupression?.let { + if(it){ + hmsAudioTrackSettings.enableNoiseSupression(true) + } + } } var hmsVideoTrackSettings = HMSVideoTrackSettings.Builder() diff --git a/packages/hmssdk_flutter/example/pubspec.lock b/packages/hmssdk_flutter/example/pubspec.lock index 6c8d07012..431861161 100644 --- a/packages/hmssdk_flutter/example/pubspec.lock +++ b/packages/hmssdk_flutter/example/pubspec.lock @@ -339,10 +339,9 @@ packages: hmssdk_flutter: dependency: transitive description: - name: hmssdk_flutter - sha256: "2da8500708d8a8ebfa3d3ffb2f1deafd0ff23828dfaff6fdd1b4367da6337cf0" - url: "https://pub.dev" - source: hosted + path: ".." + relative: true + source: path version: "1.10.5" http: dependency: transitive diff --git a/packages/hmssdk_flutter/lib/src/model/hms_audio_track_setting.dart b/packages/hmssdk_flutter/lib/src/model/hms_audio_track_setting.dart index baca57ed5..121ffd49d 100644 --- a/packages/hmssdk_flutter/lib/src/model/hms_audio_track_setting.dart +++ b/packages/hmssdk_flutter/lib/src/model/hms_audio_track_setting.dart @@ -40,6 +40,10 @@ class HMSAudioTrackSetting { ///Refer: Read more about noise cancellation [here](///) final bool enableNoiseCancellation; + final bool enableAutomaticGainControl; + + final bool enableNoiseSupression; + HMSAudioTrackSetting( {this.useHardwareAcousticEchoCanceler, this.audioSource, @@ -47,7 +51,9 @@ class HMSAudioTrackSetting { this.audioMode, this.phoneCallState = HMSAndroidPhoneCallState.DISABLE_MUTE_ON_VOIP_PHONE_CALL_RING, - this.enableNoiseCancellation = false}); + this.enableNoiseCancellation = false, + this.enableAutomaticGainControl = false, + this.enableNoiseSupression = false}); factory HMSAudioTrackSetting.fromMap(Map map) { List nodeList = []; @@ -109,7 +115,9 @@ class HMSAudioTrackSetting { 'phone_call_state': HMSAndroidPhoneCallStateValue.getValuefromHMSPhoneCallState( phoneCallState), - 'enable_noise_cancellation': enableNoiseCancellation + 'enable_noise_cancellation': enableNoiseCancellation, + 'enable_automatic_gain_control': enableAutomaticGainControl, + 'enable_noise_supression': enableNoiseSupression }; } }