ServerBroadcastSource

Represents a broadcast audio source.

This source broadcasts audio and source packets to the specific group of players.

Properties

Link copied to clipboard

Gets or sets whether the source position should be camera relative.

Link copied to clipboard
abstract var lookAngle: Pos3d?

Gets or sets the look angle of the source.

Link copied to clipboard

Gets or sets the collection of players.

Link copied to clipboard
abstract var relativePosition: Pos3d?

Gets or sets the relative position of the source.

Link copied to clipboard
abstract var sender: VoicePlayer?

Gets or sets the direct source sender.

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun <P : VoicePlayer> addFilter(@NotNull filter: @NotNull Predicate<in P>)

Adds a new player filter to the source.

Link copied to clipboard
abstract fun clearFilters()

Clears all filters from the source.

Link copied to clipboard
abstract fun createAudioSender(frameProvider: AudioFrameProvider): AudioSender

Creates a new audio sender for this source.

Link copied to clipboard
@NotNull
abstract fun getAddon(): @NotNull AddonContainer

Gets the addon associated with this audio source.

Link copied to clipboard
@NotNull
abstract fun getFilters(): @NotNull MutableCollection<Predicate<in VoicePlayer>>

Gets the collection of player filters associated with this source.

Link copied to clipboard
@NotNull
abstract fun getId(): @NotNull UUID

Gets the unique identifier of this audio source.

Link copied to clipboard
@NotNull
abstract fun getLine(): @NotNull BaseServerSourceLine

Gets the server source line to which this audio source belongs.

Link copied to clipboard
abstract fun getState(): Int

Gets the state of this audio source.

Link copied to clipboard
abstract fun isIconVisible(): Boolean

Checks if the icon for this audio source is visible in the world.

Link copied to clipboard
abstract fun <P : VoicePlayer> matchFilters(@NotNull player: @NotNull P): Boolean

Checks if a player matches all filters associated with this source. Returns false if the player has disabled the voice chat. See isVoiceDisabled.

Link copied to clipboard
open fun <P : VoicePlayer> notMatchFilters(@NotNull player: @NotNull P): Boolean

Checks if a player does not match any of the filters associated with this source.

Link copied to clipboard
open fun remove()

Removes the source from its associated source line.

Link copied to clipboard
abstract fun <P : VoicePlayer> removeFilter(@NotNull filter: @NotNull Predicate<in P>)

Removes a player filter from the source.

Link copied to clipboard
open fun sendAudioEnd(sequenceNumber: Long): Boolean

Sends an audio end packet.

Link copied to clipboard
open fun sendAudioFrame(frame: ByteArray, sequenceNumber: Long): Boolean

Sends an encoded and encrypted audio frame to players with null activation info.

open fun sendAudioFrame(frame: ByteArray, sequenceNumber: Long, activationInfo: PlayerActivationInfo?): Boolean

Sends an encoded and encrypted audio frame to players with an activation info.

Link copied to clipboard

Sends an audio packet to players with null activation info.

abstract fun sendAudioPacket(packet: SourceAudioPacket, activationInfo: PlayerActivationInfo?): Boolean

Sends an audio packet to players with activation info.

Link copied to clipboard
abstract fun sendPacket(packet: Packet<*>): Boolean

Sends a TCP packet to players.

Link copied to clipboard
abstract fun setDirty()

Marks the source as "dirty".

Link copied to clipboard
abstract fun setIconVisible(visible: Boolean)

Sets whether the icon for this audio source is visible in the world.

Link copied to clipboard
abstract fun setName(@Nullable name: @Nullable String?)

Sets the source name that will be visible in the overlay.

Link copied to clipboard
abstract fun setStereo(stereo: Boolean)

Sets the source mode to stereo.