public static interface Session.ReconnectionListener
Modifier and Type | Method and Description |
---|---|
void |
onReconnected(Session session)
Invoked when the local client has reconnected to the OpenTok session after its
network connection was lost temporarily.
|
void |
onReconnecting(Session session)
Invoked when the local client has lost its connection to an OpenTok session and is trying
to reconnect.
|
void onReconnecting(Session session)
onReconnected(Session session)
method is called.
Otherwise, if the client cannot reconnect, the
Session.SessionListener.onDisconnected(Session session)
method is called.
In response to this method being called, you may want to provide a user interface notification, to let the user know that the app is trying to reconnect to the session and that audio-video streams are temporarily disconnected.
session
- The session your client is attempting to reconnect to.onReconnected(Session session)
void onReconnected(Session session)
onReconnecting(Session session)
method is called,
prior to the Session.ReconnectionListener.onReconnected(Session session)
method. If the client cannot reconnect to the session, the
Session.SessionListener.onDisconnected(Session session)
method is called.
Any existing publishers and subscribers are automatically reconnected when the client reconnects and this method is called.
By default, any signals initiated by the the local client using the
Session.sendSignal(String type, String data)
method are sent when the client
reconnects. To prevent any signals initiated while disconnected from being sent,
use the Session.sendSignal(String type, String data, boolean retryAfterReconnect)
method to send the signal, and set the retryAfterReconnect
parameter to
false
. (All signals sent by other clients while your client was disconnected
are received upon reconnecting.)
session
- The session your client reconnected to.onReconnecting(Session session)