diff --git a/packages/hms_room_kit/lib/src/meeting/meeting_header.dart b/packages/hms_room_kit/lib/src/meeting/meeting_header.dart index e251bcf62..49b4fc786 100644 --- a/packages/hms_room_kit/lib/src/meeting/meeting_header.dart +++ b/packages/hms_room_kit/lib/src/meeting/meeting_header.dart @@ -292,7 +292,7 @@ class _MeetingHeaderState extends State { ///else we render an empty SizedBox Selector>( selector: (_, meetingStore) => Tuple2( - meetingStore.currentAudioDeviceMode, + meetingStore.currentAudioOutputDevice, meetingStore.isSpeakerOn), builder: (_, data, __) { return HMSEmbeddedButton( diff --git a/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HmssdkFlutterPlugin.kt b/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HmssdkFlutterPlugin.kt index 6fabd902e..6b4bcb136 100644 --- a/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HmssdkFlutterPlugin.kt +++ b/packages/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HmssdkFlutterPlugin.kt @@ -2006,10 +2006,8 @@ class HmssdkFlutterPlugin : val dict = HashMap() dict["current_audio_device"] = selectedAudioDevice.name val audioDevicesList = ArrayList() - hmssdk?.getAudioDevicesList()?.let { audioDevices -> - audioDevices.forEach { device -> - audioDevicesList.add(device.name) - } + availableAudioDevices.forEach { device -> + audioDevicesList.add(device.name) } dict["available_audio_device"] = audioDevicesList args["data"] = dict @@ -2045,12 +2043,10 @@ class HmssdkFlutterPlugin : val dict = HashMap() dict["current_audio_device"] = selectedAudioDevice.name val audioDevicesList = ArrayList() - hmssdk?.getAudioDevicesList()?.let { audioDevices -> - audioDevices.forEach { device -> - audioDevicesList.add(device.name) - } + availableAudioDevices.forEach { device -> + audioDevicesList.add(device.name) + } dict["available_audio_device"] = audioDevicesList - } args["data"] = dict if (args["data"] != null) { CoroutineScope(Dispatchers.Main).launch {