Push To Talk (PTT)

What is Push To Talk?

Push-to-talk method of communicating which is how a two-way radio works uses a “walkie-talkie” button to switch from voice reception to transmit mode. When a user is transmitting no other user on the channel can transmit. The mutex locking mechanism is what we use to ensure that only one user is transmitting at a time.

When you connect to a channel without setting isFullDuplex to true the user will be in PTT mode.

Event

Description

onPTTStateChange

This event will let you know when the PTT button is available (meaning you are connected to an audio channel and no one else is speaking). The possible states are:

AloAudio.PTT_BUTTON_STATE_AVAILABLE AloAudio.PTT_BUTTON_STATE_UNAVAILABLE

onPTTLockChange

When you successfully acquire the lock to use the PTT there will be an event with the AloAudio.PTT_LOCK_ACQUIRED state. When the lock is released the state will be AloAudio.PTT_LOCK_RELEASED

onPTTSpeakerChange

When a user acquires the PTT lock there will be an event containing information about the user that current attains the lock.

onMuteChange

When you acquire the lock there will be an event stating that you microphone is not muted. When releasing the lock the event will indicate that your microphone is muted.

Last updated