Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Audio routes through call speaker instead of media speaker when joining as a viewer-only participant

Abierto
#1,063 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
flutter

Línea de trabajo

Start by reading the audio-routing setup around RoomOptions and Hardware.instance, then trace how the SDK handles audio sessions on Android and iOS when a viewer joins without publishing tracks. The issue does not name files or tests, so first locate those entry points and relevant platform tests. Done means receive-only participants use media playback routing without breaking audio for participants who publish tracks.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Is your feature request related to a problem? Please describe.
When joining a livestream session as a pure viewer (no microphone, no camera), the audio is incorrectly routed through the device's call/earpiece speaker instead of the media/loudspeaker — the same routing used for phone calls.

This occurs even though the viewer is not publishing any audio or video track. The expected behavior is that a participant in a receive-only role should use media playback audio routing, consistent with how any video player or media app behaves. Instead, LiveKit appears to initialize WebRTC in MODE_IN_COMMUNICATION (Android) / AVAudioSessionCategory.playAndRecord (iOS) regardless of whether the local participant is actually publishing.

Describe the solution you'd like
When a participant joins with no published tracks (viewer-only / subscriber-only role), LiveKit should automatically apply media playback audio routing:

• Android: Use AudioManager.MODE_NORMAL with loudspeaker, not MODE_IN_COMMUNICATION
• iOS: Use AVAudioSessionCategory.playback instead of playAndRecord

Ideally, expose a participant role hint (e.g. ParticipantKind.viewer or a audioMode option in RoomOptions) so developers can explicitly declare the intended audio routing behavior at connection time, before WebRTC initializes the audio session.

Describe alternatives you've considered
• Calling Hardware.instance.setSpeakerphoneOn(true) before room.connect() — overridden internally when WebRTC initializes the audio session on first track subscription.

• Manually reconfiguring AudioSession after the first remote audio track is subscribed — partially works but requires a delay and is fragile, as LiveKit re-acquires the audio session asynchronously.

• Using AudioOutputOptions(speakerOn: true) in RoomOptions — does not change the underlying audio mode from communication to media playback.

Additional context
• SDK: livekit_client (Flutter)
• Platforms affected: Android & iOS
• Use case: Livestreaming with a single host and many viewer-only participants
• Root cause: WebRTC initializes the audio stack in voice communication mode unconditionally, even for receive-only participants. This is by design in WebRTC but should be overridden by LiveKit when no local tracks are published.

Lenguaje dominante
Dart
Estrellas
421
Forks
260
Merge medio
2 d 5 h
PR fusionados (30 d)
17

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de livekit/client-sdk-flutter

Todos los issues de livekit/client-sdk-flutter

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.