AloVideo
Constructor
There are a number of properties available when instantiating the AloVideo class:
Class Instantiation Properties
In order to instantiate the AloVideo object you are required to provide a number of properties. Below are the properties that are available:
Property
Required
Description
user
Yes
userAuthToken
Yes
languageCode
en-US
audioInputDeviceId
No
This is the id of an audio input device (microphone). When specified, this is the device that will be used for audio input. If no device is specified the operating system's default audio input device will be used.
videoInputDeviceId
No
This is to be the id of a video input device (i.e. webcam). When specified, this is the device that will be used for video input. If no device is specified the operating system's default video input device will be used.
Example Properties
Instantiating AloVideo
Methods
connect(channel)
connect(channel)
Parameter
Type
Description
channel
Defines the channel to connect to in the Video Service
Example:
changeAudioInput(deviceId)
changeAudioInput(deviceId)
Parameter
Type
Description
deviceId
String
changeVideoInput(deviceId)
changeVideoInput(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.
enableAudio(enable)
enableAudio(enable)
While publishing a stream you can change whether or not the stream should include audio.
Parameter
Type
Description
enable
Boolean
When you pass the value of false
the audio track in your published stream will be disabled.
enableVideo(enable)
enableVideo(enable)
While publishing a stream you can change whether or not the stream should include video.
Parameter
Type
Description
enable
Boolean
When you pass the value of false
the video track in your published stream will be disabled.
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.
getMediaList()
getMediaList()
muteParticipant(participantId, muted)
muteParticipant(participantId, muted)
Parameter
Type
Description
participantId
String
mute
Boolean
When true
the participant's audio will be muted.
publishStream([options])
publishStream([options])
Option
Default
Description
sendAudio
true
Include audio with the published stream.
sendVideo
true
Include video with the published stream.
setUserAuthToken(token)
setUserAuthToken(token)
Parameter
Type
Description
token
String
unpublishStream()
unpublishStream()
If you are currently publishing a stream, this method will end the stream publication.
Last updated