createPlayerSource

abstract fun createPlayerSource(player: VoiceServerPlayer, stereo: Boolean = false, decoderInfo: CodecInfo? = OpusDecoderInfo(), builder: Consumer<ServerPlayerSource> = Consumer {}): ServerPlayerSource

Creates a new player source.

Player source is a proximity source attached to the specified player.

Return

A new ServerPlayerSource instance.

Parameters

player

The target player.

stereo

Whether the source should be stereo (default is false).

decoderInfo

Optional decoder information, default is OpusDecoderInfo.

builder

Optional builder to change source info before it's added to the sources list and ServerSourceCreatedEvent is fired.


open fun createPlayerSource(player: VoiceServerPlayer, stereo: Boolean = false, decoderInfo: CodecInfo? = OpusDecoderInfo()): ServerPlayerSource

Creates a new player source.

Player source is a proximity source attached to the specified player.

Return

A new ServerPlayerSource instance.

Parameters

player

The target player.

stereo

Whether the source should be stereo (default is false).

decoderInfo

Optional decoder information, default is OpusDecoderInfo.


Creates a new player source.

Player source is a proximity source attached to the specified player.

Return

A new ServerPlayerSource instance.

Parameters

player

The target player.

stereo

Whether the source should be stereo (default is false).