Package com.opentok.android
Class Session.Builder
- java.lang.Object
-
- com.opentok.android.Session.Builder
-
- Enclosing class:
- Session
public static class Session.Builder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Session.Builder.IceServer
This is part of the configurable TURN feature.static class
Session.Builder.IncludeServers
This is part of the configurable TURN feature.static class
Session.Builder.TransportPolicy
This is part of the configurable TURN feature.
-
Constructor Summary
Constructors Constructor Description Builder(android.content.Context context, java.lang.String apiKey, java.lang.String sessionId)
Use this builder to create a Session instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Session
build()
Returns a newSession
instance based on theSession.Builder
settings.Session.Builder
connectionEventsSuppressed(java.lang.Boolean enabled)
Prevent connection events (such asSession.ConnectionListener.onConnectionCreated(Session session, Connection connection)
) from being dispatched.Session.Builder
sessionOptions(Session.SessionOptions sessionOptions)
Sets advanced options for the session.Session.Builder
setApiUrl(java.net.URL apiUrl)
Deprecated.Session.Builder
setCustomIceServers(java.util.List<Session.Builder.IceServer> serverList, Session.Builder.IncludeServers config)
This is part of the configurable TURN feature.Session.Builder
setIceRouting(Session.Builder.TransportPolicy routing)
This is part of the configurable TURN feature.Session.Builder
setIpWhitelist(boolean enabled)
Set this totrue
if the allowed IP list feature is enabled for your project.Session.Builder
setProxyUrl(java.lang.String proxyUrl)
Set this to the URL of the IP proxy server.Session.Builder
setSinglePeerConnection(boolean enable)
Single Peer Connection (SPC) is a feature that encapsulates all subscriber connections to a single peer connection.
-
-
-
Constructor Detail
-
Builder
public Builder(android.content.Context context, java.lang.String apiKey, java.lang.String sessionId)
Use this builder to create a Session instance.- Parameters:
context
- The Android application context associated with this process.apiKey
- Your OpenTok API key. See your Vonage Video API account page. Important: If you are using the Video API with a Vonage application (instead of an OpenTok project), pass in the application ID (not an OpenTok API key) for this parameter.sessionId
- The OpenTok session ID this instance should connect to. For test purposes, you can generate test session by logging into your Vonage Video API account. Use the OpenTok server-side SDKs to generate session IDs in your shipping app.- See Also:
Session.setSessionListener(com.opentok.android.Session.SessionListener)
-
-
Method Detail
-
connectionEventsSuppressed
public Session.Builder connectionEventsSuppressed(java.lang.Boolean enabled)
Prevent connection events (such asSession.ConnectionListener.onConnectionCreated(Session session, Connection connection)
) from being dispatched.The default value is
false
.
-
sessionOptions
public Session.Builder sessionOptions(Session.SessionOptions sessionOptions)
Sets advanced options for the session.- See Also:
Session.SessionOptions
-
setCustomIceServers
public Session.Builder setCustomIceServers(java.util.List<Session.Builder.IceServer> serverList, Session.Builder.IncludeServers config)
This is part of the configurable TURN feature.
-
setIceRouting
public Session.Builder setIceRouting(Session.Builder.TransportPolicy routing)
This is part of the configurable TURN feature.
-
setApiUrl
@Deprecated public Session.Builder setApiUrl(java.net.URL apiUrl)
Deprecated.This method is deprecated. (Calling it has no effect.)
-
setIpWhitelist
public Session.Builder setIpWhitelist(boolean enabled)
Set this totrue
if the allowed IP list feature is enabled for your project. (This is available as an add-on feature.) The default value isfalse
.
-
setProxyUrl
public Session.Builder setProxyUrl(java.lang.String proxyUrl)
Set this to the URL of the IP proxy server. This is available as an add-on feature. See the OpenTok pricing page and the IP proxy developer guide.
-
setSinglePeerConnection
public Session.Builder setSinglePeerConnection(boolean enable)
Single Peer Connection (SPC) is a feature that encapsulates all subscriber connections to a single peer connection. The benefits of enabling SPC include reduced OS resource consumption, improved rate control, and, in case of mobile native devices, support for larger sessions. SPC is disabled by default. When disabled, the session will use Multiple Peer Connection (MPC), where a separate peer connection is established between each endpoint.
-
-