TVILocalVideoTrack Class Reference

Inherits from TVIVideoTrack : TVITrack : NSObject
Declared in TVILocalVideoTrack.h

Overview

TVILocalVideoTrack represents local video produced by a TVIVideoCapturer.

  trackId

A unique identifier for the TVILocalVideoTrack.

@property (nonatomic, copy, readonly, nonnull) NSString *trackId

Discussion

The trackId is generated by the Client. The Server assigns a SID for the track publication.

Declared In

TVILocalVideoTrack.h

  enabled

Indicates if track is enabled.

@property (nonatomic, assign, getter=isEnabled) BOOL enabled

Discussion

It is possible to enable and disable local tracks. The results of this operation are signaled to other Participants in the same Room. When a video track is disabled, black frames are sent in place of normal video.

Declared In

TVILocalVideoTrack.h

  capturer

The capturer that is associated with this track.

@property (nonatomic, strong, readonly, nonnull) id<TVIVideoCapturer> capturer

Declared In

TVILocalVideoTrack.h

  constraints

The video constraints.

@property (nonatomic, strong, readonly, nonnull) TVIVideoConstraints *constraints

Declared In

TVILocalVideoTrack.h

– init

Developers shouldn’t initialize this class directly.

- (null_unspecified instancetype)init

Discussion

Use trackWithCapturer: or trackWithCapturer:enabled:constraints:name: to create a TVILocalVideoTrack.

Declared In

TVILocalVideoTrack.h

+ trackWithCapturer:

Creates a TVILocalVideoTrack with a TVIVideoCapturer.

+ (nullable instancetype)trackWithCapturer:(nonnull id<TVIVideoCapturer>)capturer

Parameters

capturer

A TVIVideoCapturer which will provide the content for this Track.

Return Value

A Track which is ready to be shared with Participants in a Room, or nil if an error occurs.

Discussion

This method allows you to provide a TVIVideoCapturer, and uses the default TVIVideoConstraints.

Declared In

TVILocalVideoTrack.h

+ trackWithCapturer:enabled:constraints:name:

Creates a TVILocalVideoTrack with a TVIVideoCapturer, TVIVideoConstraints and an enabled setting.

+ (nullable instancetype)trackWithCapturer:(nonnull id<TVIVideoCapturer>)capturer enabled:(BOOL)enabled constraints:(nullable TVIVideoConstraints *)constraints name:(nullable NSString *)name

Parameters

capturer

A TVIVideoCapturer which will provide the content for this Track.

enabled

Determines if the Track is enabled at creation time.

constraints

A TVIVideoConstraints which specifies requirements for video capture.

name

The Track name.

Return Value

A Track which is ready to be shared with Participants in a Room, or nil if an error occurs.

Discussion

This method allows you to provide specific TVIVideoConstraints, and produce a disabled Track if you wish.

Declared In

TVILocalVideoTrack.h