Skip to content

Commit 0e9c025

Browse files
fix: adaptive detection uses real speed probe — works with DevTools throttling
Critical fix: navigator.connection API does NOT reflect DevTools network throttling. It reports the underlying physical connection, not the simulated speed. New approach: 1. Synchronous initial detection (navigator.connection + TTFB) — instant 2. Async speed probe: fetches a small resource and measures actual throughput 3. If measured speed is slower than API-reported, downgrades tier 4. Only downgrades, never upgrades — prevents premium→lite flicker Test page also updated with speed probe approach. Classification: ≥2Mbps→premium, 0.5-2→standard, 0.1-0.5→standard(motion 1), <0.1→lite Test: throttle to GPRS in DevTools → reload → should now correctly detect lite. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1030d6e commit 0e9c025

2 files changed

Lines changed: 218 additions & 154 deletions

File tree

0 commit comments

Comments
 (0)