Connect to a Channel

Channels

TODO ROSS: Describe what channels are

Connecting

To connect to an audio service channel you call the connect(aloAudioChannel) method:

Property

Type

Description

channel

Defines which channel to connect to in the Audio Service

aloAudio.connect(audioChannel);

Event

Description

onJoinChannel

As the connection to the channel within Audio Service is established, events showing the following statuses will be may dispatched:

AloAudio.CHANNEL_STATUS_JOINING,

AloAudio.CHANNEL_STATUS_JOINED,

AloAudio.STATUS_FAILED.

onInvalidAuthenticationToken

When you receive this event it signifies that you need to generate a new authentication token and reconnect to the channel. See setUserAuthToken()

Example Event Payloads

{
  detail: {
    state: "JOINING",
    channel: {...}
  }
}


{
  detail: {
    state: "JOINED",
    channel: {...}
  }
}


{
  detail: {
    state: "JOINING",
    message: "Something went wrong"
    channel: {...}
  }
}

Last updated

Logo

© Copyright 2024 ALO.ai, Inc. • All Rights Reserved