Files
WebSpeak-client-for-TeamSpeak/src/shared/voice-audio.ts
T
OddTurtleHead b6e7b1e4da feat(voice): support Cloudflare Tunnel deployments and WebRTC fallback
Route page and signaling traffic through Cloudflare Tunnel while sending
WebRTC media over direct UDP, with optional TURN REST as a fallback.
When WebRTC was already offered and then fails, stay in the current
session, automatically resume compatibility audio, and keep a Reconnect
WebRTC control. A reconnect retries WebRTC only, leaves compatibility
running until it succeeds, and stays on compatibility if it fails again.

Database schema 14 adds nullable voice override columns and is a one-way
boundary: older binaries reject this database. This change is for review,
not a production rollout.
2026-11-26 23:47:50 +08:00

9 lines
387 B
TypeScript

/** Shared binary framing for the compatibility (PCM/Opus over WebSocket) path. */
export const VOICE_FRAME_SAMPLES = 960;
export const VOICE_PCM_FRAME_BYTES = VOICE_FRAME_SAMPLES * 2;
export const VOICE_PCM_TAG = 0x01;
export const VOICE_OPUS_TAG = 0x02;
/** RFC 6716 maximum Opus packet length; the server validates the same bound. */
export const VOICE_MAX_OPUS_FRAME_BYTES = 1_275;