Debugged and modified the Music player to use the 'onended' event