Class Index | File Index

Classes


Class LiveChatConnection


Defined in: sdk.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Connection class for a Live Chat, or chatroom connection.
Field Summary
Field Attributes Field Name and Description
 
 
 
 
 
 
 
 
 
 
Method Summary
Method Attributes Method Name and Description
 
Accept a private request.
 
boot(user)
Boot a user from the channel.
 
 
connect(channel, user)
Connect to the live chat server channel.
 
connectMedia(mediaChannel, shareAudio, shareVideo)
Connect to the active channels media feed (video, audio).
 
Disconnect from the channel.
 
Disconnect from the active channels media feed (video, audio).
 
exit()
Exit from the current private channel.
 
Increase the size of the video element for the userid.
 
muteAudio(user)
Mute the audio for the userid.
 
muteVideo(user)
Mute the video for the userid.
 
Change to normal mode.
 
ping()
Test the connection.
 
pvt(user)
Request a private chat session with a user.
 
resetMedia(shareAudio, shareVideo)
Reset the media feed (audio, video).
 
sendAttachment(file, resize, form)
 
sendMessage(message)
Sent a text message to the channel.
 
setKeepAlive(keepAlive)
 
Decrease the size of the video element for the userid.
 
Change to spy mode.
 
 
whisper(user, message)
Send a private message to a user.
Class Detail
LiveChatConnection()
Connection class for a Live Chat, or chatroom connection. A live chat connection is different than an SDKConnection as it is asynchronous, and uses web sockets for communication.
Field Detail
channel

channelToken

credentials

keepAlive

listener

nick

onMediaStream

onMediaStreamEnded

onNewChannel

user
Method Detail
accept()
Accept a private request. This is also used by an operator to accept the top of the waiting queue. This can also be used by a user to chat with the channel bot. This call is asynchronous, any error or success with be sent as a separate message to the listener.

boot(user)
Boot a user from the channel. You must be a channel administrator to boot a user. This call is asynchronous, any error or success with be sent as a separate message to the listener.
Parameters:
user

checkSocket()

connect(channel, user)
Connect to the live chat server channel. Validate the user credentials. This call is asynchronous, any error or success with be sent as a separate message to the listener.
Parameters:
channel
user

connectMedia(mediaChannel, shareAudio, shareVideo)
Connect to the active channels media feed (video, audio).
Parameters:
mediaChannel
shareAudio
shareVideo

disconnect()
Disconnect from the channel.

disconnectMedia()
Disconnect from the active channels media feed (video, audio).

exit()
Exit from the current private channel. This call is asynchronous, any error or success with be sent as a separate message to the listener.

expandVideo(user)
Increase the size of the video element for the userid.
Parameters:
user

muteAudio(user)
Mute the audio for the userid.
Parameters:
user

muteVideo(user)
Mute the video for the userid.
Parameters:
user

normalMode()
Change to normal mode.

ping()
Test the connection. A pong message will be returned, this message will not be broadcast to the channel. This call is asynchronous, any error or success with be sent as a separate message to the listener.

pvt(user)
Request a private chat session with a user. This call is asynchronous, any error or success with be sent as a separate message to the listener.
Parameters:
user

resetMedia(shareAudio, shareVideo)
Reset the media feed (audio, video).
Parameters:
shareAudio
shareVideo

sendAttachment(file, resize, form)
Parameters:
file
resize
form

sendMessage(message)
Sent a text message to the channel. This call is asynchronous, any error or success with be sent as a separate message to the listener. Note, the listener will receive its own messages.
Parameters:
message

setKeepAlive(keepAlive)
Parameters:
keepAlive

shrinkVideo(user)
Decrease the size of the video element for the userid.
Parameters:
user

spyMode()
Change to spy mode. This allows admins to monitor the entire channel.

toggleKeepAlive()

whisper(user, message)
Send a private message to a user. This call is asynchronous, any error or success with be sent as a separate message to the listener.
Parameters:
user
message

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 17 2017 14:11:30 GMT-0400 (EDT)