Skip to main content

Module media

Module media 

Source
Expand description

Active media player and currently playing track detection.

Provides 100% native detection without forking child processes:

  • Linux: Direct Unix domain socket connection to $DBUS_SESSION_BUS_ADDRESS / /run/user/<uid>/bus speaking the binary D-Bus wire protocol for MPRIS (org.mpris.MediaPlayer2.*).
  • Windows: Native WinRT COM FFI via combase.dll querying Windows.Media.Control.GlobalSystemMediaTransportControlsSessionManager.
  • macOS: Native Objective-C runtime FFI via macos_ffi.rs querying running media apps.

Modules§

linux_dbus

Structs§

MediaInfo
Information about the active media player and currently playing track.

Functions§

detect_media
Detects the active media player and currently playing track.
detect_media_info
Detects raw MediaInfo from the platform’s native media subsystem.