Skip to main content

media_key_pause_allowed

Function media_key_pause_allowed 

Source
fn media_key_pause_allowed(media_likely_playing: bool) -> bool
Expand description

Decide whether the macOS/Windows blind Play/Pause toggle may fire on break start. The toggle has no separate “pause” key, so sending it when nothing is playing would start media the user had paused (issue #104). We therefore only allow it when the platform’s “is media actually playing?” probe says yes — a real audio-output probe on both macOS (a CoreAudio tap, #233) and Windows (a WASAPI peak meter, #234). Pure so it’s unit-tested without FFI on every OS.