Interface JukeBoxObserver


public interface JukeBoxObserver
An observer to listen for JukeBox state changes. Events are emitted in JukeBox.update().
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is called when the JukeBox stops playing, either by running out of songs/playlists or by being stopped manually.
    void
    This method is called when the JukeBox is set to pause.
    void
    This method is called when the JukeBox begins playback.
    void
    This method is called when a PlayList finished playing.
    void
    This method is called when a new PlayList is used to play songs.
    void
    This method is called when a song finished playing.
    void
    This method is called when a new song is played.
  • Method Details

    • onSongStart

      void onSongStart(Song song)
      This method is called when a new song is played.
      Parameters:
      song - the song
    • onSongEnd

      void onSongEnd(Song song)
      This method is called when a song finished playing. It will not be called if the JukeBox has been stopped manually.
      Parameters:
      song - the song
    • onPlayListStart

      void onPlayListStart(PlayList playList)
      This method is called when a new PlayList is used to play songs.
      Parameters:
      playList - the playlist
    • onPlayListEnd

      void onPlayListEnd(PlayList playList)
      This method is called when a PlayList finished playing. It will not be called if the JukeBox has been stopped manually.
      Parameters:
      playList - the playlist
    • onJukeBoxStart

      void onJukeBoxStart()
      This method is called when the JukeBox begins playback.
    • onJukeBoxPause

      void onJukeBoxPause()
      This method is called when the JukeBox is set to pause.
    • onJukeBoxEnd

      void onJukeBoxEnd()
      This method is called when the JukeBox stops playing, either by running out of songs/playlists or by being stopped manually.