AloAudio
Constructor
There are a number of properties available when instantiating the AloAudio class:
Class Instantiation Properties
In order to instantiate the AloAudio object you are required to provide a number of properties. Below are the properties that are available:
Property
Required
Default
Description
user
Yes
userAuthToken
Yes
ttsEnabled
No
false
Set this to true if you want users in the channel to hear TTS audio.
audioInputDeviceId
No
audioOutputDeviceId
No
Example Properties:
Instantiating AloAudio
Once you have defined the properties you instantiate as shown:
Methods
connect(channel)
connect(channel)
Parameter
Type
Description
channel
Defines the channel to connect to in the Audio Service
Example:
changeAudioInput(deviceId)
changeAudioInput(deviceId)
Parameter
Type
Description
deviceId
String
changeAudioOutput(deviceId)
changeAudioOutput(deviceId)
Parameter
Type
Description
deviceId
String
disconnect()
disconnect()
Disconnect Related Events
Event
Description
onDisconnect
Once disconnected, either intentionally or due to an error, the onDisconnect
event will be dispatched.
forceReconnectWhenPending()
forceReconnectWhenPending()
If the connection to the service has been lost and you do not want to wait for the service to automatically try reconnecting you can call this method and an attempt will be made to reconnect immediately.
fullDuplexMute()
fullDuplexMute()
fullDuplexToggleMute()
fullDuplexToggleMute()
fullDuplexUnmute()
fullDuplexUnmute()
getMediaList()
getMediaList()
pttEnd()
pttEnd()
pttStart()
pttStart()
setUserAuthToken(token)
setUserAuthToken(token)
Parameter
Type
Description
token
String
Last updated