OTStream Class Reference
| Inherits from | NSObject |
| Declared in | OTStream.h |
Overview
An OTStream object represents a stream of multimedia, which may contain video and/or audio data.
Use OTStream instances to initialize OTSubscriber interfaces. Do not attempt to initialize an OTStream directly.
Tasks
Getting basic stream information
-
connectionThe OTConnection object corresponding to the connection that is publishing the stream. You can compare this to to the [OTSession connection] property to see if the stream is being published by the local device.
property -
sessionThe session (an OTSession object) the stream is bound to.
property -
streamIdThe unique ID of the stream.
property -
typeThe type of the stream. This value can be
property"basic"or"archive". The value"basic"identifies a stream published by a user connected to the session. The value"archive"identifies an archive stream (from an archive being played back). -
creationTimeThe timestamp for the creation of the stream on the OpenTok media server.
property -
nameThe name of the stream. In the OpenTok iOS SDK, you can specify a published stream’s name when you send the [OTPublisher initWithDelegate:name:] message.
property
Getting audio and video information
-
hasAudioWhether the stream is publishing audio (YES) or not (NO). See [OTPublisher publishAudio] and [OTSubscriber subscribeToAudio].
property -
hasVideoWhether the stream is publishing video (YES) or not (NO). See [OTPublisher publishVideo] and [OTSubscriber subscribeToVideo].
property -
videoDimensionsThe current dimensions of the video media track on this stream. This property can change if a stream published from an iOS device resizes, based on a change in the device orientation. When this occurs, the [OTSubscriberDelegate stream:didChangeVideoDimensions:] message is sent (for an OTSubscriber subscribing to the stream).
property
Properties
connection
The OTConnection object corresponding to the connection that is publishing the stream. You can compare this to to the [OTSession connection] property to see if the stream is being published by the local device.
@property (readonly, strong) OTConnection *connectionDeclared In
OTStream.hcreationTime
The timestamp for the creation of the stream on the OpenTok media server.
@property (readonly, strong) NSDate *creationTimeDeclared In
OTStream.hhasAudio
Whether the stream is publishing audio (YES) or not (NO). See [OTPublisher publishAudio] and [OTSubscriber subscribeToAudio].
@property (readonly) BOOL hasAudioDeclared In
OTStream.hhasVideo
Whether the stream is publishing video (YES) or not (NO). See [OTPublisher publishVideo] and [OTSubscriber subscribeToVideo].
@property (readonly) BOOL hasVideoDeclared In
OTStream.hname
The name of the stream. In the OpenTok iOS SDK, you can specify a published stream’s name when you send the [OTPublisher initWithDelegate:name:] message.
@property (readonly) NSString *nameDeclared In
OTStream.hsession
The session (an OTSession object) the stream is bound to.
@property (readonly) OTSession *sessionDeclared In
OTStream.hstreamId
The unique ID of the stream.
@property (readonly, strong) NSString *streamIdDeclared In
OTStream.htype
The type of the stream. This value can be "basic" or "archive".
The value "basic" identifies a stream published by a user connected to the session.
The value "archive" identifies an archive stream
(from an archive being played back).
@property (readonly) NSString *typeDeclared In
OTStream.hvideoDimensions
The current dimensions of the video media track on this stream. This property can change if a stream published from an iOS device resizes, based on a change in the device orientation. When this occurs, the [OTSubscriberDelegate stream:didChangeVideoDimensions:] message is sent (for an OTSubscriber subscribing to the stream).
@property (readonly) CGSize videoDimensionsDiscussion
This property is available for WebRTC only.
Declared In
OTStream.h