Suggestions

close search

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

Visit the Vonage API Developer Portal

OpenTok.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...

Inherits IDisposable.

Public Member Functions

void Dispose ()
 Disposes of the Stream object's resources. More...
override bool Equals (object obj)
override int GetHashCode ()

Protected Member Functions

virtual void Dispose (bool disposing)

Properties

string Id [get]
 The unique identifier for this stream. More...
string Name [get]
 The name of the stream. You can display this name to identify the stream's publisher. More...
bool HasCaptions [get]
 Whether this stream has captions (true) or not (false). More...
bool HasAudio [get]
 Whether audio is enabled (true) or disabled (false) in the stream. Add an event listener for the Session.StreamHasAudioChanged event to detect changes in the HasAudio property. More...
bool HasVideo [get]
 Whether video is enabled (true) or disabled (false) in the stream. Add an event listener for the Session.StreamHasVideoChanged event to detect changes in the HasVideo property. More...
int Width [get]
 The width of the video in this stream. Add an event listener for the Session.StreamDimensionsChanged event to detect changes in the Height or Width properties. More...
int Height [get]
 The height of the video in this stream. Add an event listener for the Session.StreamDimensionsChanged event to detect changes in the Width or Height properties. More...
DateTime CreationTime [get]
 The creation time of this stream. More...
VideoSourceType VideoSourceType [get]
 The video source type of the stream (camera, screen, custom), as defined by the OpenTok.VideoSourceType enum. More...
Connection Connection [get]
 The Connection object corresponding to the client that is publishing the stream. You can always use this to retrieve the connection even beyond the scope of the callback where this Stream object was received. More...

Detailed Description

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.

The Session object sends the Session.StreamReceived event when there is a new stream in the session. This object only represents the stream at the moment of the callback.

The Session sends a Session.StreamDropped event when a stream is dropped from the session (for example, when it is unpublished). Again, this instance only represents the stream at the moment of the callback.

Member Function Documentation

◆ Dispose()

void OpenTok.Stream.Dispose ( )

Disposes of the Stream object's resources.

Property Documentation

◆ Connection

Connection OpenTok.Stream.Connection

The Connection object corresponding to the client that is publishing the stream. You can always use this to retrieve the connection even beyond the scope of the callback where this Stream object was received.

◆ CreationTime

DateTime OpenTok.Stream.CreationTime

The creation time of this stream.

◆ HasAudio

bool OpenTok.Stream.HasAudio

Whether audio is enabled (true) or disabled (false) in the stream. Add an event listener for the Session.StreamHasAudioChanged event to detect changes in the HasAudio property.

◆ HasCaptions

bool OpenTok.Stream.HasCaptions

Whether this stream has captions (true) or not (false).

◆ HasVideo

bool OpenTok.Stream.HasVideo

Whether video is enabled (true) or disabled (false) in the stream. Add an event listener for the Session.StreamHasVideoChanged event to detect changes in the HasVideo property.

◆ Height

int OpenTok.Stream.Height

The height of the video in this stream. Add an event listener for the Session.StreamDimensionsChanged event to detect changes in the Width or Height properties.

◆ Id

string OpenTok.Stream.Id

The unique identifier for this stream.

◆ Name

string OpenTok.Stream.Name

The name of the stream. You can display this name to identify the stream's publisher.

◆ VideoSourceType

VideoSourceType OpenTok.Stream.VideoSourceType

The video source type of the stream (camera, screen, custom), as defined by the OpenTok.VideoSourceType enum.

◆ Width

int OpenTok.Stream.Width

The width of the video in this stream. Add an event listener for the Session.StreamDimensionsChanged event to detect changes in the Height or Width properties.