jitsi / jitsi-meet-sdk-samples

Jitsi Meet mobile SDK examples (Android, iOS and React Native)
Apache License 2.0
284 stars 240 forks source link

Unable to switch to the audio device on android 13 #172

Closed RakeshPatil111 closed 1 year ago

RakeshPatil111 commented 1 year ago

I am using jitsi android 7.0.1 version. I am unable to change the audio output device. Getting error JitsiMeetSDK [features/app] Error(TypeError){"message":"(0,r(d[19]).setAudioDeviceLocal) is not a function. (In '(0,r(d[19]).setAudioDeviceLocal)(n)', '(0,r(d[19]).setAudioDeviceLocal)' is undefined)","stack":"index.android.bundle:1993:2063\nvalue@index.android.bundle:29:1293\nvalue@index.android.bundle:45:3557\nindex.android.bundle:45:674\nvalue@index.android.bundle:45:2504\nvalue@index.android.bundle:45:646\nvalue@[native code]"} JitsiMeetSDK [features/app] Error(TypeError){"message":"(0,r(d[19]).setAudioDeviceLocal) is not a function. (In '(0,r(d[19]).setAudioDeviceLocal)(n)', '(0,r(d[19]).setAudioDeviceLocal)' is undefined)","stack":"index.android.bundle:1993:2063\nvalue@index.android.bundle:29:1293\nvalue@index.android.bundle:45:3557\nindex.android.bundle:45:674\nvalue@index.android.bundle:45:2504\nvalue@index.android.bundle:45:646\nvalue@[native code]"}

I am using following code to send intent

private fun sendAudioDeviceIntent(device: String) { val audioDeviceBroadcastIntent: Intent = BroadcastIntentHelper.buildSetAudioDeviceIntent(device) LocalBroadcastManager.getInstance(OwlSpotApplication.context).sendBroadcast(audioDeviceBroadcastIntent) }

Using constants for devices const val DEVICE_BLUETOOTH: String = "BLUETOOTH" const val DEVICE_WIRED_HEADSET: String = "HEADPHONES" const val DEVICE_SPEAKER: String = "SPEAKER" const val DEVICE_EARPIECE: String = "EARPIECE"