STSStreamingPrepareConfig
@interface STSStreamingPrepareConfig : NSObject
A STSStreamingPrepareConfig object defines the prepare configuration of the stream manager.
-
The target size of the output video. Defaults to
CGSizeZero
. The width and height should both be the positive even number. If this property is set toCGSizeZero
, the output video size will be calculated by the streaming manager according to propertyfitAllCamera
,maxResolution
and the aspect ratio of the preview view.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) CGSize targetOutputSize;
Swift
var targetOutputSize: CGSize { get set }
-
A boolean value indicates if the size of the output video should fit all available cameras on the device. Defaults to
YES
. This property will be used only whentargetOutputSize
is equal toCGSizeZero
. If this property is set toNO
, the output video size will be limited by the max resolution of the current camera. If this property is set toYES
, the output video size will be limited by the max resolution of all available cameras.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) BOOL fitAllCamera;
Swift
var fitAllCamera: Bool { get set }
-
The max resolution of the output video. Defaluts to
STSStreamingResolution720p
. Both the width and the height of the output video will be limited by this value. This property will be used only whentargetOutputSize
is equal toCGSizeZero
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) STSStreamingResolution maxResolution;
Swift
var maxResolution: STSStreamingResolution { get set }
-
The max video hieght of the output video. Defaluts to 720. The height of the output video will be limited by this value, and the width is limited by the calculated width based on
maxVideoHeight
and the aspect ratio of thepreviewView
inSTSStreamingManager
. This value is usually as same as theprofile
inSTSStreamingLiveEventConfig
if you create a live event by iOS client SDK. This property will be used only whentargetOutputSize
is equal toCGSizeZero
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) NSUInteger maxVideoHeight;
Swift
var maxVideoHeight: UInt { get set }
-
The orientation of the output video. Defaults to
UIInterfaceOrientationPortrait
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) UIInterfaceOrientation outputImageOrientation;
Swift
var outputImageOrientation: Int32 { get set }
-
The maximum video bitrate in bits per second. By default, no value is set and the SDK calculates the maximum bitrate automatically using an algorithm which considers the output video size. We recommend to set maxVideoBitrate to at least more than 100000.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) NSNumber *_Nonnull maxVideoBitrate;
Swift
var maxVideoBitrate: NSNumber { get set }