I am using livekit android sdk, what is the requir...
# ask-ai
w
I am using livekit android sdk, what is the requirements for using "withPreconnectAudio" when creating the room?
t
Thanks for reaching out, Кирилл. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The
withPreconnectAudio
function in the LiveKit Android SDK requires the following parameters: • `timeout`: A Duration parameter with a default value of TIMEOUT • `topic`: A String parameter with a default value of DEFAULT_TOPIC • `onError`: An optional error handler function that takes an Exception and returns Unit • `operation`: A suspend function that returns a generic type T Additionally, the function is an extension function on the
Room
class, so you need a Room instance to call it. If you are working with screen audio capture, ensure you have the Android permission
android.permission.RECORD_AUDIO
as required by the
@RequiresPermission
annotation. Sources: Room | io.livekit.android.audio
w
Do we need any changes on agent side?
t
Currently, there is no specific information available regarding changes required on the agent side to support the
withPreconnectAudio
functionality in the LiveKit Android SDK. The documentation primarily focuses on the client-side implementation. If you have a specific scenario in mind, please let me know, and I can assist further or escalate the query for additional clarification.