"TimeFocused" property
Adapted from https://lists.freedesktop.org/archives/mpris/2013q4/000064.html
gnome-settings-daemon, which handles media-keys in GNOME, got support (in GNOME 3.10) for MPRIS in addition to its own media-keys API.
This is the documentation for the gnome-settings-daemon API: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/blob/master/plugins/media-keys/README.media-keys-API and the API itself: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/blob/master/plugins/media-keys/gsd-media-keys-manager.c#L94
as you can see, we could replace all of that with MPRIS, apart from one thing, the "time" argument passed to GrabMediaPlayerKeys().
This is used for gnome-settings-daemon to know which one was the last focused (or last used) media player so that keyboard keys are forwarded to that player even if the player isn't focused.
I could track the last media player to appear on the bus, or the last one we sent events to, but that would mean that unfocusable players (the "daemon" kind) would get the benefit of that, and changing playback using the gnome-shell "Now Playing" feature wouldn't update that "last focused" variable.