Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

OpenTokSDK.OpenTok

Contains methods for creating OpenTok sessions, generating tokens, and working with archives. More...

Public Member Functions

 OpenTok (int apiKey, string apiSecret)
 Creates an OpenTok object. More...
 OpenTok (int apiKey, string apiSecret, string apiUrl)
 For Vonage internal use. More...
Session CreateSession (string location="", MediaMode mediaMode=MediaMode.RELAYED, ArchiveMode archiveMode=ArchiveMode.MANUAL)
 Creates a new OpenTok session. More...
string GenerateToken (string sessionId, Role role=Role.PUBLISHER, double expireTime=0, string data=null, List< string > initialLayoutClassList=null)
 Creates a token for connecting to an OpenTok session. In order to authenticate a user connecting to an OpenTok session, the client passes a token when connecting to the session. More...
Archive StartArchive (string sessionId, string name="", bool hasVideo=true, bool hasAudio=true, OutputMode outputMode=OutputMode.COMPOSED, string resolution=null, ArchiveLayout layout=null)
 Starts archiving an OpenTok session. More...
Archive StopArchive (string archiveId)
 Stops an OpenTok archive that is being recorded. More...
ArchiveList ListArchives (int offset=0, int count=0, string sessionId="")
 Returns a List of Archive objects, representing archives that are both both completed and in-progress, for your API key. More...
Archive GetArchive (string archiveId)
 Gets an Archive object for the given archive ID. More...
void DeleteArchive (string archiveId)
 Deletes an OpenTok archive. More...
Stream GetStream (string sessionId, string streamId)
 Gets a Stream object for the given stream ID. More...
StreamList ListStreams (string sessionId)
 Returns a List of Stream objects, representing streams that are in-progress, for the session ID. More...
void ForceDisconnect (string sessionId, string connectionId)
 Force a specific client to disconnect from an OpenTok session. More...
Broadcast StartBroadcast (string sessionId, Boolean hls=true, List< Rtmp > rtmpList=null, string resolution=null, int maxDuration=7200, BroadcastLayout layout=null)
 Use this method to start a live streaming for an OpenTok session. This broadcasts the session to an HLS (HTTP live streaming) or to RTMP streams. More...
Broadcast StopBroadcast (string broadcastId)
 Use this method to stop a live broadcast of an OpenTok session. Note that broadcasts automatically stop 120 minutes after they are started. More...
Broadcast GetBroadcast (string broadcastId)
 Use this method to get a live streaming broadcast object of an OpenTok session. More...
void SetBroadcastLayout (string broadcastId, BroadcastLayout layout)
 Sets the layout type for the broadcast. For a description of layout types, see Configuring the video layout for OpenTok live streaming broadcasts. More...
bool SetArchiveLayout (string archiveId, ArchiveLayout layout)
 Allows you to Dynamically change the layout of a composed archive while it's being recorded see Customizing the video layout for composed archives for details regarding customizing a layout. More...
void SetStreamClassLists (string sessionId, List< StreamProperties > streams)
 Sets the layout class list for streams in a session. Layout classes are used in the layout for composed archives and live streaming broadcasts. For more information, see Customizing the video layout for composed archives and Configuring video layout for OpenTok live streaming broadcasts. More...
void Signal (string sessionId, SignalProperties signalProperties, string connectionId=null)
 Sends a signal to clients (or a specific client) connected to an OpenTok session. More...
void SetDefaultRequestTimeout (int timeout)
 Set's the default request timeout (in milliseconds) for all WebRequest's sent by the SDK More...
void PlayDTMF (string sessionId, string digits, string connectionId=null)
 Send DTMF digits to all participants in an active OpenTok session or to a specific client connected to that session. More...
Task PlayDTMFAsync (string sessionId, string digits, string connectionId=null)
 Send DTMF digits to all participants in an active OpenTok session or to a specific client connected to that session. More...
void Dial (string sessionId, string token, string sipUri, DialOptions options=null)
 Connects a SIP platform to an OpenTok session. More...
Task DialAsync (string sessionId, string token, string sipUri, DialOptions options=null)
 Connects a SIP platform to an OpenTok session. More...
void ForceMuteStream (string sessionId, string streamId)
 Force the publisher of a specific stream to mute its published audio. More...
async Task ForceMuteStreamAsync (string sessionId, string streamId)
 Force the publisher of a specific stream to mute its published audio. More...
void ForceMuteAll (string sessionId, string[] excludedStreamIds)
 Forces all streams (except for an optional list of streams) in a session to mute published audio. More...
async Task ForceMuteAllAsync (string sessionId, string[] excludedStreamIds)
 Forces all streams (except for an optional list of streams) in a session to mute published audio. More...
void DisableForceMute (string sessionId)
 Disables the active mute state of the session. After you call this method, new streams published to the session will no longer have audio muted. More...
async Task DisableForceMuteAsync (string sessionId)
 Disables the active mute state of the session. After you call this method, new streams published to the session will no longer have audio muted. More...

Properties

int ApiKey [get]
 The OpenTok API key passed into the OpenTok() constructor. More...
string ApiSecret [get]
 The OpenTok API secret passed into the OpenTok() constructor. More...
HttpClient Client [get, set]
 For internal use More...
bool Debug [get, set]
 Enables writing request/response details to console. Don't use in a production environment. More...

Detailed Description

Contains methods for creating OpenTok sessions, generating tokens, and working with archives.

To create a new OpenTok object, call the OpenTok() constructor with your OpenTok API key and the API secret for your OpenTok project. Do not publicly share your API secret. You will use it with the OpenTok constructor (only on your web server) to create OpenTok sessions.

Constructor & Destructor Documentation

◆ OpenTok() [1/2]

OpenTokSDK.OpenTok.OpenTok ( int  apiKey,
string  apiSecret 
)

Creates an OpenTok object.

Parameters
apiKeyYour OpenTok API key. (See the Vonage Video API account page
apiSecretYour OpenTok API secret. (See the Vonage Video API account page

◆ OpenTok() [2/2]

OpenTokSDK.OpenTok.OpenTok ( int  apiKey,
string  apiSecret,
string  apiUrl 
)

For Vonage internal use.

Parameters
apiKey
apiSecret
apiUrl

Member Function Documentation

◆ CreateSession()

Session OpenTokSDK.OpenTok.CreateSession ( string  location = "",
MediaMode  mediaMode = MediaMode.RELAYED,
ArchiveMode  archiveMode = ArchiveMode.MANUAL 
)

Creates a new OpenTok session.

OpenTok sessions do not expire. However, authentication tokens do expire (see the generateToken() method). Also note that sessions cannot explicitly be destroyed.

A session ID string can be up to 255 characters long.

Calling this method results in an OpenTokException in the event of an error. Check the error message for details.

You can also create a session using the OpenTok REST API or by logging in to your Vonage Video API account.

Parameters
locationAn IP address that the OpenTok servers will use to situate the session in its global network. If you do not set a location hint, the OpenTok servers will be based on the first client connecting to the session.
mediaModeWhether the session will transmit streams using the OpenTok Media Router (MediaMode.ROUTED) or not (MediaMode.RELAYED). By default, the setting is MediaMode.RELAYED.

With the parameter 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 streams.

The OpenTok Media Router provides the following benefits:

  • The OpenTok Media Router can decrease bandwidth usage in multiparty sessions. (When the mediaMode parameter is set to MediaMode.ROUTED, each client must send a separate audio-video stream to each client subscribing to it.)
  • The OpenTok 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 OpenTok Media Router supports the archiving feature, which lets you record, save, and retrieve OpenTok sessions.
Parameters
archiveModeWhether the session is automatically archived (ArchiveMode.ALWAYS) or not (ArchiveMode.MANUAL). By default, the setting is ArchiveMode.MANUAL and you must call the StartArchive method of the OpenTok object to start archiving. To archive the session (either automatically or not), you must set the mediaMode parameter to MediaMode.ROUTED
Returns
A Session object representing the new session. The Session.Id property of the Session is the session ID, which uniquely identifies the session. You will use this session ID in the client SDKs to identify the session. For example, when using the OpenTok.js library, use the session ID when calling the OT.initSession() method (to initialize an OpenTok session).

◆ DeleteArchive()

void OpenTokSDK.OpenTok.DeleteArchive ( string  archiveId)

Deletes an OpenTok archive.

You can only delete an archive which has a status of "available" or "uploaded". Deleting an archive removes its record from the list of archives. For an "available" archive, it also removes the archive file, making it unavailable for download.

Parameters
archiveIdThe archive ID of the archive you want to delete.

◆ Dial()

void OpenTokSDK.OpenTok.Dial ( string  sessionId,
string  token,
string  sipUri,
DialOptions  options = null 
)

Connects a SIP platform to an OpenTok session.

For more information, including technical details and security considerations, see the the OpenTok SIP interconnect developer guide.

Parameters
sessionIdThe session ID corresponding to the session to which the user will connect.
tokenThe token for the session ID with which the SIP user will use to connect.
sipUriThe SIP URI to be used as destination of the SIP call initiated from OpenTok to your SIP platform. If the SIP URI contains a ​transport=tls​ header, the negotiation between OpenTok and the SIP endpoint will be done securely. Note that this will only apply to the negotiation itself, and not to the transmission of audio. If you also audio transmission to be encrypted, set the Secure property of the of the DialOptions object passed into the options parameter to ​true​. This is an example of setting sipUri for a secure call negotiation: "sip:user@sip.partner.com;transport=tls". This is an example of insecure call negotiation: "sip:user@sip.partner.com".
optionsOptional parameters for SIP dialing.

◆ DialAsync()

Task OpenTokSDK.OpenTok.DialAsync ( string  sessionId,
string  token,
string  sipUri,
DialOptions  options = null 
)

Connects a SIP platform to an OpenTok session.

For more information, including technical details and security considerations, see the the OpenTok SIP interconnect developer guide.

Also see OpenTok.Dial.

Parameters
sessionIdThe session ID corresponding to the session to which the user will connect.
tokenThe token for the session ID with which the SIP user will use to connect.
sipUriThe SIP URI to be used as destination of the SIP call initiated from OpenTok to your SIP platform. If the SIP URI contains a ​transport=tls​ header, the negotiation between OpenTok and the SIP endpoint will be done securely. Note that this will only apply to the negotiation itself, and not to the transmission of audio. If you also audio transmission to be encrypted, set the Secure property of the of the DialOptions object passed into the options parameter to ​true​. This is an example of setting sipUri for a secure call negotiation: "sip:user@sip.partner.com;transport=tls". This is an example of insecure call negotiation: "sip:user@sip.partner.com".
optionsOptional parameters for SIP dialing.

◆ DisableForceMute()

void OpenTokSDK.OpenTok.DisableForceMute ( string  sessionId)

Disables the active mute state of the session. After you call this method, new streams published to the session will no longer have audio muted.

After you call the ForceMuteAll method, any streams published after the call are published with audio muted. Call the DisableForceMute() method automatically muted.

Also see the DisableForceMuteAsync method.

Parameters
sessionIdThe session ID.
Exceptions
OpenTokArgumentExceptionThrown when the session ID is invalid.
OpenTokWebExceptionThrown when an HTTP error has occurred.

◆ DisableForceMuteAsync()

async Task OpenTokSDK.OpenTok.DisableForceMuteAsync ( string  sessionId)

Disables the active mute state of the session. After you call this method, new streams published to the session will no longer have audio muted.

After you call the ForceMuteAllAsync method, any streams published after the call are published with audio muted. Call the DisableForceMuteAsync() method automatically muted.

Also see the DisableForceMutec method.

Parameters
sessionIdThe session ID.
Exceptions
OpenTokArgumentExceptionThrown when the session ID is invalid.
OpenTokWebExceptionThrown when an HTTP error has occurred.

◆ ForceDisconnect()

void OpenTokSDK.OpenTok.ForceDisconnect ( string  sessionId,
string  connectionId 
)

Force a specific client to disconnect from an OpenTok session.

Parameters
sessionIdThe session ID corresponding to the session.
connectionIdThe connectionId of the connection in a session.

◆ ForceMuteAll()

void OpenTokSDK.OpenTok.ForceMuteAll ( string  sessionId,
string []  excludedStreamIds 
)

Forces all streams (except for an optional list of streams) in a session to mute published audio.

In addition to existing streams, any streams that are published after the call to this method are published with audio muted. You can remove the mute state of a session by calling the DisableForceMute method.

Also see the ForceMuteAllAsync and ForceMuteStream methods.

Parameters
sessionIdThe ID of session.
excludedStreamIdsThe stream IDs of streams that will not be muted.
Exceptions
OpenTokArgumentExceptionThrown when the session ID is invalid.
OpenTokWebExceptionThrown when an HTTP error has occurred.

◆ ForceMuteAllAsync()

async Task OpenTokSDK.OpenTok.ForceMuteAllAsync ( string  sessionId,
string []  excludedStreamIds 
)

Forces all streams (except for an optional list of streams) in a session to mute published audio.

In addition to existing streams, any streams that are published after the call to this method are published with audio muted. You can remove the mute state of a session by calling the DisableForceMuteAsync method.

Also see the ForceMuteAll and ForceMuteStreamAsync methods.

Parameters
sessionIdThe ID of session.
excludedStreamIdsThe stream IDs of streams that will not be muted.
Exceptions
OpenTokArgumentExceptionThrown when the session ID is invalid.
OpenTokWebExceptionThrown when an HTTP error has occurred.

◆ ForceMuteStream()

void OpenTokSDK.OpenTok.ForceMuteStream ( string  sessionId,
string  streamId 
)

Force the publisher of a specific stream to mute its published audio.

Also see the ForceMuteAll and ForceMuteStreamAsync methods.

Parameters
sessionIdThe session ID of the session that includes the stream.
streamIdThe stream ID.
Exceptions
OpenTokArgumentExceptionThrown when session or stream ID is invalid.
OpenTokWebExceptionThrown when an HTTP error has occurred.

◆ ForceMuteStreamAsync()

async Task OpenTokSDK.OpenTok.ForceMuteStreamAsync ( string  sessionId,
string  streamId 
)

Force the publisher of a specific stream to mute its published audio.

Also see the ForceMuteAll and ForceMuteStream methods.

Parameters
sessionIdThe session ID of the session that includes the stream.
streamIdThe stream ID.
Exceptions
OpenTokArgumentExceptionThrown when session or stream ID is invalid.
OpenTokWebExceptionThrown when an HTTP error has occurred.

◆ GenerateToken()

string OpenTokSDK.OpenTok.GenerateToken ( string  sessionId,
Role  role = Role.PUBLISHER,
double  expireTime = 0,
string  data = null,
List< string >  initialLayoutClassList = null 
)

Creates a token for connecting to an OpenTok session. In order to authenticate a user connecting to an OpenTok session, the client passes a token when connecting to the session.

For testing, you can also generate test tokens by logging in to your Vonage Video API account.

Parameters
sessionIdThe session ID corresponding to the session to which the user will connect.
roleThe role for the token. Valid values are defined in the Role enum:
  • Role.SUBSCRIBER (A subscriber can only subscribe to streams)
  • Role.PUBLISHER (A publisher can publish streams, subscribe to streams, and signal. (This is the default value if you do not specify a role.))
  • Role.MODERATOR (In addition to the privileges granted to a publisher, a moderator can perform moderation functions, such as forcing clients to disconnect, to stop publishing streams, or to mute audio in published streams. See the Moderation developer guide.
expireTimeThe expiration time of the token, in seconds since the UNIX epoch. Pass in 0 to use the default expiration time of 24 hours after the token creation time. The maximum expiration time is 30 days after the creation time.
dataA string containing connection metadata describing the end-user. For example, you can pass the user ID, name, or other data describing the end-user. The length of the string is limited to 1000 characters. This data cannot be updated once it is set.
initialLayoutClassListA list of strings values containing the initial layout for the stream.
Returns

◆ GetArchive()

Archive OpenTokSDK.OpenTok.GetArchive ( string  archiveId)

Gets an Archive object for the given archive ID.

Parameters
archiveIdThe archive ID.
Returns
The Archive object.

◆ GetBroadcast()

Broadcast OpenTokSDK.OpenTok.GetBroadcast ( string  broadcastId)

Use this method to get a live streaming broadcast object of an OpenTok session.

For more information on broadcasting, see the Broadcast developer guide.

Parameters
broadcastIdThe broadcast ID of the broadcasting session
Returns
The Broadcast object. This object includes properties defining the broadcast, including the broadcast ID.

◆ GetStream()

Stream OpenTokSDK.OpenTok.GetStream ( string  sessionId,
string  streamId 
)

Gets a Stream object for the given stream ID.

Parameters
sessionIdThe session ID of the OpenTok session.
streamIdThe stream ID.
Returns
The Stream object.

◆ ListArchives()

ArchiveList OpenTokSDK.OpenTok.ListArchives ( int  offset = 0,
int  count = 0,
string  sessionId = "" 
)

Returns a List of Archive objects, representing archives that are both both completed and in-progress, for your API key.

Parameters
offsetThe index offset of the first archive. 0 is offset of the most recently started archive. 1 is the offset of the archive that started prior to the most recent archive.
countThe number of archives to be returned. The maximum number of archives returned is 1000.
sessionIdThe session ID.
Returns
A List of Archive objects.

◆ ListStreams()

StreamList OpenTokSDK.OpenTok.ListStreams ( string  sessionId)

Returns a List of Stream objects, representing streams that are in-progress, for the session ID.

Parameters
sessionIdThe session ID corresponding to the session.
Returns
A List of Stream objects.

◆ PlayDTMF()

void OpenTokSDK.OpenTok.PlayDTMF ( string  sessionId,
string  digits,
string  connectionId = null 
)

Send DTMF digits to all participants in an active OpenTok session or to a specific client connected to that session.

Parameters
sessionIdThe session ID corresponding to the session that will receive the DTMF string.
connectionIdThe connection connection ID of the client you are sending the DTMF signal to. Leave this empty to send a DTMF signal to all clients connected to the session.
digitsThis is the string of DTMF digits to send. This can include 0-9, '*', '#', and 'p'. A p indicates a pause of 500ms (if you need to add a delay in sending the digits).

◆ PlayDTMFAsync()

Task OpenTokSDK.OpenTok.PlayDTMFAsync ( string  sessionId,
string  digits,
string  connectionId = null 
)

Send DTMF digits to all participants in an active OpenTok session or to a specific client connected to that session.

Parameters
sessionIdThe session ID corresponding to the session that will receive the DTMF string.
connectionIdThe connection connection ID of the client you are sending the DTMF signal to. Leave this empty to send a DTMF signal to all clients connected to the session.
digitsThis is the string of DTMF digits to send. This can include 0-9, '*', '#', and 'p'. A p indicates a pause of 500ms (if you need to add a delay in sending the digits).

◆ SetArchiveLayout()

bool OpenTokSDK.OpenTok.SetArchiveLayout ( string  archiveId,
ArchiveLayout  layout 
)

Allows you to Dynamically change the layout of a composed archive while it's being recorded see Customizing the video layout for composed archives for details regarding customizing a layout.

Parameters
archiveId
layout
Returns

◆ SetBroadcastLayout()

void OpenTokSDK.OpenTok.SetBroadcastLayout ( string  broadcastId,
BroadcastLayout  layout 
)

Sets the layout type for the broadcast. For a description of layout types, see Configuring the video layout for OpenTok live streaming broadcasts.

Parameters
broadcastIdThe broadcast ID of the broadcasting session.
layoutThe BroadcastLayout that defines layout options for the broadcast.

◆ SetDefaultRequestTimeout()

void OpenTokSDK.OpenTok.SetDefaultRequestTimeout ( int  timeout)

Set's the default request timeout (in milliseconds) for all WebRequest's sent by the SDK

Parameters
timeout

◆ SetStreamClassLists()

void OpenTokSDK.OpenTok.SetStreamClassLists ( string  sessionId,
List< StreamProperties streams 
)

Sets the layout class list for streams in a session. Layout classes are used in the layout for composed archives and live streaming broadcasts. For more information, see Customizing the video layout for composed archives and Configuring video layout for OpenTok live streaming broadcasts.

You can set the initial layout class list for streams published by a client when you generate used by the client. See the GenerateToken method.

Parameters
sessionIdThe sessionId
streamsA list of StreamsProperties that defines class lists for one or more streams in the session.

◆ Signal()

void OpenTokSDK.OpenTok.Signal ( string  sessionId,
SignalProperties  signalProperties,
string  connectionId = null 
)

Sends a signal to clients (or a specific client) connected to an OpenTok session.

Parameters
sessionIdThe OpenTok sessionId where the signal will be sent.
signalPropertiesThis signalProperties defines the payload for the signal.
connectionIdAn optional parameter used to send the signal to a specific connection in a session.

◆ StartArchive()

Archive OpenTokSDK.OpenTok.StartArchive ( string  sessionId,
string  name = "",
bool  hasVideo = true,
bool  hasAudio = true,
OutputMode  outputMode = OutputMode.COMPOSED,
string  resolution = null,
ArchiveLayout  layout = null 
)

Starts archiving an OpenTok session.

Clients must be actively connected to the OpenTok session for you to successfully start recording an archive.

You can only record one archive at a time for a given session. You can only record archives of sessions that uses the OpenTok Media Router (sessions with the media mode set to routed); you cannot archive sessions with the media mode set to relayed.

Note that you can have the session be automatically archived by setting the archiveMode parameter of the CreateSession method to ArchiveMode.ALWAYS.

Parameters
sessionIdThe session ID of the OpenTok session to archive.
nameThe name of the archive. You can use this name to identify the archive. It is a property of the Archive object, and it is a property of archive-related events in the OpenTok client libraries.
hasVideoWhether the archive will record video (true) or not (false). The default value is true (video is recorded). If you set both hasAudio and hasVideo to false, the call to the StartArchive method results in an error.
hasAudioWhether the archive will record audio (true) or not (false). The default value is true (audio is recorded). If you set both hasAudio and hasVideo to false, the call to the StartArchive method results in an error.
outputModeWhether all streams in the archive are recorded to a single file (OutputMode.COMPOSED, the default) or to individual files (OutputMode.INDIVIDUAL).
resolutionThe resolution for the archive. The default for OutputMode.COMPOSED is "640x480". You cannot specify the resolution for OutputMode.INDIVIDUAL.
layoutThe layout that you want to use for your archive. If type is set to LayoutType.custom you must provide a StyleSheet string to Vonage how to layout your archive.
Returns
The Archive object. This object includes properties defining the archive, including the archive ID.

◆ StartBroadcast()

Broadcast OpenTokSDK.OpenTok.StartBroadcast ( string  sessionId,
Boolean  hls = true,
List< Rtmp rtmpList = null,
string  resolution = null,
int  maxDuration = 7200,
BroadcastLayout  layout = null 
)

Use this method to start a live streaming for an OpenTok session. This broadcasts the session to an HLS (HTTP live streaming) or to RTMP streams.

To successfully start broadcasting a session, at least one client must be connected to the session.

You can only have one active live streaming broadcast at a time for a session (however, having more than one would not be useful). The live streaming broadcast can target one HLS endpoint and up to five RTMP servers simultaneously for a session. You can only start live streaming for sessions that use the OpenTok Media Router (with the media mode set to routed); you cannot use live streaming with sessions that have the media mode set to relayed OpenTok Media Router. See The OpenTok Media Router and media modes.

For more information on broadcasting, see the Broadcast developer guide.

Parameters
sessionIdThe session ID corresponding to the session.
hlsWhether to include an HLS broadcast.
rtmpListA list of Rtmp objects, defining RTMP streams to be broadcast (up to five).
resolutionThe resolution of the broadcast video. This can be set to either "640x480" or "1280x720".
maxDurationThe maximum duration for the broadcast, in seconds. The broadcast will automatically stop when the maximum duration is reached. You can set the maximum duration to a value from 60 (60 seconds) to 36000 (10 hours). The default maximum duration is 2 hours (7,200 seconds).
layoutSpecify this BroadcastLayout object to assign the initial layout type for the broadcast.
Returns
The Broadcast object. This object includes properties defining the archive, including the archive ID.

◆ StopArchive()

Archive OpenTokSDK.OpenTok.StopArchive ( string  archiveId)

Stops an OpenTok archive that is being recorded.

Archives automatically stop recording after 120 minutes or when all clients have disconnected from the session being archived.

Parameters
archiveIdThe archive ID of the archive you want to stop recording.
Returns
The Archive object corresponding to the archive being STOPPED.

◆ StopBroadcast()

Broadcast OpenTokSDK.OpenTok.StopBroadcast ( string  broadcastId)

Use this method to stop a live broadcast of an OpenTok session. Note that broadcasts automatically stop 120 minutes after they are started.

For more information on broadcasting, see the Broadcast developer guide.

Parameters
broadcastIdThe broadcast ID of the broadcasting session
Returns
The Broadcast object. This object includes properties defining the broadcast, including the broadcast ID.

Property Documentation

◆ ApiKey

int OpenTokSDK.OpenTok.ApiKey

The OpenTok API key passed into the OpenTok() constructor.

◆ ApiSecret

string OpenTokSDK.OpenTok.ApiSecret

The OpenTok API secret passed into the OpenTok() constructor.

◆ Client

HttpClient OpenTokSDK.OpenTok.Client

For internal use

◆ Debug

bool OpenTokSDK.OpenTok.Debug

Enables writing request/response details to console. Don't use in a production environment.