Cleanup and implemented $cordovaMedia to play sound file if specified.