Event Subscription
Event subscription is a feature to receive event information from the JavaScript SDK.
Event information is in Json format and has the content, time, type, etc. of the message.
It is available with the KlleonChat.onChatEvent()
event listener.
Data Information
message
String
Message received from streaming server
chat_type
String
Message type
time
DateTime
Time the message was received
TEXT
Avatar message
Start sending video of the avatar speaking
STT_RESULT
User voice message
RATE_LIMIT
Disable receiving avatar message
WAIT
Wait for chat to start
WARN_SUSPENDED
Warning that streaming will stop in 10 seconds if there is no message from user
DISABLED_TIME_OUT
Stop streaming if there is no message from user after a period of time
TEXT_ERROR
Failed to send user message
TEXT_MODERATION
User sends an inappropriate word
ERROR
Server error occurred
RESPONSE_IS_ENDED
End of message from avatar
WORKER_DISCONNECTED
Streaming ended
ACTIVATE_VOICE
Start speech recognition
SHOW_AVATAR
Start avatar streaming screen display
PREPARING_RESPONSE
Preparing avatar response
EXCEED_CONCURRENT_QUOTA
Exceeding the maximum number of concurrent users
Example
Last updated