Class PlaybackState


  • public class PlaybackState
    extends Object
    Captures the playback state of a single player that has the track loaded, as an immutable value class.
    • Field Detail

      • player

        public final int player
        The player number whose playback state this represents.
      • position

        public final long position
        The current playback position of the player in milliseconds.
      • playing

        public final boolean playing
        Whether the player is actively playing the track.
    • Constructor Detail

      • PlaybackState

        public PlaybackState​(int player,
                             long position,
                             boolean playing)
        Create an instance to represent a particular playback state.
        Parameters:
        player - the player number whose playback state this represents
        position - the current playback position in milliseconds
        playing - whether the player is actively playing the track