Classes
struct AudioData
Defines several parameters related to an audio sample batch. More...
class AudioDevice
A class that includes methods for setting the audio device to be used by publishers and subscribers. More...
class AudioDeviceSettings
Defines the settings retrieved from the IAudioDevice.GetAudioCapturerSettings() and IAudioDevice.GetAudioRendererSettings() methods. More...
class AudioTransformer
Defines an audio transformation to be used in the Publisher.AudioTransformers array. More...
class Capabilities
Defines values for the Capabilities property of a Session object, based on the role assigned to the token used to connect to the session. More...
class Connection
Represents a connection between a client and an Vonage Video API session. More...
class Context
Used to manage resources for Session, Publisher, and Subscriber objects. More...
class DedicatedWorkerDispatcher
Implementation of IDispatcher that uses a dedicated worker thread to deliver events. Available for all presentation frameworks (WinForms, WPF, etc.). Delivery order is guaranteed. Each instance of this IDispatcher uses a different thread so if using the same queue is required, create only one instance of DedicatedWorkerDispatcher and pass it around to every OpenTok object that accepts an IDispatcher. CPU-intensive or long-running tasks can be executed in the event handlers, as the dedicated thread is not used for any other purpose. UI can't be manipulated directly in the event handlers. If this is required, events must be dispatched first to the UI thread. More...
class DirectDispatcher
Implementation of IDispatcher that doesn't schedule events at all. It uses the same thread used by the lower layer to deliver events. Available for all presentation frameworks (WinForms, WPF, etc.). Delivery order is guaranteed. Since this is a No-Op IDispatcher, it doesn't matter whether the same DirectDispatcher is always used or a new one is created every time. CPU-intensive or long-running tasks should not be executed in the event handlers, as they would block the native API main thread and affect performance or responsiveness. Also, calling the otkit API functions directly from the event handlers can result in interlocking, so if that's required, first re-scheduled the execution to a different thread. UI can't be manipulated directly in the event handlers. If this is required, events must be scheduled first to the UI thread. IMPORTANT: This type of IDispatcher leaves a lot of responsibility to the application which must not block the calling thread and cannot make any calls to the API directly, requiring a re-scheduling first. At the same time, it provides much more control on how the application handles the callbacks, avoiding re-scheduling where not needed or managing priorities for different types of events. This can result in better performance for the application. More...
interface IAudioDevice
Defines an Audio device to be used by all publishers and subscribers. More...
class IceConfig
A class for setting custom ICE configuration. More...
struct IceServer
Defines the object to add to the List for the CustomIceServers property of the IceConfig class. More...
interface ICustomAudioTransformer
Interface used to define a custom audio transformer to be used in the AudioTransformer(string name, ICustomAudioTransformer transformer) constructor. More...
interface ICustomVideoTransformer
Interface used to define a custom vidoe transformer to be used in used in the VideoTransformer.VideoTransformer(string name, ICustomVideoTransformer transformer) constructor. More...
interface IDispatcher
Interface for a class used by Session, Publisher, and Subscriber instances to schedule events to a different thread. More...
interface IVideoCapturer
interface IVideoFrameConsumer
Defines a video frame consumer to be used by the VideoCapturer of a Publisher. More...
interface IVideoRenderer
Defines a video renderer to be used by a Publisher or Subscriber object. More...
class Logger
Helper class that allows setting log level used by the SDK optionally providing a custom callback for log handling. This class provides a safer way manage native logging than directly invoking the native C API via DllImport. WARNING: DO call Disable() before closing the application to avoid closing exceptions.
class MMAudioDevice
Custom audio device implementation based on mmdeviceapi. This custom audio device can be used instead of the default internal audio device provided by OpenTok.AudioDevice. More...
class OpenTokException
Defines errors thrown by the Vonage Video API Windows SDK. More...
class PreferredVideoCodecs
Defines a preferred video codec configuration for a Publisher's stream. More...
class Publisher
A publisher captures an audio-video stream from the sources you specify. More...
class Session
Represents an Vonage Video API session in which the client is participating. More...
class Stream
Represents the state of an audio-video stream in an Vonage Video API session. To get the most updated information, use the Stream property of a Publisher or Subscriber before accessing any of the properties of the stream. More...
class Subscriber
Used to consume an audio-video stream in the Vonage Video API session. More...
class ThreadPoolDispatcher
Implementation of IDispatcher that uses different threads from the managed ThreadPool to deliver events. Available for all presentation frameworks (WinForms, WPF, etc.). Important: Delivery order is not guaranteed. All instances of ThreadPoolDispatcher dispatch events to the same thread pool, so it doesn't matter whether the same ThreadPoolDispatcher is always used or a new one is created every time an IDispatcher is required. CPU-intensive or long-running tasks can be executed in the event handlers, as the underlying thread pool system is prepared to handle this. UI can't be manipulated directly in the event handlers. If this is required, events must be scheduled first to the UI thread. More...
class VideoCapturer
A video capturer implementation that captures video from on of the cameras available on the system. More...
class VideoCaptureSettings
Defines the settings passed into the VideoCapturer.UpdateCaptureSettings(ref VideoCaptureSettings) method. More...
class VideoFrame
Defines a video frame for the IVideoRenderer.RenderFrame(VideoFrame) and IVideoFrameConsumer.Consume(VideoFrame) methods. More...
class VideoTransformer
Defines a video transformation to be used in the Publisher.VideoTransformers array. More...
class WinFormsDispatcher
Implementation of IDispatcher that uses the Windows Forms Main/UI thread to dispatch events. Available only for Windows Forms applications. Delivery order is guaranteed. All instances of WinFormsDispatcher dispatch events to the Main Application thread, so it doesn't matter whether the same WinFormsDispatcher is always used or a new one is created every time an IDispatcher is required. CPU-intensive or long-running tasks should not be executed in the handlers, as they would block the UI thread and affect performance or responsiveness. More...
class WPFDispatcher
Implementation of IDispatcher that uses the WPF Main/UI thread to dispatch events. Available only for WPF applications. Delivery order is guaranteed. All instances of WPFDispatcher dispatch events to the Main Application thread, so it doesn't matter whether the same WPFDispatcher is always used or a new one is created every time an IDispatcher is required. CPU-intensive or long-running tasks should not be executed in the handlers, as they would block the UI thread and affect performance or responsiveness. More...
Enumerations
enum ErrorCode : int {   UnknownError = -1 , GenericSDKError = 1 , AuthorizationFailure = 1004 , InvalidSessionId = 1005 ,   ConnectionFailed = 1006 , NoMessagingServer = 1503 , ConnectionRefused = 1023 , SessionStateFailed = 1020 ,   P2PSessionMaxParticipants = 1403 , SessionConnectionTimeout = 1021 , SessionInternalError = 2000 , SessionInvalidSignalType = 1461 ,   SessionSignalDataTooLong = 1413 , SessionSignalTypeTooLong = 1414 , ConnectionDropped = 1022 , SessionDisconnected = 1010 ,   PublisherInternalError = 2000 , PublisherWebRTCError = 1610 , PublisherUnableToPublish = 1500 , PublisherUnexpectedPeerConnectionDisconnection = 1710 ,   PublisherCannotAccessCamera = 1650 , PublisherCameraAccessDenied = 1670 , ConnectionTimedOut = 1542 , SubscriberWebRTCError = 1600 ,   SubscriberServerCannotFindStream = 1604 , SubscriberStreamLimitExceeded = 1605 , SubscriberInternalError = 2000 , UnknownPublisherInstance = 2003 ,   UnknownSubscriberInstance = 2004 , SessionNullOrInvalidParameter = 1011 , VideoCaptureFailed = 3000 , CameraFailed = 3010 ,   VideoRenderFailed = 4000 , SessionSubscriberNotFound = 1112 , SessionPublisherNotFound = 1113 , PublisherTimeout = 1541 ,   SessionBlockedCountry = 1026 , SessionConnectionLimitExceeded = 1027 , SessionUnexpectedGetSessionInfoResponse = 2001 , SessionIllegalState = 1015 ,   SessionUnableToForceDisconnect = 1520 , SessionUnableToForceMute = 1540 , SessionUnableToSendSignal = 1550 , EncryptionSecretMissing = 6000 ,   EncryptionInternalError = 6001 , DecryptionInternalError = 6002 , EncryptionSecretMismatch = 6003 , InvalidEncryptionSecret = 6004 ,   EncryptionUnsupportedCodec = 6005 , DecryptionUnsupportedCodec = 6006 , MediaTransformerInternalError = 0x0A000000 , MediaTransformerInvalidType ,   MediaTransformerNameNotProvided , MediaTransformerCustomCallbackNotProvided , MediaTransformerPropertiesNotProvided , MediaTransformerModelNotFound ,   MediaTransformerOpenTokTransformersLibraryNotLoaded , MediaTransformerOpenTokTransformersSymbolNotFound , OpenTokTransformersInternalError = 0x0B000000 , OpenTokTransformersInvalidParam ,   OpenTokTransformersNameNotProvided , OpenTokTransformersInvalidName , OpenTokTransformersPropertiesNotProvided , OpenTokTransformersInvalidPropertiesFormat ,   OpenTokTransformersModelFileNotFound , OpenTokTransformersRadiusPropertyNotProvided , OpenTokTransformersInvalidRadiusProperty , OpenTokTransformersCustomRadiusPropertyNotProvided ,   OpenTokTransformersInvalidCustomRadiusProperty , OpenTokTransformersImageFilePathPropertyNotProvided , OpenTokTransformersImageFilePathNotFound , OpenTokTransformersMlTransformerInitError }
Defines error code values for OpenTokException objects. More...
enum VideoContentHint : int { NONE = 0 , MOTION = 1 , DETAIL = 2 , TEXT = 3 }
Defines the settings passed into the VideoCapturer.SetVideoContentHint(VideoContentHint contentHint) method. More...
enum VideoSourceType : int { Camera = 1 , Screen = 2 , Custom = 3 }
Defines options for the Publisher.VideoSourceType property. More...
enum VideoBitratePreset : int { Default = 0 , BwSaver = 1 , ExtraBwSaver = 2 , Custom = 3 }
Defines preset strategies for controlling video bitrate in a publisher's stream (see Publisher.VideoBitratePreset). These presets allow applying predefined bandwidth strategies without manually specifying bitrates. Presets are mutually exclusive with manual bitrate configuration. More...
enum DegradationPreference : int {   NotSet = -1 , MaintainFrameRateAndResolution = 0 , MaintainFrameRate = 1 , MaintainResolution = 2 ,   Balanced = 3 }
Describes the policy that the video engine will try to follow when adapting frame rate and resolution to limited bandwidth and CPU. This is a best effort policy. There are no guarantees on the frame rate and some frames can still be skipped for other reasons. More...
enum ICEIncludeServers : int { All = 0 , Custom = 1 }
Defines values for the IncludeServers property of the IceConfig class. More...
enum ICETransport : int { All = 0 , Relayed = 1 }
Defines values for the TransportPolicy property of the IceConfig class. More...
enum PixelFormat : int {   Unknown = 0 , FormatYuv420p = 1 , FormatNv12 = 2 , FormatNv21 = 3 ,   FormatYuy2 = 4 , FormatUyvy = 5 , FormatArgb32 = 6 , FormatBgra32 = 7 ,   FormatRgb24 = 8 , FormatAbgr32 = 9 , FormatMjpeg = 10 , FormatRgba32 = 11 }
The format of a video frame. More...
Functions
delegate void OnFrame (IntPtr frame)

Enumeration Type Documentation

DegradationPreference

Describes the policy that the video engine will try to follow when adapting frame rate and resolution to limited bandwidth and CPU. This is a best effort policy. There are no guarantees on the frame rate and some frames can still be skipped for other reasons.

For details, see Degradation Preference.

Enumerator
NotSet Default value. The video engine will decide the optimal degradation preference.
MaintainFrameRateAndResolution The video engine will not reduce the resolution and will try to keep the frame rate steady. In some versions of the standard this option is referred to as "DISABLED", meaning that no degradation will be applied at all when under limited resources.
MaintainFrameRate The video engine will try to keep the frame rate steady but might reduce resolution if necessary.
MaintainResolution The video engine will not reduce the resolution but might reduce the frame rate if necessary.
Balanced The video engine will try to reach a balance between reducing resolution and frame rate when necessary.

ErrorCode

enum OpenTok.ErrorCode : int

Defines error code values for OpenTokException objects.

Enumerator
UnknownError Used for an unknown error.
GenericSDKError Used for generic error. See provided error description.
AuthorizationFailure An invalid API key or token was provided.
InvalidSessionId Unable to connect: an invalid session ID was provided.
ConnectionFailed The session failed to connect.
NoMessagingServer There was an error connecting to the OpenTok messaging server.
ConnectionRefused A socket could not be opened to OpenTok the messaging server. Check that outbound ports 443 and 8080 are accessible.
SessionStateFailed The connection timed out while attempting to get the session's state. Check the network connection.
P2PSessionMaxParticipants A peer-to-peer enabled session can only have two participants.
SessionConnectionTimeout The connection timed out while attempting to connect to the session. Check the network connection.
SessionInternalError Internal error connecting to the session. Try connecting again.
SessionInvalidSignalType Invalid signal type.
SessionSignalDataTooLong Invalid signal – the data string is too long. The maximum length is 8196.
SessionSignalTypeTooLong Invalid signal – the type string is too long. The maximum length is 128.
ConnectionDropped The connection to the OpenTok messaging server was dropped. Check the network connection.
SessionDisconnected Attempting to publish to a disconnected session.
PublisherInternalError Internal error when publishing. Try publishing again.
PublisherWebRTCError Publisher WebRTC failure.
PublisherUnableToPublish The publisher is unable to publish.
PublisherUnexpectedPeerConnectionDisconnection The PeerConnection for the publisher's stream unexpectedly disconnected.
PublisherCannotAccessCamera The publisher cannot access the specified camera.
PublisherCameraAccessDenied The user denied access to the camera.
ConnectionTimedOut Subscriber timed out while attempting to connect to the stream. Try resubscribing to the stream.
SubscriberWebRTCError Subscriber WebRTC failure.
SubscriberServerCannotFindStream The subscriber failed due to the stream being missing. This can happen if the subscriber is created at the same time the stream is removed from the session.
SubscriberStreamLimitExceeded The subscriber failed due to the the limit to the number of subscribers the servers support.
SubscriberInternalError Internal error when subscribing. Try subscribing again.
UnknownPublisherInstance Cannot unpublish: An unknown Publisher instance was passed into the Session.Unpublish(Publisher) method.
UnknownSubscriberInstance Cannot unsubscribe: An unknown Subscriber instance was passed into the Session.Unsubscribe(Subscriber) method.
SessionNullOrInvalidParameter You passed an invalid parameter or the Session is null.
VideoCaptureFailed There was an error in the video capturer.
CameraFailed There was an error in acquiring video from the camera.
VideoRenderFailed There was an error in the video renderer.
SessionSubscriberNotFound The subscriber is unknown to this session. This is usually the result of calling Session.Unsubscribe(Subscriber) with a subscriber that is not associated with the session.
SessionPublisherNotFound The publisher is unknown to this session. This is usually the result of calling Session.Unpublish(Publisher) with a publisher that is not publishing a stream to the session.
PublisherTimeout Timeout while attempting to publish.
SessionBlockedCountry Unable to connect to the session. Terms of service violation: export compliance.
SessionConnectionLimitExceeded The connection failed due to the the limit to the number of connections the servers support.
SessionUnexpectedGetSessionInfoResponse Unable to connect to the session. Try connecting again.
SessionIllegalState Unable to connect to a session that is already connected. Or unable to subscribe to a stream that is no longer in the session.
SessionUnableToForceDisconnect Unable to force disconnect, perhaps because the client's capabilities are limited.
SessionUnableToForceMute Unable to force mute, perhaps because the client's capabilities are limited.
SessionUnableToSendSignal Unable to send signal, perhaps because the client's capabilities are limited (e.g., a publisher-only token).
EncryptionSecretMissing Tried to join an end-to-end encrypted session without an encryption secret
EncryptionInternalError Internal error while encrypting a packet
DecryptionInternalError Internal error while decrypting a packet
EncryptionSecretMismatch Secret mismatch while decrypting a packet
InvalidEncryptionSecret Invalid encryption secret
EncryptionUnsupportedCodec Unsupported media codec for encryption
DecryptionUnsupportedCodec Unsupported media codec for decryption

ICEIncludeServers

Defines values for the IncludeServers property of the IceConfig class.

Enumerator
All The client will use OpenTok TURN servers in addition to the custom TURN servers you provide.
Custom The client will only use the custom TURN servers you provide.

ICETransport

Defines values for the TransportPolicy property of the IceConfig class.

Enumerator
All The client will use all ICE routing types (such as host, srflx, and TURN) to establish media connectivity.
Relayed The client will force connectivity through TURN always and ignore all other ICE /candidates.

PixelFormat

enum OpenTok.PixelFormat : int

The format of a video frame.

Enumerator
Unknown Unknown format.
FormatYuv420p YUV420p.
FormatNv12 NV12.
FormatNv21 NV21.
FormatYuy2 YUY2.
FormatUyvy UYVY.
FormatArgb32 32-bit ARGB
FormatBgra32 32-bit BGRA
FormatRgb24 24-bit RGB
FormatAbgr32 32-bit ABGR
FormatMjpeg M-JPEG.
FormatRgba32 32-bit RGBA

VideoBitratePreset

Defines preset strategies for controlling video bitrate in a publisher's stream (see Publisher.VideoBitratePreset). These presets allow applying predefined bandwidth strategies without manually specifying bitrates. Presets are mutually exclusive with manual bitrate configuration.

For details, see Publisher Max Bitrate.

Enumerator
Default Default preset. No extra restrictions are applied. This is the default mode.
BwSaver Bandwidth saver preset. Applies moderate constraints to reduce bandwidth usage while maintaining reasonable video quality.
ExtraBwSaver Extra bandwidth saver preset. Applies aggressive constraints to minimize bandwidth usage.
Custom Custom bitrate. Represents a manually configured bitrate set using the MaxVideoBitrate property. Returned for tracking purposes but cannot be set directly.

VideoContentHint

Defines the settings passed into the VideoCapturer.SetVideoContentHint(VideoContentHint contentHint) method.

Enumerator
NONE No hint is provided (the default).
MOTION The track should be treated as if it contains video where motion is important.
DETAIL The track should be treated as if video details are extra important. For example, you may use this setting for a stream that contains text content, painting, or line art.
TEXT The track should be treated as if video details are extra important, and that significant sharp edges and areas of consistent color can occur frequently. For example, you may use this settting for a stream that contains text content.

VideoSourceType

Defines options for the Publisher.VideoSourceType property.

Enumerator
Camera A camera video source.
Screen A screen-sharing video source.
Custom A custom video source. The custom stream video type applies only to Web generated streams.