code: 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();
          }
      }
docs: Register a listener to catch player events.
  
  @param listener listener to register.