FuncList | DESC |
Sets the pusher callback | |
Sets the local camera preview | |
Sets the view mirror of the local camera | |
Sets the video encoder mirror | |
Sets the rotation angle of the view | |
Sets the fill mode of the local video image | |
Enables the local camera | |
Disables the local camera | |
Enables the local microphone | |
Disables the microphone | |
Enables the image streaming | |
Disables the image streaming | |
Enables video capturing | |
Disables video capture | |
Mute local audio | |
Resume the audio stream of the pusher | |
Pause the video stream of the pusher | |
Resume the video stream of the pusher | |
Starts pushing the audio and video data | |
Stops pushing the audio and video data | |
Indicates whether the pusher is currently pushing streams | |
Sets the audio quality for pushing | |
Set the video encoding parameters for pushing | |
Obtains the beauty manager | |
Obtains the audio effect manager | |
Obtains the video device manager | |
Captures the local view in the pushing process | |
Sets the pusher watermark image. By default, the watermark is disabled | |
Enables volume update | |
Enables or disables custom video processing | |
Enables or disables custom video capture | |
Turn on/off custom audio capture | |
Sends the collected video data to the SDK in the custom video capture mode | |
In the custom audio collection mode, send the collected audio data to the SDK | |
Enables/Disables audio process callback | |
Use SEI channel to send custom message | |
Indicates whether the debug view of the pusher video status information is displayed | |
Calls the advanced API of V2TXLivePusher | |
Sets On-Cloud MixTranscoding parameters | |
Start recording audio and video stream | |
Stop recording audio and video stream |
- (void)setObserver: |
Param | DESC |
observer |
- (V2TXLiveCode)setRenderView: | (TXView *)view |
Param | DESC |
view | Local camera preview. |
- (V2TXLiveCode)setRenderMirror: |
Param | DESC |
mirrorType | V2TXLiveMirrorTypeAuto Default : default mirror type. In this case, images from the front camera are mirrored, and images from the rear camera are not mirrored. V2TXLiveMirrorTypeEnable: both the front camera and rear camera are switched to mirror mode. V2TXLiveMirrorTypeDisable: both the front camera and rear camera are switched to non-mirror mode. |
- (V2TXLiveCode)setEncoderMirror: | (BOOL)mirror |
Param | DESC |
mirror | Specifies whether the mirrored images are viewed. NO Default : non-mirrored images are viewed on the player side. YES: mirrored images are viewed on the player side. |
- (V2TXLiveCode)setRenderRotation: |
Param | DESC |
rotation | V2TXLiveRotation0 Default : 0 degrees, which means the view is not rotated. V2TXLiveRotation90: rotate 90 degrees clockwise. V2TXLiveRotation180: rotate 180 degrees clockwise. V2TXLiveRotation270: rotate 270 degrees clockwise. |
- (V2TXLiveCode)setRenderFillMode: |
Param | DESC |
mode | V2TXLiveFillModeFill: Default: fill the screen with the image without leaving any black edges. If the aspect ratio of the view is different from that of the screen, part of the view will be cropped. V2TXLiveFillModeFit make the view fit the screen without cropping. If the aspect ratio of the view is different from that of the screen, black edges will appear. V2TXLiveFillModeScaleFill fill the screen with the stretched image, thus the length and width may not change proportionally. |
- (V2TXLiveCode)startCamera: | (BOOL)frontCamera |
Param | DESC |
frontCamera | Specifies whether to switch to the front camera. YES Default : switch to the front camera. NO: switch to the rear camera. |
- (V2TXLiveCode)startVirtualCamera: | (TXImage *)image |
Param | DESC |
image | image. |
- (V2TXLiveCode)startScreenCapture: | (NSString *)appGroup |
Param | DESC |
appGroup | The Application Group Identifier shared by the main App and Broadcast can be specified as nil. It is worth noting that the function will be more reliable according to the document guidelines. |
- (V2TXLiveCode)startPush: | (NSString *)url |
Param | DESC |
url | Push URL, which can be any push server. |
- (V2TXLiveCode)setAudioQuality: |
Param | DESC |
quality | V2TXLiveAudioQualityDefault Default : universal. V2TXLiveAudioQualitySpeech: speech. V2TXLiveAudioQualityMusic: music. |
- (V2TXLiveCode)setVideoQuality: |
Param | DESC |
param |
- (V2TXLiveCode)setWatermark: | (TXImage *)image |
x: | (float)x |
y: | (float)y |
scale: | (float)scale |
Param | DESC |
image | Watermark image. If the value is nil, it is equivalent to disabling the watermark. |
scale | Scaling ratio of the watermark. Valid range: 0 - 1. |
x | Display position of the watermark. Valid range: 0 - 1. |
y | Display position of the watermark. Valid range: 0 - 1. |
- (V2TXLiveCode)enableVolumeEvaluation: | (NSUInteger)intervalMs |
Param | DESC |
intervalMs | Interval for triggering the volume callback. The unit is ms. The minimum interval is 100 ms. If the value is equal to or smaller than 0, the callback is disabled. We recommend that you set this parameter to 300 ms. Default : 0. |
- (V2TXLiveCode)enableCustomVideoProcess: | (BOOL)enable |
pixelFormat: | |
bufferType: |
Param | DESC |
bufferType | Data format of callbacks. |
enable | YES : enable; NO : disable (default). |
pixelFormat | Pixel format of callbacks. |
V2TXLIVE_OK
: successful. V2TXLIVE_ERROR_NOT_SUPPORTED
: unsupported format.- (V2TXLiveCode)enableCustomVideoCapture: | (BOOL)enable |
Param | DESC |
enable | YES : enable custom video capture; NO (default): disable custom video capture. |
- (V2TXLiveCode)enableCustomAudioCapture: | (BOOL)enable |
Default value
: NO
. V2TXLIVE_OK
: successful.- (V2TXLiveCode)sendCustomVideoFrame: |
Param | DESC |
videoFrame |
- (V2TXLiveCode)sendCustomAudioFrame: | (V2TXLiveAudioFrame *)audioFrame |
Param | DESC |
audioFrame |
V2TXLIVE_OK
: successful. V2TXLIVE_ERROR_INVALID_PARAMETER
: The audio frames fail to be sent because they are invalid.- (V2TXLiveCode)enableAudioProcessObserver: | (BOOL)enable |
format: |
Param | DESC |
enable | YES : enable; NO (default): disable. |
format | audio frame format. |
- (V2TXLiveCode)sendSeiMessage: | (int)payloadType |
data: | (NSData *)data |
onReceiveSeiMessage
callback in V2TXLivePlayerObserver.Param | DESC |
data | Data to be sent. |
payloadType | Payload type. Valid values: 5 , 242 , 242 recommended. |
- (void)showDebugView: | (BOOL)isShow |
Param | DESC |
isShow | Specifies whether to display the debug view. Default : NO. |
- (V2TXLiveCode)setProperty: | (NSString *)key |
value: | (NSObject *)value |
Param | DESC |
key | Key of the advanced API, please see V2TXLiveProperty. |
value | Parameter needed to call the advanced API corresponding to the key. |
- (V2TXLiveCode)setMixTranscodingConfig: |
setMixTranscodingConfig()
API, the SDK will send a command to the Tencent Cloud transcoding server to combine multiple audio/video streams in the room into one stream. mixUsers
parameter to set the position of each channel of image and specify whether to mix only audio. You can also set the encoding parameters of the mixed stream, including videoWidth
, videoHeight
, and videoBitrate
.Param | DESC |
config | Please see the description of V2TXLiveTranscodingConfig in V2TXLiveDef.h . Passing in nil will cancel On-Cloud MixTranscoding. |
streamId
specified in config
. nil
to cancel On-Cloud MixTranscoding. The On-Cloud MixTranscoding module starts working the moment you enable On-Cloud MixTranscoding. You may incur additional costs if you do not cancel it in a timely manner. V2TXLIVE_OK
: successful. V2TXLIVE_ERROR_REFUSED
: failed to set On-Cloud MixTranscoding parameters as stream pushing has not started.- (V2TXLiveCode)startLocalRecording: |
V2TXLIVE_OK
: successful. V2TXLIVE_ERROR_INVALID_PARAMETER
: The parameter is invalid, such as filePath is empty. V2TXLIVE_ERROR_REFUSED
: API refuse, you must first call startPush to start publishing streaming.
Was this page helpful?