desktop-system-media-integration
Installation
SKILL.md
System media integration on three desktop OSes
Each desktop OS exposes a now-playing panel and hardware/media-key transport: macOS through its media-player framework's info centre and command centre, Windows through its system transport controls, Linux through the session-bus media interface. Put all three behind one facade in the player handler and let each platform choose its backend.
// adapted — Linux and Windows share one cross-platform backend, macOS has its own
private val systemControls =
if (platform is Platform.Linux || platform is Platform.Windows) {
runCatching { CrossPlatformNowPlaying(platform) }.getOrNull()
} else {
null
}