Instantiating Audio Service
Last updated
Last updated
© Copyright 2024 ALO.ai, Inc. • All Rights Reserved
In order to instantiate the AloAudio object you are required to provide a number of properties. See Class Instantiation Properties.
Once you have defined the properties you instantiate as shown:
Once instantiated, and connected to a channel, the user will be connected to the AloAudio Service. There are a number of event fire that are related to this connection:
After you instantiate AloAudio you can add event listeners for the events mentioned above.
Event
Description
onConnectionChange
As the connection to the Audio Service is established events showing the following statuses will be dispatched:
AloAudio.CONNECTION_STATUS_ACQUIRING_ACCESS, AloAudio.CONNECTION_STATUS_CONNECTING, AloAudio.CONNECTION_STATUS_CONNECTED, AloAudio.STATUS_NOT_CONNECTED, AloAudio.CONNECTION_STATUS_ERROR, AloAudio.CONNECTION_STATUS_CONNECTED, AloAudio.CONNECTION_STATUS_RECONNECT_PENDING.
onDisconnect
Once disconnected, either intentionally or due to an error, the onDisconnect event will be dispatched.