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.

Getting basic stream information

  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) OTConnection *connection

Declared In

OTStream.h

  session

The session (an OTSession object) the stream is bound to.

@property (readonly) OTSession *session

Declared In

OTStream.h

  streamId

The unique ID of the stream.

@property (readonly) NSString *streamId

Declared In

OTStream.h

  creationTime

The timestamp for the creation of the stream on the OpenTok media server.

@property (readonly) NSDate *creationTime

Declared In

OTStream.h

  name

The name of the stream. In the OpenTok iOS SDK, you can specify a published stream’s name when you when you sent the [OTPublisherKit initWithDelegate:settings:] message.

@property (readonly) NSString *name

Declared In

OTStream.h

Getting audio and video information

  hasAudio

Whether the stream is publishing audio (YES) or not (NO). See [OTPublisherKit publishAudio] and [OTSubscriberKit subscribeToAudio].

@property (readonly) BOOL hasAudio

Declared In

OTStream.h

  hasVideo

Whether the stream is publishing video (YES) or not (NO). See [OTPublisherKit publishVideo] and [OTSubscriberKit subscribeToVideo].

@property (readonly) BOOL hasVideo

Declared In

OTStream.h

  hasCaptions

Whether the stream is publishing captions (YES) or not (NO). See [OTPublisherKit publishCaptions] and [OTSubscriberKit subscribeToCaptions].

@property (readonly) BOOL hasCaptions

Declared In

OTStream.h

  videoDimensions

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, or a change in video resolution occurs.

@property (readonly) CGSize videoDimensions

Discussion

For streams that use the scalable video feature, this is set to the maximum resolution available for the stream. For more information on scalable video, see the documentation for the OpenTok Media Router.

Declared In

OTStream.h

  videoType

Specifies the type of video for this stream.

@property (readonly) OTStreamVideoType videoType

Discussion

This property is set one of the following values:

  • OTStreamVideoTypeScreen — The stream’s video encoding is optimized for screen sharing.

  • OTStreamVideoTypeCamera — The stream is not optimized for screen sharing (for example, it uses a camera as the video source).

  • OTStreamVideoTypeCustom — The custom stream video type applies only to Web generated streams.

For more information, see [OTPublisherKit videoType].

Declared In

OTStream.h