ServerBroadcastSource

Represents a broadcast audio source.

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

Properties

Link copied to clipboard
@get:NotNull
abstract override val addon: @NotNull AddonContainer
Link copied to clipboard
@get:NotNull
abstract override val filters: @NotNull Collection<Predicate<in VoicePlayer?>?>
Link copied to clipboard
@get:NotNull
abstract override val id: @NotNull UUID
Link copied to clipboard

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

Link copied to clipboard
abstract override var isIconVisible: Boolean
Link copied to clipboard
@get:NotNull
abstract override val line: @NotNull BaseServerSourceLine
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
Link copied to clipboard
abstract override val state: Int

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
abstract fun <P : VoicePlayer?> matchFilters(@NotNull player: @NotNull P & Any): 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 & Any): 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
@NotNull
abstract fun resolveSourceInfo(): @NotNull CompletableFuture<DirectSourceInfo?>
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 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.