WhyNotHugo / caffeine-ng

⚠ This project has migrated to codeberg.org
https://codeberg.org/WhyNotHugo/caffeine-ng
GNU General Public License v3.0
180 stars 21 forks source link

Using MPRIS for playback detection #113

Closed WhyNotHugo closed 2 years ago

WhyNotHugo commented 2 years ago

MPRIS is a D-Bus API by which multimedia applications can register themselves to handle when a user presses the "play/pause" buttons on keyboards/speakers/headphones.

In general, anything that's a media player registers via this API -- including music players and browsers.

Using the MPRIS API to determine "is there currently any media playing" sounds like a very solid solution -- definitely less guessing and false positive than using pulseaudio and peak detection.

WhyNotHugo commented 2 years ago

This project has moved to codeberg.

Follow-up for this issue is at https://codeberg.org/WhyNotHugo/caffeine-ng/issues/113