Skip to content

Releases: opentok/Opentok-.NET-SDK

Release v2.2.1-Alpha

20 Jun 22:18
Compare
Choose a tag to compare
Release v2.2.1-Alpha Pre-release
Pre-release

The default setting for the CreateSession() method is to create a session with the media mode set
to relayed. In previous versions of the SDK, the default setting was to use the OpenTok Media Router
(media mode set to routed). In a relayed session, clients will attempt to send streams directly
between each other (peer-to-peer); if clients cannot connect due to firewall restrictions, the
session uses the OpenTok TURN server to relay audio-video streams.

v2.2.0-Alpha

20 Jun 22:18
Compare
Choose a tag to compare
v2.2.0-Alpha Pre-release
Pre-release

This version of the SDK includes support for working with OpenTok 2.0 archives. (This API does not
work with OpenTok 1.0 archives.)

This version of the SDK includes a number of improvements in the API design. These include a number
of API changes:

  • New OpenTok class -- The name of the main class has changed from OpenTokSDK to OpenTok.
    In the previous version, the constructor was OpenTokSDK().
    In v2.2, it is OpenTok(int apiKey, int apiSecret).

  • CreateSession -- In the previous version, there were two methods to create a session:
    OpenTokSDK.CreateSession(String location) and
    OpenTokSDK.CreateSession(String location, Dictionary<string, object> options).
    These methods returned a string (the session ID).
    In v2.2, the OpenTok class includes one method, which takes two parameters (both optional):
    CreateSession(string location = "", MediaMode mediaMode = MediaMode.ROUTED).
    The mediaMode parameter replaces the p2p.preference setting in the
    previous version. The method returns a Session Object.

  • GenerateToken -- In the previous version, there were two methods:
    OpenTokSDK.GenerateToken(string sessionId) and
    OpenTokSDK.GenerateToken(string sessionId, Dictionary<string, object> options)
    In v2.2, this is replaced with the following method:
    OpenTokSDK.OpenTok.GenerateToken(string sessionId, Role role = Role.PUBLISHER, double expireTime = 0, string data = null).
    All parameters, except the sessionId parameter, are optional.

    Also, the Session class includes a method for generating tokens:
    OpenTokSDK.Session.GenerateToken(Role role = Role.PUBLISHER, double expireTime = 0, string data = null).