playSong function made to recognize the previous state of the play button to enable choose either to play the song or pause it