I need to play a video during the livekit AI conve...
# ask-ai
w
I need to play a video during the livekit AI conversation. But I found that after I allowed mic, the volume of video became very small. I'm using iphone.
t
Thanks for reaching out, Zhe. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
On iPhone, when you allow microphone access during a LiveKit session, iOS automatically changes the audio session to support bidirectional communication. This system-level change can cause video playback volume to decrease, as iOS prioritizes the communication audio path and enables echo cancellation. To address this issue, consider the following solutions: • For native iOS (Swift) apps: Disable automatic audio session configuration in LiveKit by setting
AudioManager.shared.audioSession.isAutomaticConfigurationEnabled = false
. This lets you manually configure the audio session for your needs, such as prioritizing media playback. • Manually set the AVAudioSession category and mode to favor media playback if your use case is video-centric. You can use the
setAppleAudioConfiguration
method to specify the desired configuration. • For web-based LiveKit apps: The LiveKit JavaScript SDK includes a workaround that plays silent audio in the background to prevent iOS from reducing or blocking video playback volume when the mic is enabled. Adjusting the audio session configuration as described will help maintain consistent video playback volume during your LiveKit sessions on iPhone. Sources: src/room/participant/RemoteParticipant.ts | Docs/audio.md | docs/index.html