How to distinguish the most recent triggered media player?

In order to automate play/pause with one remote, how can I distinguish the most recent triggered media player.

Or in other words, how to get the first non idle/stopped media player in an automation template?

Alas the Universal media player doesn’t support play/pause but otherwise knows how to get the first non idle/stopped media player.