904b9b3d-c0eb-42f3-acef-958.../Sources
徐翔宇 113dd31275 v2.0.5: adaptive polling — Apple Music 0.8s when playing
v2.0.4's 15s safety-net poll broke Apple Music latency because macOS 14+
Music.app doesn't reliably broadcast com.apple.Music.playerInfo, and
MediaRemote is 15.4-gated. With no event source actually firing, 15s
between polls = 15s track-change lag.

Poll interval is now computed from stickySource + isPlaying:
- Apple Music playing     → 0.8s (no reliable event source)
- Chrome playing          → 1.2s (no event source, web audio too)
- Spotify playing         → 3.0s (playerInfo broadcast is fast,
                                   poll is just backup)
- MediaRemote playing     → 3.0s (MR notifications cover it)
- Idle / nothing playing  → 10.0s (NSWorkspace launch observer will
                                    wake us instantly)

rearmPoll() is called after every stickySource change + after the
optimistic isPlaying flip in togglePlayPause, so the cadence adapts
within a single RunLoop tick. Cheap: if the new interval equals the
current one within 0.01s, skip the Timer re-alloc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 15:07:56 +08:00
..
sources v2.0.4: latency razor — event-driven + running-app gate + parallel probing 2026-04-20 15:02:36 +08:00
support v2.0.0: full rewrite with multi-source NowPlaying 2026-04-19 02:27:21 +08:00
ui v2.0.3: compact panel via host size hint + Apple Music artwork + faster poll 2026-04-19 20:42:14 +08:00
MioPlugin.swift feat: MioIsland music player plugin — reads system NowPlaying 2026-04-11 23:37:11 +08:00
MusicPlugin.swift v2.0.3: compact panel via host size hint + Apple Music artwork + faster poll 2026-04-19 20:42:14 +08:00
NowPlayingState.swift v2.0.5: adaptive polling — Apple Music 0.8s when playing 2026-04-20 15:07:56 +08:00