public class StringeeRoom
extends Object
Represents a Stringee room in which the client is participating.
Public Constructors | |
---|---|
StringeeRoom(StringeeClient client)
Create a new StringeeRoom instance to make a room chat. |
|
StringeeRoom(StringeeClient client, int roomId)
Create a new StringeeRoom instance to join the room chat. |
Public methods | |
---|---|
int |
getId()
Returns the room's id. |
void |
joinRoom()
Joins the room chat. The StringeeRoom instance must be instantiated with the room's id before joining. |
void |
leaveRoom()
Leaves the room chat and releases resources. |
void |
makeRoom()
Makes a room chat. |
void |
publish(StringeeStream stream)
Publishes a stream to the room. |
void |
setRoomListener(StringeeRoomListener roomListener)
Sets a StringeeRoomListener object to monitor the room's events such as: connected, disconnected, streams added... |
void |
subscribe(StringeeStream stream)
Subscribes a stream. |
void |
unpublish(StringeeStream stream)
Unpublishes a stream. |
void |
unsubscribe(StringeeStream stream)
Unsubscribes a stream. |
StringeeRoom(StringeeClient client)
Create a new StringeeRoom instance to make a room chat.
Parameters | |
---|---|
client |
The client who wants to make a room chat. |
StringeeRoom(StringeeClient client, int roomId)
Create a new StringeeRoom instance to join the room chat.
Parameters | |
---|---|
client |
The client who wants to join the room chat. |
roomId |
The room's id. |
int getId()
Returns the room's id.
void joinRoom()
Joins the room chat. The StringeeRoom instance must be instantiated with the room's id before joining.
void leaveRoom()
Leaves the room chat and releases resources.
void makeRoom()
Makes a room chat.
void publish(StringeeStream stream)
Publishes a stream to the room.
Parameters | |
---|---|
stream |
The stream which will be published. |
void setRoomListener(StringeeRoomListener roomListener)
Sets a StringeeRoomListener object to monitor the room's events such as: connected, disconnected, streams added...
Parameters | |
---|---|
roomListener |
The StringeeRoomListener instance. |
void subscribe(StringeeStream stream)
Subscribes a stream.
Parameters | |
---|---|
stream |
The stream which will be subscribed. |
void unpublish(StringeeStream stream)
Unpublishes a stream.
Parameters | |
---|---|
stream |
The stream which will be unpublished. |
void unsubscribe(StringeeStream stream)
Unsubscribes a stream.
Parameters | |
---|---|
stream |
The stream which will be unsubscribed. |