IUpdatablePlayer

Functions

Link copied to clipboard
Link copied to clipboard

Omits the encoded track field from being sent to the node during updates.

Link copied to clipboard

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

Link copied to clipboard
abstract fun setEncodedTrack(encodedTrack: String?): PlayerUpdateBuilder

Sets the encoded track to be played. This will override the identifier and track user data if they were previously set.

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 setIdentifier(identifier: String?): PlayerUpdateBuilder

Set the identifier on the player. This will override the encoded track and user data if they were previously set.

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.

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.