opentok / Opentok-.NET-SDK
Official .NET Server SDK for OpenTok
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing opentok/Opentok-.NET-SDK in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewOpenTok .NET SDK The OpenTok .NET SDK provides methods for: • Generating sessions and tokens for OpenTok applications that run on the .NET platform • Working with OpenTok archives • Working with OpenTok live streaming broadcasts • Working with OpenTok SIP interconnect • Sending signals to clients connected to a session • Disconnecting clients from sessions • Forcing clients in a session to disconnect or mute published audio • Working with Experience Composer • Working with Audio Connector Note! This library is designed to work with the Tokbox/OpenTok platform, part of the Vonage Video API. If you are looking to use the Vonage Video API and using the Vonage Customer Dashboard, you will want to install the Vonage Server SDK for , which includes support for the Vonage Video API. Not sure which exact platform you are using? Take a look at this guide. If you are using the Tokbox platform, do not worry! The Tokbox platform is not going away, and this library will continue to be updated. While we encourage customers to check out the new Unified platform, there is no rush to switch. Both platforms run the exact same infrastructure and capabilities, with the main difference is a unified billing interface and easier access to Vonage’s other CPaaS APIs. If you are new to the Vonage Video API, head on over to the Vonage Customer Dashboard to sign up for a developer account and check out the Vonage Server SDK for . Installation NuGet (recommended): Using the Package Manager Console: Manually: Download the latest release from the Releases Page. Unzip the file and place the place the , dependent assemblies, and supporting files into your own project. Usage Initializing Import the namespace into any files that will be using OpenTok objects. Then initialize an object using your own API Key and API Secret. Overriding the request's user-agent value You can decide to add a custom value to the user-agent value passed with every request. If the custom value has been set, the user-agent will comply to the following format: . Creating Sessions To create an OpenTok Session, call the instance's or method. Each of the parameters are optional and can be omitted if not needed. They are: • : An IPv4 address used as a location hint. (default: "") • : Specifies whether the session will use the OpenTok Media Router (MediaMode.ROUTED) or attempt to transmit streams directly between clients (MediaMode.RELAYED, the default) • : Specifies whether the session will be automatically archived (ArchiveMode.ALWAYS) or not (ArchiveMode.MANUAL, the default) The return value is a object. Its property is useful to get an identifier that can be saved to a persistent store (such as a database). Generating Tokens Once a Session is created, you can start generating Tokens for clients to use when connecting to it. You can generate a token either by calling an instance's method, or by calling a instance's method after creating it. In the first method, the is required and the rest of the parameters are optional. In the second method, all the parameters are optional. Working with Archives You can start the recording of an OpenTok Session using a instance's method. This will return an instance. The parameter is optional and used to assign a name for the Archive. Note that you can only start an Archive on a Session that has clients connected. or then You can add a name for the archive (to use for identification) by setting the parameter of the method. You can also disable audio or video recording by setting the or parameter of the method . You can also set the resolution of the recording to high definition by setting the parameter of the method. Accepted values are "640x480" (SD landscape, the default), "1280x720" (HD landscape), "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). Please note that you cannot specify the when you set the parameter to . By default, all streams are recorded to a single (composed) file. You can record the different streams in the session to individual files (instead of a single composed file) by setting the parameter of the method . You can stop the recording of a started Archive using a instance's method or using the instance's method. or To get an instance (and all the information about it) from an archive ID, use the instance's method. or To delete an archive, you can call a instance's method or call the instance's method. or You can also get a list of all the Archives you've created (up to 1000) with your API Key. This is done using an instance's method. You may optionally paginate the Archives you receive using the offset and count parameters. This will return an object. Note that you can also create an automatically archived session, by passing in as the parameter when you call the method (see "Creating Sessions," above). Working with Streams You can get information about a stream by calling the method of the class. You can get information about all the streams in a session by calling the method of the class. Force Disconnecting Your application server can disconnect a client from an OpenTok session by calling the method of the class. Sending Signals Once a Session is created, you can send signals to everyone in the session or to a specific connection. You can send a signal by calling the method of the class. The parameter is the session ID of the session. The parameter is an instance of the class where you can set the paramter and the parameter. • (string) -- The data string for the signal. You can send a maximum of 8kB. • (string) -- (Optional) The type string for the signal. You can send a maximum of 128 charaacters, and only the following characters are allowed: A-Z, a-z, numbers (0-9), '-', '\_', and '~'. The parameter is an optional string used to specify the connection ID of a client conencted to the session. If you specify this value, the signal is sent to the specified client. Oth…