![]() |
AlivcLivePusher_Interactive v6.17.0
Aliyun Live Pusher Interactive SDK API Reference Manual for iOS Platforms
|
Class for live pusher engine configuration parameter settings. More...
#include "AlivcLivePushConfig.h"
Instance Methods | |
(void) | - addWatermarkWithPath:watermarkCoordX:watermarkCoordY:watermarkWidth: |
Add watermarks. | |
(NSArray< NSDictionary * > *) | - getAllWatermarks |
Query all watermarks key:watermarkPath value:The path of the watermark key:watermarkCoordX value:x key:watermarkCoordY value:y key:watermarkWidth value:width. | |
(CGSize) | - getPushResolution |
Query the width and height of the push stream. | |
(instancetype) | - initWithResolution: |
init Specify the resolution. | |
(void) | - removeWatermarkWithPath: |
Remove watermarks. | |
Properties | |
int | audioBitrate |
The audio bitrate. | |
AlivcLivePushAudioChannel | audioChannel |
The number of sound channels. | |
AlivcLivePushAudioEncoderCodec | audioEncoderCodec |
The audio encoder codec default : AlivcLivePushAudioEncoderCodecOpus. | |
AlivcLivePushAudioEncoderMode | audioEncoderMode |
The audio encoding mode default : AlivcLivePushAudioEncoderModeSoft. | |
AlivcLivePushAudioEncoderProfile | audioEncoderProfile |
The audio encoding format default : AlivcLivePushAudioEncoderProfile_AAC_LC. | |
BOOL | audioFromExternal |
Whether the external custom data contains audio default: YES. | |
bool | audioOnly |
Whether to enable audio-only stream push. | |
AlivcLivePushAudioSampleRate | audioSampleRate |
The audio sample rate. | |
AlivcLivePusherAudioScenario | audioScene |
The audio scenario default:AlivcLivePusherAudioScenarioMusicMode. | |
AlivcLivePusherAudioSessionOperationRestriction | audioSessionOperationRestriction |
The control permission of the SDK on AVAudioSession default : AlivcLivePusherAudioSessionOperationRestrictionNone. | |
bool | autoFocus |
Whether to enable autofocus default : true. | |
NSDictionary * | businessInfo |
The business information. | |
AlivcLivePushCameraType | cameraType |
The camera type. | |
int | connectRetryCount |
The number of reconnections. | |
float | connectRetryInterval |
The duration for reconnection. | |
bool | enableAutoBitrate |
Whether to enable adaptive bitrate streaming default : true. | |
bool | enableAutoResolution |
Whether to enable adaptive resolution (dynamic resolution) default : false. | |
BOOL | enableDataChannelMessage |
Open the data channel and receive a custom message default : false. | |
BOOL | enableExternSampleBufferSize |
When you set external custom data, if the aspect ratio of the video is not one of the values of AlivcLivePushResolution, you can configure enableExternSampleBufferSize so that the SDK uses the resolution specified by sampleBufferSize as the output resolution. | |
BOOL | enableHDPreview |
Whether to enable HD preview (In HD preview mode, adjusting the streaming resolution does not restart the collection) default : true. | |
BOOL | enableLocalVideoRawBuffer |
After enableLocalVideoTexture specifies the texture callback in interactive mode, enableLocalVideoRawBuffer can be set to enable the callback of video raw data, the format is I420. | |
BOOL | enableLocalVideoTexture |
when livePushMode is set to AlivcLivePushLiveMode, pixbuffer is called back by default, and texture callback can be specified by enableLocalVideoTexture | |
bool | enableNarrowbandAndHDForScreenPusher |
Whether to enable Narrowband HD™ that provides higher resolution with less bandwidth in scenarios where you stream screen recordings. | |
BOOL | enableRemoteVideoFrameObserver |
Remote video frame callback switch in interactive mode default : false. | |
BOOL | enableRTSForInteractiveMode |
bool | enableVideoCodecDowngrade |
Allow video encoding to automatically downgrade. | |
AlivcLivePushAudioFormat | externAudioFormat |
The external custom audio data default : unknown. | |
bool | externMainStream |
Whether to allow live pusher engine for external custom data. | |
AlivcLivePushVideoFormat | externVideoFormat |
The external custom video data default : unknown. | |
NSDictionary * | extras |
bool | flash |
Whether to turn on the flash default : false. | |
AlivcLivePushFPS | fps |
The frame rate for video capture defalut : AlivcLivePushFPS20. | |
BOOL | h5CompatibleMode |
Set H5 compatibility mode. | |
int | initialVideoBitrate |
The initial video bitrate default : 800. | |
AlivcLivePushMode | livePushMode |
The mode of the live pusher engine. | |
bool | macroFocus |
Macro focus, suitable for high-end models with multiple cameras, close-range shooting focus default : false. | |
AlivcLivePushFPS | minFps |
The minimum frame rate for video capture default : AlivcLivePushFPS8. | |
int | minVideoBitrate |
The minimum video bitrate default : 200. | |
AlivcLivePushMonitorLevel | monitorLevel |
The SDK quality monitoring level. | |
UIImage * | networkPoorImg |
The image used when the network is low. | |
bool | openBFrame |
Whether to support B-frames for video hardware encoding default:NO. | |
AlivcLivePushOrientation | orientation |
The direction for stream push: portrait, 90° landscape, and 270° landscape. | |
UIImage * | pauseImg |
The image used when live pusher engine is paused. | |
AlivcPusherPreviewDisplayMode | previewDisplayMode |
The preview mode default : ALIVC_LIVE_PUSHER_PREVIEW_ASPECT_FILL. | |
bool | previewMirror |
Whether to enable mirroring for preview. | |
bool | pushMirror |
Whether to enable mirroring for stream push. | |
AlivcLivePushQualityMode | qualityMode |
Set the live pusher engine quality mode. | |
BOOL | requireGLSharedContext |
Whether to enable the openGL Shared Context mode default : false. | |
AlivcLivePushResolution | resolution |
The resolution for the ingested stream. | |
CGSize | sampleBufferSize |
When you set external custom data, if the aspect ratio of the video is not one of the values of AlivcLivePushResolution, you can specify the aspect ratio of the input video as that of the output video to avoid cropping. | |
int | sendDataTimeout |
The timeout for data transmission. | |
int | targetVideoBitrate |
The video target bitrate default : 800. | |
bool | useAliyunPlayerForBGM |
Use ApsaraVideo Player to play background music. | |
NSString * | userName |
userName | |
AlivcLivePushVideoEncodeGOP | videoEncodeGop |
The keyframe interval default : AlivcLivePushVideoEncodeGOP_2. | |
AlivcLivePushVideoEncoderMode | videoEncoderMode |
The video encoding mode default : AlivcLivePushVideoEncoderModeHard. | |
AlivcLivePushVideoEncoderModeHardCodec | videoHardEncoderCodec |
The video hardware encoding format. | |
bool | videoOnly |
Video-only stream push is supported for RTMP, but not for RTC. | |
Class for live pusher engine configuration parameter settings.
- (void) addWatermarkWithPath: | (NSString *) | path | |
watermarkCoordX: | (CGFloat) | coordX | |
watermarkCoordY: | (CGFloat) | coordY | |
watermarkWidth: | (CGFloat) | ALIVCLIVEPUSH_DEPRECAETD_WATERMARK_API | |
Add watermarks.
You can add up to three watermarks
path | The path of the watermark |
coordX | The coordinate of the watermark along the x-axis relative to the vertex in the upper-left corner |
coordY | The coordinate of the watermark along the y-axis relative to the vertex in the upper-left corner |
width | The relative width of the watermark. (The watermark is proportionally scaled based on the actual width of the watermark image.) (0,1] |
- (NSArray< NSDictionary * > *) getAllWatermarks |
Query all watermarks key:watermarkPath value:The path of the watermark key:watermarkCoordX value:x key:watermarkCoordY value:y key:watermarkWidth value:width.
- (CGSize) getPushResolution |
Query the width and height of the push stream.
- (instancetype) initWithResolution: | (AlivcLivePushResolution) | resolution |
init Specify the resolution.
Default values are used for other parameters of the instance type.
resolution | The resolution of the live pusher stream |
- (void) removeWatermarkWithPath: | (NSString *) | ALIVCLIVEPUSH_DEPRECAETD_WATERMARK_API |
Remove watermarks.
path | The path of the watermark |
|
readwritenonatomicassign |
The audio bitrate.
default : 64
|
readwritenonatomicassign |
The number of sound channels.
default : AlivcLivePushAudioChannel_1 Mono
|
readwritenonatomicassign |
The audio encoder codec default : AlivcLivePushAudioEncoderCodecOpus.
|
readwritenonatomicassign |
The audio encoding mode default : AlivcLivePushAudioEncoderModeSoft.
|
readwritenonatomicassign |
The audio encoding format default : AlivcLivePushAudioEncoderProfile_AAC_LC.
|
readwritenonatomicassign |
Whether the external custom data contains audio default: YES.
|
readwritenonatomicassign |
Whether to enable audio-only stream push.
default : false
|
readwritenonatomicassign |
The audio sample rate.
default : AlivcLivePushAudioSampleRate48000
|
readwritenonatomicassign |
The audio scenario default:AlivcLivePusherAudioScenarioMusicMode.
|
readwritenonatomicassign |
The control permission of the SDK on AVAudioSession default : AlivcLivePusherAudioSessionOperationRestrictionNone.
|
readwritenonatomicassign |
Whether to enable autofocus default : true.
|
readwritenonatomiccopy |
The business information.
|
readwritenonatomicassign |
The camera type.
default : AlivcLivePushCameraTypeFront
|
readwritenonatomicassign |
The number of reconnections.
default : 5
|
readwritenonatomicassign |
The duration for reconnection.
default : 1000
|
readwritenonatomicassign |
Whether to enable adaptive bitrate streaming default : true.
|
readwritenonatomicassign |
Whether to enable adaptive resolution (dynamic resolution) default : false.
|
readwritenonatomicassign |
Open the data channel and receive a custom message default : false.
|
readwritenonatomicassign |
When you set external custom data, if the aspect ratio of the video is not one of the values of AlivcLivePushResolution, you can configure enableExternSampleBufferSize so that the SDK uses the resolution specified by sampleBufferSize as the output resolution.
|
readwritenonatomicassign |
Whether to enable HD preview (In HD preview mode, adjusting the streaming resolution does not restart the collection) default : true.
|
readwritenonatomicassign |
After enableLocalVideoTexture specifies the texture callback in interactive mode, enableLocalVideoRawBuffer can be set to enable the callback of video raw data, the format is I420.
|
readwritenonatomicassign |
when livePushMode is set to AlivcLivePushLiveMode, pixbuffer is called back by default, and texture callback can be specified by enableLocalVideoTexture
|
readwritenonatomicassign |
Whether to enable Narrowband HD™ that provides higher resolution with less bandwidth in scenarios where you stream screen recordings.
default : true
|
readwritenonatomicassign |
Remote video frame callback switch in interactive mode default : false.
|
readwritenonatomicassign |
|
readwritenonatomicassign |
Allow video encoding to automatically downgrade.
When HEVC hardware encoding is set but the current device does not support it, the SDK will automatically downgrade to H264. This switch can control the SDK not to automatically downgrade to H264. default:true, Allow video codec automatic downgrade
|
readwritenonatomicassign |
The external custom audio data default : unknown.
|
readwritenonatomicassign |
Whether to allow live pusher engine for external custom data.
default : false
|
readwritenonatomicassign |
The external custom video data default : unknown.
|
readwritenonatomiccopy |
|
readwritenonatomicassign |
Whether to turn on the flash default : false.
|
readwritenonatomicassign |
The frame rate for video capture defalut : AlivcLivePushFPS20.
|
readwritenonatomicassign |
Set H5 compatibility mode.
enable | YES: open; NO:close default : false |
|
readwritenonatomicassign |
The initial video bitrate default : 800.
|
readwritenonatomicassign |
The mode of the live pusher engine.
The mode in which the SDK works. Basic mode and interactive mode are supported. The basic mode does not support real-time interaction features such as co-streaming and battle. Use this mode for ordinary RTMP- and RTS-based stream ingest. The interactive mode supports real-time interaction features such as co-streaming and battle. If interaction is required during live streaming, we recommend that you use this mode. default:AlivcLivePushBasicMode
|
readwritenonatomicassign |
Macro focus, suitable for high-end models with multiple cameras, close-range shooting focus default : false.
|
readwritenonatomicassign |
The minimum frame rate for video capture default : AlivcLivePushFPS8.
|
readwritenonatomicassign |
The minimum video bitrate default : 200.
|
readwritenonatomicassign |
The SDK quality monitoring level.
For embedment scenarios, you can specify specific monitoring metrics.
|
readwritenonatomicretain |
The image used when the network is low.
|
readwritenonatomicassign |
Whether to support B-frames for video hardware encoding default:NO.
|
readwritenonatomicassign |
The direction for stream push: portrait, 90° landscape, and 270° landscape.
default : AlivcLivePushOrientationPortrait
|
readwritenonatomicretain |
The image used when live pusher engine is paused.
|
readwritenonatomicassign |
The preview mode default : ALIVC_LIVE_PUSHER_PREVIEW_ASPECT_FILL.
|
readwritenonatomicassign |
Whether to enable mirroring for preview.
default : true Mirroring enabled.
|
readwritenonatomicassign |
Whether to enable mirroring for stream push.
default : false Mirroring disabled.
|
readwritenonatomicassign |
Set the live pusher engine quality mode.
If you select the ResolutionFirst mode, the SDK prioritizes the quality of streams. If you select the FluencyFirst mode, the SDK prioritizes the smoothness of streams. In the two modes, the SDK specifies the bitrate and frame rate by default. If you select the Custom mode, the SDK ingests streams at the bitrate and frame rate that you specify. default:AlivcLivePushQualityModeResolutionFirst
|
readwritenonatomicassign |
Whether to enable the openGL Shared Context mode default : false.
|
readwritenonatomicassign |
The resolution for the ingested stream.
default : AlivcLivePushDefinition540P
|
readwritenonatomicassign |
When you set external custom data, if the aspect ratio of the video is not one of the values of AlivcLivePushResolution, you can specify the aspect ratio of the input video as that of the output video to avoid cropping.
|
readwritenonatomicassign |
The timeout for data transmission.
default : 3000
|
readwritenonatomicassign |
The video target bitrate default : 800.
|
readwritenonatomicassign |
Use ApsaraVideo Player to play background music.
By default, the built-in player is used to play background music The built-in player supports most scenarios. If special formats are required, you can switch to ApsaraVideo Player. You need to add the dependency of ApsaraVideo Player 5.4.1 or later to the app. default:false
|
readwritenonatomiccopy |
userName
|
readwritenonatomicassign |
The keyframe interval default : AlivcLivePushVideoEncodeGOP_2.
|
readwritenonatomicassign |
The video encoding mode default : AlivcLivePushVideoEncoderModeHard.
|
readwritenonatomicassign |
The video hardware encoding format.
When videoEncoderMode is set to AlivcLivePushVideoEncoderModeHard, there are two optional video hardware encoding formats: H.264 and HEVC (H.265). default:AlivcLivePushVideoEncoderModeHardCodecH264
|
readwritenonatomicassign |
Video-only stream push is supported for RTMP, but not for RTC.
default : false