public void registerPlayerListener(CheerleaderPlayerListener listener){
  checkState();
  mCheerleaderPlayerListeners.add(listener);
  if (mState == STATE_PLAYING) {
    listener.onPlayerPlay(mPlayerPlaylist.getCurrentTrack(),mPlayerPlaylist.getCurrentTrackIndex());
  }
 else   if (mState == STATE_PAUSED) {
    listener.onPlayerPause();
  }
}

public void registerPlayerListener ( CheerleaderPlayerListener listener ) { checkState ( ) ; mCheerleaderPlayerListeners . add ( listener ) ; if ( mState == STATE_PLAYING ) { listener . onPlayerPlay ( mPlayerPlaylist . getCurrentTrack ( ) , mPlayerPlaylist . getCurrentTrackIndex ( ) ) ; } else if ( mState == STATE_PAUSED ) { listener . onPlayerPause ( ) ; } }
register a listener to catch player events .
