A tiny cross-platform library for extracting information about the music/image/video that is Now Playing on the system.
Supported OS:
- Windows (using GlobalSystemMediaTransportControlsSessionManager)
- Linux (using DBus/MPRIS)
cmake .
cmake --build .
See include/np.h
and np/main.c
for an example.
The general idea is:
np_init();
struct np_info *info = np_info_get();
if (info) {
// do something with info->track, ...
np_info_destroy(info);
}
np_destroy();
MIT