Modifier and Type | Method and Description |
---|---|
void |
onConnected(Session session)
Invoked when the client connects to the OpenTok session.
|
void |
onDisconnected(Session session)
Invoked when the client is no longer connected to the OpenTok
session.
|
void |
onError(Session session,
OpentokError error)
Invoked when something goes wrong when connecting or connected to the
session.
|
void |
onStreamDropped(Session session,
Stream stream)
Invoked when another client stops publishing a stream to this
OpenTok session.
|
void |
onStreamReceived(Session session,
Stream stream)
Invoked when a there is a new stream published by another
client in this OpenTok session.
|
void onConnected(Session session)
session
- The session your client connected to.void onDisconnected(Session session)
session
- The session your client disconnected from.void onStreamReceived(Session session, Stream stream)
session
- The session in which the stream was added.stream
- A Stream object representing the new stream, which can be
used to create a Subscriber.void onStreamDropped(Session session, Stream stream)
session
- The session from which the stream was removed.stream
- A Stream object representing the dropped stream, which can
be used to identify a Subscriber.void onError(Session session, OpentokError error)
This method is called if the attempt to connect to the session fails.
It is also called if the connection to the session drops due to an error after
a successful connection, and in this case the method is called just before
the onDisconnected(Session session)
method is called.
session
- The session in which the error occured.error
- An error describing the cause for error.