aws-samples / amazon-chime-react-native-demo

A React Native demo application for Android and iOS using the Amazon Chime SDK.
MIT No Attribution
100 stars 24 forks source link

i am not geeting actual audio device name using meetingSession?.audioVideo?.listAudioDevices() #194

Closed daman-preet closed 9 months ago

daman-preet commented 11 months ago

This is my function written in kotlin

@ReactMethod fun getAudioDevicesList(callback: Callback) { val listAudioDevices = meetingSession?.audioVideo?.listAudioDevices()

    val deviceList: List<MediaDevice> = listAudioDevices ?: emptyList()

    val deviceMapList = deviceList.map { device ->
        val deviceMap: WritableMap = WritableNativeMap()
        deviceMap.putString("id", device.id)
        deviceMap.putString("label", device.label)
        deviceMap.putString("type", device.type.name)
        deviceMap
    }

    val result: WritableMap = WritableNativeMap()
    val devicesArray = WritableNativeArray()
    deviceMapList.forEach { deviceMap ->
        devicesArray.pushMap(deviceMap)
    }
    result.putArray("devices", devicesArray)
    callback.invoke(result)
}

when i call function getAudioDevicesList() from React native Code then I am getting response like this:

Screenshot 2023-08-10 at 2 53 25 PM

can anybody help me out to getting actual and user readable audio device name ?

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.