p256 PR draft ready for ReSpeak/tsclientlib submission. Performance benchmarks document with tsclientlib baselines and Chanora current metrics. Web client assessed as infeasible without UDP proxy infrastructure.
2.4 KiB
Web Client Feasibility Assessment
Date: 2026-06-11 Purpose: Brief assessment of web client feasibility for Chanora (TODO-073)
Precedent: TeaSpeak Web Client
TeaSpeak built a web client (TypeScript, MPL-2.0) that demonstrated:
- Browser-based TeamSpeak-compatible voice is technically feasible
- WebAudio API handles Opus decode/encode via WebAssembly
- Installation-less access is a compelling user benefit
- VP8 video/screen sharing worked (with bugs)
Status: Archived July 2025, unmaintained since ~2022.
Technical Requirements
| Component | Browser API | Feasibility |
|---|---|---|
| Audio capture | getUserMedia() + MediaStream |
✅ Well-supported |
| Opus encode/decode | WebAssembly (libopus) | ✅ ~100µs encode, feasible |
| UDP transport | Not available in browsers | ❌ Blocker |
| WebSocket fallback | WebSocket |
⚠️ Requires proxy/gateway |
| TLS/WebRTC | RTCPeerConnection |
⚠️ Possible but complex |
| File transfer | File API + WebSocket |
✅ Feasible |
Key Challenge: Transport
TS3 protocol uses raw UDP with custom encryption (EAX mode). Browsers cannot send raw UDP packets.
Options
-
WebSocket proxy — Server-side gateway translates WebSocket↔UDP
- Requires infrastructure (not self-hosted friendly)
- Adds latency (~10-50ms per hop)
- Breaks end-to-end encryption
-
WebRTC data channel — Browser-to-browser UDP-like channel
- Requires signaling server
- NAT traversal complexity
- Not compatible with TS3 server protocol
-
WASM + raw sockets — Not possible (browser sandbox)
Verdict
Not feasible in current scope. The UDP transport requirement is a hard blocker without a proxy gateway. Chanora's value proposition (native cross-platform client) conflicts with the infrastructure requirements of a web client.
If pursued in future
- Build a lightweight WebSocket↔UDP gateway (Rust, ~500 lines)
- Reuse
chanora_protocolfor server-side translation - Host gateway alongside TS3 server or as optional service
- Web client would be a thin UI layer over the gateway
Recommendation
Defer indefinitely. Focus on native client quality. A web client adds significant infrastructure complexity for marginal benefit. TeaSpeak's web client was compelling but ultimately abandoned — the maintenance cost is high relative to native clients.