public static class SessionProperties.Builder
extends java.lang.Object
SessionProperties| Constructor and Description |
|---|
SessionProperties.Builder() |
| Modifier and Type | Method and Description |
|---|---|
SessionProperties |
build()
Builds the SessionProperties object.
|
SessionProperties.Builder |
location(java.lang.String location)
Call this method to set an IP address that the OpenTok servers will use to
situate the session in its global network.
|
SessionProperties.Builder |
mediaMode(MediaMode mediaMode)
Call this method to determine whether the session will transmit streams using the
OpenTok Media Router (
MediaMode.ROUTED) or not
(MediaMode.RELAYED). |
public SessionProperties.Builder location(java.lang.String location) throws InvalidArgumentException
location - The IP address to serve as the locaion hint.InvalidArgumentExceptionpublic SessionProperties.Builder mediaMode(MediaMode mediaMode)
MediaMode.ROUTED) or not
(MediaMode.RELAYED). By default, the mediaMode property
is set to MediaMode.RELAYED.
With the mediaMode property set to MediaMode.RELAYED, the session
will attempt to transmit streams directly between clients. If clients cannot connect due to
firewall restrictions, the session uses the OpenTok TURN server to relay audio-video
streams.
The OpenTok Media Router provides the following benefits:
mediaMode property is set to MediaMode.RELAYED,
each client must send a separate audio-video stream to each client subscribing to
it.)You will be billed for streamed minutes if you use the OpenTok Media Router or if the session uses the OpenTok TURN server to relay streams. For information on pricing, see the OpenTok pricing page.
mediaMode - Set to a value defined in the MediaMode enum.public SessionProperties build()