Files
Piik/scripts
AAA f423df0acf fix(media): contain connection failures and preserve stereo preferences
An individually rejected ICE candidate could abort the App's local media bridge, an SFU publication or a Browser encoding probe. Separately, a retiring native downstream edge could propagate its closed transport into the shared source and stop capture. This phase keeps those failures at their existing resource owners, fences late bridge signaling after disposal, and corrects native Opus receive preferences.

Existing candidate handling is reused across sibling paths. No route policy, retry budget, protocol version, configuration or UI is added. Browser ingress stereo normalization remains necessary for already-published Apps.

Validation: `npm run check` (74 files, 1081 tests, type-check and Web build), `npm run check:go` (including Windows native compilation), documentation and repository hygiene passed. Windows Chrome H264 and VP8 gates passed candidate fault injection, resize/fullscreen/minimize transitions, live/paused settings, source replacement and re-sharing; Auto whole-display capture also passed. A real Chrome codec-probe comparison reproduces the old false H264 rejection and verifies the correction. Regression tests reproduce the downstream retirement and receive-preference defects. Linux CI owns the Go race check because the local Windows environment lacks cgo.

Reported game/device failures remain unconfirmed without matched diagnostics. These fixes do not claim to resolve every share-start or game-entry failure. Interaction/voice/HDR work remains outside this release; its next steps are recorded in the existing TODO ledger.

## Release notes

### 中文

这是一次分享稳定性修复更新,重点避免局部连接错误影响整场分享,并修正原生音频接收协商。

- 修复单条 ICE 候选被拒绝时可能导致开播失败、SFU 发布中断,或自动编码检测误判的问题;连接会继续使用其他有效候选。
- 修复原生下游连接关闭时可能误停整场分享的竞态,并阻止已关闭的本机媒体连接继续发送过期信令。
- 修正原生接收端的 Opus 立体声偏好,首次连接和重新协商均会明确请求立体声。

保持现有版本兼容,无需修改配置。具体游戏、显卡或网络环境中的异常仍需结合诊断记录确认。

### English

This maintenance update improves sharing stability by containing local connection failures and correcting native audio receive negotiation.

- Fixed cases where a rejected ICE candidate could prevent sharing, interrupt an SFU publication, or incorrectly rule out H264 during automatic codec detection. Other valid candidates remain usable.
- Fixed a race where closing a native downstream connection could stop the entire share, and prevented disposed local media connections from sending stale signaling.
- Corrected native Opus receive preferences to request stereo on both initial connection and renegotiation.

Existing version compatibility is preserved; no configuration changes are required. Failures specific to a game, GPU or network still need matching diagnostics to establish their cause.
2026-09-24 09:14:31 +08:00
..