Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[bug] Intermittent audio+video freezes on Wi-Fi only

未关闭
#1,018 1 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
冷清
技术栈
android, dart, flutter

调研方向

Start by following the reproduction steps on an affected Wi-Fi network and comparing the listed WebRTC stats with mobile data, where the issue disappears. The report does not identify a file, test, or specific code path to investigate. Done means finding a reproducible cause for the Wi-Fi stalls and an actionable fix or diagnosis.

由索引模型根据 Issue 内容生成。

描述

Title

Intermittent audio+video freezes on Wi-Fi only (both publish & subscribe stall), not resolved by TURN/relay; works fine on mobile data and with another RTC SDK

Description

We’re seeing intermittent, short freezes (audio + video) for some Android publishers only on Wi-Fi. During the freeze, the participant’s outbound (publishing) and inbound (subscribing) media both stall. Dropped frames increase and the stream resumes after a short period, but freezes repeat frequently.

This does not reproduce on mobile data (4G/5G). It also does not reproduce with another RTC provider SDK (same app, same device, same network), suggesting a stack/transport behavior difference rather than a pure network outage.

We tried multiple mitigation strategies (TURN/relay, custom coturn, bitrate caps, etc.) without improvement.


Environment

  • Client SDK: livekit_client (Flutter) 2.6.4
  • Platform: Android Xiaomi 12 lite
  • Codec: H264 hardware encoder
  • Network: Wi-Fi (issue). Mobile data does not show issue.
  • Server: self-hosted LiveKit cluster (multiple nodes) behind HTTPS/WSS domain (Caddy L4 SNI routing), shared Redis.
  • TURN: tested embedded TURN and external coturn (details below)

Symptoms

  • During freeze:

    • audio + video freeze simultaneously for the affected participant
    • subscriber streams to that participant also freeze (they stop receiving other tracks temporarily)
    • dropped frames increase; later recovers
  • Repeats frequently, but each freeze is short (seconds)

  • Mobile data: stable (no freezes)

  • Other RTC SDK in same app/environment: stable (no freezes)


What we observed in stats

We added periodic stats snapshots (every 2s) including:

  • ICE selected candidate pair: RTT, availableOutgoingBitrate
  • local candidate type/protocol (srflx/relay, udp)
  • VideoSenderStats: packetsLost, jitter, roundTripTime, pliCount/nackCount, framesPerSecond, qualityLimitationReason

In freeze windows we see:

  • spikes in jitter and/or packetsLost, and retransmissions rising
  • connection quality dropping to poor
  • sometimes availableOutgoingBitrate drops sharply
  • happens with both direct srflx UDP and TURN relay UDP (depending on test)

Steps to reproduce

  1. Connect to a room and start publishing audio+video from an Android device on a Wi-Fi network known to be affected.
  2. Observe intermittent freezes where audio+video stop and the device also stops receiving other tracks temporarily.
  3. Switch the same device to mobile data → issue disappears.

Expected behavior

Stable publish/subscribe on Wi-Fi similar to mobile data; short-term Wi-Fi jitter should degrade quality gracefully, not cause frequent full stalls.

Actual behavior

Frequent short stalls/freezes (audio+video) on Wi-Fi for some devices/networks, with dropped frames increasing and stream resuming later.


Troubleshooting / mitigations tried

TURN / Relay
  • Forced relay-only:

    • iceTransportPolicy: relay
  • Tested embedded TURN and custom coturn:

    • TURN connectivity checks succeed
    • freezes persist even when using relay candidates
  • Attempted TCP relay forcing; Android WebRTC appears to still request UDP transport for TURN allocation (coturn shows 442 UDP Transport is not allowed when UDP relay disabled). So TCP media relay is not reliably achievable here.

Bitrate / resolution
  • Max bitrate is already modest (~1200–1500 kbps)
  • qualityLimitationReason is often none after ramp-up; still freezes occur
  • Attempted VP8 / simulcast experiments; did not resolve issue
Server/network checks
  • Basic reachability tests (HTTPS/WSS, TURN TLS handshake, STUN UDP reachability) are stable from a desktop environment
  • Cluster/Redis healthy; no server-side crashes during freezes

主要语言
Dart
星标
421
派生
260
平均合并
2 天 17 小时
30 天内合并 PR
14

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

livekit/client-sdk-flutter 的其他 Issue

查看 livekit/client-sdk-flutter 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。