TVIVideoConstraints Class Reference

Inherits from NSObject
Declared in TVIVideoConstraints.h

Overview

Use this class in conjunction with TVILocalVideoTrack to customize video capture for your use case. See TVICameraCapturer.h for size and frame rate presets which pair well with that capturer. Note that TVIVideoConstraints is used to resolve the capture format, but the actual video sent to Participants may be downscaled temporally or spatially in response to network and device conditions.

+ constraints

The default video constraints.

+ (null_unspecified instancetype)constraints

Return Value

Video constraints.

Discussion

The default video constraints are determined based upon your device model. For 64-bit devices the default is 640x480x30. If you are using an older A5 device then 480x360x15 is returned, and for A5x, and A6 devices 480x360x20 is used instead.

Declared In

TVIVideoConstraints.h

+ constraintsWithBlock:

Construct TVIVideoConstraints using the builder pattern.

+ (null_unspecified instancetype)constraintsWithBlock:(nonnull TVIVideoConstraintsBuilderBlock)builderBlock

Parameters

builderBlock

You can pass video constraints to the builder using this block. The builder will construct a TVIVideoConstraints instance using the options that you provided.

Return Value

Video Constraints

Declared In

TVIVideoConstraints.h

  maxSize

Specifies the maximum size for your video in native input coordinates (think landscape for TVICameraCapturer).

@property (nonatomic, assign, readonly) CMVideoDimensions maxSize

Discussion

Each dimension must be divisible by 8.

Declared In

TVIVideoConstraints.h

  minSize

Specifies the minimum size for your video in native input coordinates.

@property (nonatomic, assign, readonly) CMVideoDimensions minSize

Discussion

Defaults to {0,0}, which indicates no minimum video size. Set this property if you wish to choose a size within the range of minSize and maxSize.

Declared In

TVIVideoConstraints.h

  maxFrameRate

Specifies the maximum frame rate of your video (frames per second).

@property (nonatomic, assign, readonly) NSUInteger maxFrameRate

Discussion

Frame rates are capped at TVIVideoConstraintsMaximumFPS.

Declared In

TVIVideoConstraints.h

  minFrameRate

Specifies the minimum frame rate of your video (frames per second).

@property (nonatomic, assign, readonly) NSUInteger minFrameRate

Discussion

Defaults to no minimum value.

Declared In

TVIVideoConstraints.h

  aspectRatio

Specifies the aspect ratio of your video.

@property (nonatomic, assign, readonly) TVIAspectRatio aspectRatio

Declared In

TVIVideoConstraints.h