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. | |
| 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. | |
| string | Name [get] |
| The name of the stream. You can display this name to identify the stream's publisher. | |
| bool | HasCaptions [get] |
Whether this stream has captions (true) or not (false). | |
| 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. | |
| 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. | |
| int | Width [get] |
| The width of the publisher's capturer target resolution, in pixels, as last signaled to the session. This value is broadcast to all session participants and is readable on both the publishing and subscribing clients. More... | |
| int | Height [get] |
| The height of the publisher's capturer target resolution, in pixels, as last signaled to the session. This value is broadcast to all session participants and is readable on both the publishing and subscribing clients. More... | |
| DateTime | CreationTime [get] |
| The creation time of this stream. | |
| VideoSourceType | VideoSourceType [get] |
| The video source type of the stream (camera, screen, custom), as defined by the OpenTok.VideoSourceType enum. | |
| 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. |
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.
Property Documentation
Height
The height of the publisher's capturer target resolution, in pixels, as last signaled to the session. This value is broadcast to all session participants and is readable on both the publishing and subscribing clients.
This value can change at runtime when the publisher changes the capture resolution, for example due to a device orientation change or a change in capture settings. Add an event listener for the Session.StreamDimensionsChanged event to detect changes in the Width or Height properties.
Note: This represents the publisher's capturer target resolution, not the resolution actually encoded or received by a subscriber. The publisher may encode at a lower resolution due to bandwidth or CPU constraints.
For streams published using the scalable video feature, this is set to the height of the maximum resolution available for the stream. For more information on scalable video, see the documentation for the OpenTok Media Router.
Width
The width of the publisher's capturer target resolution, in pixels, as last signaled to the session. This value is broadcast to all session participants and is readable on both the publishing and subscribing clients.
This value can change at runtime when the publisher changes the capture resolution, for example due to a device orientation change or a change in capture settings. Add an event listener for the Session.StreamDimensionsChanged event to detect changes in the Width or Height properties.
Note: This represents the publisher's capturer target resolution, not the resolution actually encoded or received by a subscriber. The publisher may encode at a lower resolution due to bandwidth or CPU constraints.
For streams published using the scalable video feature, this is set to the width of the maximum resolution available for the stream. For more information on scalable video, see the documentation for the OpenTok Media Router.