Audio routes through call speaker instead of media speaker when joining as a viewer-only participant
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- flutter
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Dart
- スター
- 421
- フォーク
- 260
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 17
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
livekit/client-sdk-flutter のほかの issue
-
`jwtPayload.video` returns null grants for tokens from LiveKit server SDKs対応中かも @RaphaelFakhri が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
livekit/client-sdk-flutter#1236 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
livekit/client-sdk-flutter#1227 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
livekit/client-sdk-flutter#1221 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
livekit/client-sdk-flutter#1219 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
iOS: `audioDeviceModule` becomes permanently `nil`/unavailable after backgrounding, even though `AVAudioSession` is never interrupted対応中かも @hiroshihorie が 27 日前に担当しました。 オープン
livekit/client-sdk-flutter#1206 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
livekit/client-sdk-flutter の issue をすべて見る
似ている issue
-
discover
難易度 2/5 1〜3時間 初心者へのやさしさ 91/100
DevDogsUGA/DogPack#14 ·
-
direct-code
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aaronified/fluenough#500 ·
メンテナーはふだん 1 日以内に返信
-
bug: native AES-CBC byte operations read mutated input after invocation対応中かも @harrshita123 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
google/webcrypto.dart#436 · コメント 1 件 ·
メンテナーはふだん 7 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
openfoodfacts/smooth-app#7831 ·
メンテナーはふだん 1 日以内に返信