Chat Room
Represents IVS chat room connection.
This is a high-level object representing connection to IVS Chat room. It is responsible for managing chat connection, it allows to send chat requests & receive chat events.
Parameters
AWS region name (e.g. "us-west-2") or web socket URL starting with "wss://" or "ws://"
Callback method called when ChatRoom requires a fresh IVS chat token
Number of times the room will automatically retry web socket connection in case of connection failures
Constructors
Types
Functions
Sends a delete message request through a socket connection.
Initiates a graceful disconnection of ChatRoom. Results in ChatRoomListener.onDisconnected event being called as well as DisconnectReason being set to DisconnectReason.CLIENT_DISCONNECT.
Sends a disconnect user request through a socket connection.
Sends a message request to the room through a socket connection.
Properties
Property for attaching ChatRoomListener interface that will raise lifecycle events, e.g. ChatRoomListener.onConnected and receive events, e.g. ChatRoomListener.onMessageReceived.
This property can be used to attach a custom logger implementing ChatLogger interface. It defaults to SystemLogger that logs output to logcat.
Minimal level of severity of logs to be logged to logger. Defaults to ChatLogLevel.DEBUG
Current room state. Initial state is disconnected.
Extensions
Sends a delete message request through a socket connection using suspending function.
Sends a disconnect user request through a socket connection using suspending function.
Sends a message request to the room through a socket connection using suspending function.
Flow of DeleteMessageEvent instances delivered to a ChatRoom.
Flow of DisconnectUserEvent instances delivered to a ChatRoom.
Flow of ChatMessage instances delivered to a ChatRoom. The message can be sent by any of the users in the room, including the current user.
Flow for observing ChatRoom.state changes.