Class CreateSessionRequest.Builder

java.lang.Object
com.vonage.client.video.CreateSessionRequest.Builder
Enclosing class:
CreateSessionRequest

public static final class CreateSessionRequest.Builder extends Object
Builder for constructing CreateSessionRequest.
  • Method Details

    • location

      Call this method to set an IP address that the Vonage servers will use to situate the session in its global network. If you do not set a location hint, the Vonage servers will be based on the first client connecting to the session.
      Parameters:
      location - The IP address to serve as the location hint.
      Returns:
      This builder.
    • location

      Call this method to set an IP address that the Vonage servers will use to situate the session in its global network. If you do not set a location hint, the Vonage servers will be based on the first client connecting to the session.
      Parameters:
      location - The IP address to serve as the location hint.
      Returns:
      This builder.
    • mediaMode

      Call this method to determine whether the session will transmit streams using the Vonage Media Router (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 TURN server to relay audio-video streams.

      The Media Router provides the following benefits:

      • The Media Router can decrease bandwidth usage in multiparty sessions. (When the mediaMode property is set to MediaMode.RELAYED, each client must send a separate audio-video stream to each client subscribing to it.)
      • The Media Router can improve the quality of the user experience through audio fallback and video recovery. With these features, if a client's connectivity degrades to a degree that it does not support video for a stream it's subscribing to, the video is dropped on that client (without affecting other clients), and the client receives audio only. If the client's connectivity improves, the video returns.
      • The Media Router supports the archiving feature, which lets you record, save, and retrieve video sessions.
      Parameters:
      mediaMode - Set to a value defined in the MediaMode enum.
      Returns:
      This builder.
    • archiveMode

      Call this method to determine whether the session will be automatically archived (ArchiveMode.ALWAYS) or not (ArchiveMode.MANUAL). Using an always archived session also requires the routed media mode (MediaMode.ROUTED).
      Parameters:
      archiveMode - The Archive mode.
      Returns:
      This builder.
    • e2ee

      public CreateSessionRequest.Builder e2ee(boolean e2ee)
      Call this method to enable end-to-end encryption for the session.
      Parameters:
      e2ee - Set to true to enable end-to-end encryption.
      Returns:
      This builder.
      Since:
      8.12.0
    • build

      Builds the CreateSessionRequest object.
      Returns:
      A new CreateSessionRequest with this builder's properties.