Function to detect if music is currently being played in arduino

Hello! Newbie here.

I am trying to conduct a test case for arduino. I want to develop a music playlist project wherein if a music is playing and the user presses the next button it will not automatically switch/select another random music track instead, it will wait until the music is finished playing. Is there a function or code in arduino to detect if a music is currently being played?

Your response is highly appreciated.

Thank you.

How are you playing the music? since there is no analog output (DAC) on the arduino, any music it plays would be sub-optimal.

yes... maybe