inspired by https://gitlab.gnome.org/GNOME/gnome-shell/blob/0ba346b7504d1d53cb6e107c51e3831fa7983875/js/ui/mpris.js