The voip API provides platform methods to interact with the voip connections, inputs, syncing, and systems. You can also retrieve different statuses for the current voip state. These methods exist to help integrate a platform solution for voip in your app. Read more about voip in our docs
Gets whether the microphone is currently available to the app. This can be used to show if the user's voice is able to be heard by other users. Returns a microphone availability state flag which determines whether it is available or not - com.meta.horizon.platform.ovr.models.MicrophoneAvailabilityState.
Sets whether SystemVoip should be suppressed so that this app's Voip can use the microphone and play incoming Voip audio. Once microphone switching functionality for the user is released, this function will no longer work. You can use com.meta.horizon.platform.ovr.requests.Voip#getMicrophoneAvailability() to see if the user has allowed the app access to the microphone. This returns a com.meta.horizon.platform.ovr.models.SystemVoipState object which contains statuses about whether the microphone is muted or whether passthrough is enabled.
Parameters
suppressed
- A boolean indicates if the voip is supressed or not.
static void accept
( long userID )
Accepts a VoIP connection from a given user.
Parameters
userID
- The ID of the user to accept the VoIP connection from.
Gets whether or not a voice connection is using discontinuous transmission (DTX). Both sides must set to using DTX when their connection is established in order for this to be true. Returns unknown if there is no connection.
Parameters
peerID
- The ID of the peer whose voice connection's DTX status is being queried.
Gets the current local bitrate used for the connection to the specified user. This is set by the current client. Returns unknown if there is no connection.
Parameters
peerID
- The ID of the peer whose local bitrate is being queried.
Returns
VoipBitrate
static long getOutputBufferMaxSize ( )
Returns the size of the internal ringbuffer used by the voip system in elements. This size is the maximum number of elements that can ever be returned by com.meta.horizon.platform.ovr.requests.Voip#getPCM.This function can be safely called from any thread.
Returns
long
static long getPCMSize
( long senderID )
Returns the current number of audio samples available to read for the specified user. This function is inherently racy; it's possible that more data can be added between a call to this function and a subsequent call to com.meta.horizon.platform.ovr.requests.Voip#getPCM.This function can be safely called from any thread.
Parameters
senderID
- The ID of the user to get the audio sample count for.
Gets the current remote bitrate used for the connection to the specified user. This is set by the client on the other side of the connection. Returns unknown if there is no connection.
Parameters
peerID
- The ID of the peer whose remote bitrate is being queried.