IUpdatablePlayer

Functions

Link copied to clipboard

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

Link copied to clipboard
abstract fun setEndTime(endTime: Long?): PlayerUpdateBuilder

Update the end time of the track.

Link copied to clipboard
abstract fun setFilters(filters: Filters): PlayerUpdateBuilder

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.

Link copied to clipboard
abstract fun setPaused(paused: Boolean): PlayerUpdateBuilder

Update the paused state of the player.

Link copied to clipboard
abstract fun setPosition(position: Long?): PlayerUpdateBuilder

Update the position of the player.

Link copied to clipboard
abstract fun setTrack(track: Track?): PlayerUpdateBuilder

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.

Link copied to clipboard
abstract fun setVoiceState(state: VoiceState): PlayerUpdateBuilder

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

Link copied to clipboard
abstract fun setVolume(volume: Int): PlayerUpdateBuilder

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.

Link copied to clipboard

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

Link copied to clipboard
abstract fun updateTrack(update: PlayerUpdateTrack): PlayerUpdateBuilder

Allows you to set the track via the TrackUpdateBuilder. To stop the player, you can use stopTrack or setTrack with a null track.