How can i get the music being played

I’d like to know if it’s possible to get the music currently played on a phone with ionic.

For example, if a music is played on spotify or deezer, how can i access to it’s title, artist and album?

Thank you in advance for your answers