Interface IUpdatablePlayer

    • Constructor Detail

    • Method Detail

      • setTrack

         abstract PlayerUpdateBuilder setTrack(Track track)

        Shortcut for setting the encoded track. This will also send any user-data supplied. Please keep in mind that this will set the position field to the current position of the track.

        Parameters:
        track - The track to apply to this builder
        Returns:

        The updated builder, useful for chaining

      • stopTrack

         abstract PlayerUpdateBuilder stopTrack()

        Shortcut for setting the encoded track to {@code null}. This will also clear the user data.

        Returns:

        The updated builder, useful for chaining

      • setPosition

         abstract PlayerUpdateBuilder setPosition(Long position)

        Update the position of the player.

        Parameters:
        position - The new position of the player.
        Returns:

        The updated builder, useful for chaining

      • setEndTime

         abstract PlayerUpdateBuilder setEndTime(Long endTime)

        Update the end time of the track.

        Parameters:
        endTime - The new end time of the track.
        Returns:

        The updated builder, useful for chaining

      • omitEndTime

         abstract PlayerUpdateBuilder omitEndTime()

        Omits the end time from being sent to the node during updates.

        Returns:

        The updated builder, useful for chaining

      • setVolume

         abstract PlayerUpdateBuilder setVolume(Integer volume)

        Update the volume of the player. While you could use the filters to set volume as well, do note that that is float based (1.0f is 100% volume) and takes the time of your buffer size to apply. This method updates the volume instantly after the update is sent out.

        Parameters:
        volume - The new player volume, value is between 0 and 1000 where 100 is 100% (default) volume.
        Returns:

        The updated builder, useful for chaining

      • setPaused

         abstract PlayerUpdateBuilder setPaused(Boolean paused)

        Update the paused state of the player.

        Parameters:
        paused - Whether the player should be paused or not.
        Returns:

        The updated builder, useful for chaining

      • setFilters

         abstract PlayerUpdateBuilder setFilters(Filters filters)

        Update the filters for the player. Please use setVolume to update the player's volume instead. Setting the volume via filters is float based (1.0f is 100% volume) and takes the time of your buffer size to apply.

        Parameters:
        filters - The new filters to apply to the player.
        Returns:

        The updated builder, useful for chaining

      • setVoiceState

         abstract PlayerUpdateBuilder setVoiceState(VoiceState state)

        Update the voice state for the player.<br> <strong>IMPORTANT:</strong> Only ever use Link.onVoiceServerUpdate to update the voice server as this sets the state of the link to LinkState.CONNECTING

        Returns:

        The updated builder, useful for chaining