Suggestions

close search

StringeeRoomListener

public interface StringeeRoomListener



Monitors the room's events.



Summary


Public Constructors
StringeeRoomListener()

Creates a new StringeeRoomListener instance.

Public methods
void onRoomConnected(StringeeRoom stringeeRoom)

Invoked when the client joins a room.

void onRoomDisconnected(StringeeRoom stringeeRoom)

Invoked when the client leaves a room.

void onRoomError(StringeeRoom stringeeRoom, StringeeError error)

Invoked when the client fails to make or join a room.

void onStreamAdded(StringeeStream stream)

Invoked when a stream is published to the room.

void onStreamPublished(StringeeStream stream, boolean isReconnecting)

Invoked when a stream is published successfully.

void onStreamPublishError(StringeeStream stream, StringeeError error, boolean isReconnecting)

Invoked when a stream is failed to be published.

void onStreamRemoved(StringeeStream stream)

Invoked when the stream is unpublished or the client who published the stream, leaves the room.

void onStreamSubscribed(StringeeStream stream, boolean isReconnecting)

Invoked when the stream is subscribed.

void onStreamSubscribeError(StringeeStream stream, StringeeError error, boolean isReconnecting)

Invoked when the stream is failed to be subscribed.

void onStreamUnPublished(StringeeStream stream)

Invoked when the stream is unpublished from a room.

void onStreamUnPublishError(StringeeStream stream, StringeeError error)

Invoked when the stream is failed to be unpublished.

void onStreamUnSubscribed(StringeeStream stream)

Invoked when the stream is unsubscribed.

void onStreamUnSubscribeError(StringeeStream stream, StringeeError error)

Invoked when the stream is failed to be unsubscribed.


Public constructors


StringeeRoomListener

StringeeRoomListener()

Creates a new StringeeRoomListener instance.



Public methods


onRoomConnected

void onRoomConnected(StringeeRoom stringeeRoom)

Invoked when the client joins a room.

Parameters
stringeeRoom

The room which the client participates in.



onRoomDisconnected

void onRoomDisconnected(StringeeRoom stringeeRoom)

Invoked when the client leaves a room.

Parameters
stringeeRoom

The room which the client leaves.



onRoomError

void onRoomError(StringeeRoom stringeeRoom, StringeeError error)

Invoked when the client fails to make or join a room.

Parameters
stringeeRoom

The room which the client makes or joins.

error

The StringeeError instance contains the error code, the error message.



onStreamAdded

void onStreamAdded(StringeeStream stream)

Invoked when a stream is published to the room.

Parameters
stream

The stream which is published.



onStreamPublished

void onStreamPublished(StringeeStream stream, boolean isReconnecting)

Invoked when a stream is published successfully.

Parameters
stream

The stream which is published.

isReconnecting

Whether the stream is republished when reconnecting.



onStreamPublishError

void onStreamPublishError(StringeeStream stream, StringeeError error, boolean isReconnecting)

Invoked when a stream is failed to be published.

Parameters
stream

The stream which is published.

error

The StringeeError instance contains the error code and the error message.

isReconnecting

Whether the stream is republished when reconnecting.



onStreamRemoved

void onStreamRemoved(StringeeStream stream)

Invoked when the stream is unpublished or the client who published the stream, leaves the room.

Parameters
stream

The stream which is removed.



onStreamSubscribed

void onStreamSubscribed(StringeeStream stream, boolean isReconnecting)

Invoked when the stream is subscribed.

Parameters
stream

The stream which is subscribed.

isReconnecting

Whether the stream is resubscribed when reconnecting.



onStreamSubscribeError

void onStreamSubscribeError(StringeeStream stream, StringeeError error, boolean isReconnecting)

Invoked when the stream is failed to be subscribed.

Parameters
stream

The stream which is subscribed.

error

The StringeeError instance contains the error code and the error message.

isReconnecting

Whether the stream is resubscribed when reconnecting.



onStreamUnPublished

void onStreamUnPublished(StringeeStream stream)

Invoked when the stream is unpublished from a room.

Parameters
stream

The stream which is unpublished.



onStreamUnPublishError

void onStreamUnPublishError(StringeeStream stream, StringeeError error)

Invoked when the stream is failed to be unpublished.

Parameters
stream

The stream which is unpublished.

error

The StringeeError instance contains the error code and the error message.



onStreamUnSubscribed

void onStreamUnSubscribed(StringeeStream stream)

Invoked when the stream is unsubscribed.

Parameters
stream

The stream which is unsubscribed.



onStreamUnSubscribeError

void onStreamUnSubscribeError(StringeeStream stream, StringeeError error)

Invoked when the stream is failed to be unsubscribed.

Parameters
stream

The stream which is unsubscribed.

error

The StringeeError instance contains the error code and the error message.