OpenTok.Session.Builder
public class Builder
Enclosing type: OpenTok.Session
Instantiate a Builder instance by calling the Builder() constructor. Then (optionally), set properties of the Builder object. Then call the Build() method to create a Session object.
Properties
#### ConnectionEventsSuppressed
Type: bool
{ get; set; }
Prevent connection events (such as ConnectionCreated from being dispatched. The default value is false.
Type: bool
{ get; set; }
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.
Type: bool
{ get; set; }
false
(session migration is not enabled). For more information, see Server Rotation and Session Migration.
Type: bool
{ get; set; }
Set this to true if the allowed IP list feature is enabled for your project. (This is available as an add-on feature. The default value is false.
Type: Uri
{ get; set; }
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.
Type: IceConfig
{ get; set; }
Defines the TURN servers to be used by the client in the OpenTok session. See the configurable TURN servers.
Type: Context
{ get; set; }
The Content object used to manage resources for the Session.
Type: string
{ get; set; }
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.
Type: string
{ get; set; }
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 SDKs to generate session IDs in your shipping application.
Type: IDispatcher
{ get; set; }
- DirectDispatcher
- DedicatedWorkerDispatcher
- ThreadPoolDispatcher There is also an IDispatcher implementation provided for each supported presentation framework:
- WPFDispatcher (both for .NetFramework and .NetCore)
- WinFormsDispatcher (both for .NetFramework and .NetCore)
Methods
| Name | Description |
|---|---|
Builder(context, apiKey, sessionId) |
|
Builder(apiKey, sessionId) |
|
Build() → {Session} |
Builder(context, apiKey, sessionId)
Parameters:
| Name | Type | Description |
|---|---|---|
context |
Context | The Content object used to manage resources for the Session. |
apiKey |
string | Your OpenTok API key. See your Vonage Video API account page. |
sessionId |
string | 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 SDKs to generate session IDs in your shipping application. |
Builder(apiKey, sessionId)
Parameters:
| Name | Type | Description |
|---|---|---|
apiKey |
string | Your OpenTok API key. See your Vonage Video API account page. |
sessionId |
string | 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 SDKs to generate session IDs in your shipping application. |