TVILocalVideoTrack Class Reference

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

Overview

TVILocalVideoTrack represents local video produced by a TVIVideoCapturer.

  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

  )

The capturer that is associated with this track when using the TVIVideoCapturer based initializers.

@property (nonatomic, strong, readonly, nonnull) id<TVIVideoCapturer> capturer DEPRECATED_MSG_ATTRIBUTE ( "TVIVideoCapturer is deprecated. Use TVIVideoSource instead." )

Discussion

With the addition of the TVIVideoSource based API, this property would need to be nullable, however making that change would break SemVer compliance and would cause current Swift based appications to crash if accessing this property when a TVILocalVideoTrack is created with a TVIVideoSource object. Therefore, if a TVILocalVideoTrack is created using a TVIVideoSource object, accessing this property will return a placeholder object to maintain SemVer compliance.

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.

See Also

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

A name for the Track. Names are immutable and can only be provided at Track creation time.

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.

See Also

Declared In

TVILocalVideoTrack.h

  source

The video source that is associated with this track when using the TVIVideoSource based initializers.

@property (nonatomic, strong, readonly, nullable) id<TVIVideoSource> source

Declared In

TVILocalVideoTrack.h

+ trackWithSource:

Creates a TVILocalVideoTrack with a TVIVideoSource.

+ (nullable instancetype)trackWithSource:(nonnull id<TVIVideoSource>)source

Parameters

source

A TVIVideoSource 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

The Track will be enabled, and use a randomly generated name.

See Also

Declared In

TVILocalVideoTrack.h

+ trackWithSource:enabled:name:

Creates a TVILocalVideoTrack with a TVIVideoSource.

+ (nullable instancetype)trackWithSource:(nonnull id<TVIVideoSource>)source enabled:(BOOL)enabled name:(nullable NSString *)name

Parameters

source

A TVIVideoSource which will provide the content for this Track.

enabled

Determines if the Track is enabled at creation time.

name

A name for the Track. Names are immutable and can only be provided at Track creation time.

Return Value

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

Discussion

The Track will be enabled, and use a randomly generated name.

See Also

Declared In

TVILocalVideoTrack.h