I have a Next.js web application that uses LiveKit...
# ask-ai
r
I have a Next.js web application that uses LiveKit client to offer Text to speech and speech to text. On mobile the livekit audio never starts while on browser it works. How to troubleshoot this?
t
Thanks for reaching out, Oliver. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To troubleshoot the issue of LiveKit audio not starting on mobile, please consider the following steps: • For Android: Ensure you have properly started the audio session using the following code:
Copy code
await AudioSession.configureAudio({
  android: {
    audioTypeOptions: AndroidAudioTypePresets.media,
  },
});
await AudioSession.startAudioSession();
For iOS: Verify that you have added the required permissions in your Info.plist:
Copy code
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) uses your microphone</string>

<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
• Ensure that audio is enabled in your connection options. By default, audio is set to `false`:
Copy code
audio: Boolean = false  // capture and publish audio track on connect
• If using a CommunicationWorkaround, ensure you are properly calling the
start()
method. Let me know if you need further assistance! Sources: LiveKit React Native Client SDK - v2.5.1 | Publishing tracks | LiveKit Docs | audio | CommunicationWorkaround