Documentation

Support

Vivox Unity SDK

Vivox Unity SDK

Transmission modes

Learn about different voice transmission modes in Vivox.
Read time 1 minuteLast updated 2 days ago

TransmissionMode::None

This is the default value of the TransmissionMode, and results in no audio being broadcast to any channel. If you are transmitting into a specific channel by using
TransmissionMode.Single
, and that channel is disconnected entirely or has its audio capability disconnected, the TransmissionMode reverts to
TransmissionMode.None
, regardless of whether you are joined to other audio capable channels, rather than the plug-in switching transmission to another one automatically. If you want a switch to occur, you can use the
VivoxService.Instance.ChannelLeft
event and check it against the
VivoxService.Instance.TransmittingChannels
. Conversely, if set to
TransmissionMode.All
, you continue to transmit into all channels.

TransmissionMode::All

You can call
VivoxService.Instance.SetChannelTransmissionModeAsync(TransmissionMode.All)
at any point to enable transmission into all current and future channels. This enables users to broadcast audio into all channels that they are or will ever be connected to, until you change the policy to something else. There is no additional resource cost for transmitting to multiple channels compared to transmitting to a single channel.

TransmissionMode::Single

Use this policy if a user will be in multiple audio-capable channels, but will only speak in one channel at a time. In cases where the user will only ever be in one audio-only or audio and text channel at a time, this performs identically to
TransmissionMode.All
.
When setting
TransmissionMode.Single
by using
VivoxService.Instance.SetChannelTransmissionModeAsync(TransmissionMode transmissionMode, string channelName = null)
, you must also include a channelName as the second argument, specifying which single channel you want to transmit to. There is no benefit to preemptively setting this value for a channel that you are not already connected to, because the audio will have no where to go.