From e03cd8c0ba93dc544be656d701d8af0b14af171c Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 15 Jul 2026 00:36:26 +0000 Subject: [PATCH] fix(player): count a play on real listening, not on metadata load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit playCount was bumped in onLoadedMetadata, which fires as soon as a track's metadata decodes — before playback and even if play() is rejected. So skipping through tracks counted a play for each, and the count was credited to `current`, which may already have changed after a rapid switch. Count in onTimeUpdate once playback passes a threshold (5s, or halfway through a shorter track), and credit loadedIdRef — the id the