Audio routes through call speaker instead of media speaker when joining as a viewer-only participant
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- flutter
- Lĩnh vực
- audio-video-rtc, mobile
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Dart
- Star
- 421
- Fork
- 260
- Merge trung bình
- 2 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của livekit/client-sdk-flutter
-
`jwtPayload.video` returns null grants for tokens from LiveKit server SDKsCó thể đã có người làm @RaphaelFakhri đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
livekit/client-sdk-flutter#1236 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
livekit/client-sdk-flutter#1227 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Inbound data packets never delivered while media flows normally (2.13.0, LiveKit Cloud 1.13.7)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
livekit/client-sdk-flutter#1221 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
livekit/client-sdk-flutter#1219 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
iOS: `audioDeviceModule` becomes permanently `nil`/unavailable after backgrounding, even though `AVAudioSession` is never interruptedCó thể đã có người làm @hiroshihorie đã nhận 28 ngày trước. Đang mở
livekit/client-sdk-flutter#1206 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của livekit/client-sdk-flutter
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
djazairdev/wilayas#22 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
rajput-hemant/calculator#199 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
leancodepl/app-rating#35 ·
-
Mobile login: "Sign In" button is squashed to 16 px with its label cut while the keyboard is openĐang mởai-driven-qa bug claude
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
linagora/tmail-flutter#4976 ·
Maintainer thường phản hồi trong vòng 1 ngày