How can I use currently playing items like in menu bar item - Now Playing

Hey, I am trying to figure out how can I display currently playing sources of Audio on my Xcode Project. In the new Big Sur update I believe this was possible due to the Mac Catalyst.

How can I do this on the Mac?

New to this, can someone guide please.

Can you clarify your question, please? Are you asking about something like an audio device picker, that lets the listener chose where to play your audio, or are you asking about showing metadata (track name, artist, elapsed time, etc) for whatever audio is currently playing?

How can I use currently playing items like in menu bar item - Now Playing
 
 
Q