Instance Methods | |
(void) | - setObserver: |
(V2TXLiveCode) | - setRenderView: |
(V2TXLiveCode) | - setRenderRotation: |
(V2TXLiveCode) | - setRenderFillMode: |
(V2TXLiveCode) | - startLivePlay: |
(V2TXLiveCode) | - stopPlay |
(int) | - isPlaying |
(V2TXLiveCode) | - pauseAudio |
(V2TXLiveCode) | - resumeAudio |
(V2TXLiveCode) | - pauseVideo |
(V2TXLiveCode) | - resumeVideo |
(V2TXLiveCode) | - setPlayoutVolume: |
(V2TXLiveCode) | - setCacheParams:maxTime: |
(V2TXLiveCode) | - enableVolumeEvaluation: |
(V2TXLiveCode) | - snapshot |
(V2TXLiveCode) | - enableObserveVideoFrame:pixelFormat:bufferType: |
(V2TXLiveCode) | - enableReceiveSeiMessage:payloadType: |
(void) | - showDebugView: |
(V2TXLiveCode) | - setProperty:value: |
- (V2TXLiveCode) enableObserveVideoFrame: | (BOOL) | enable | |
pixelFormat: | (V2TXLivePixelFormat) | pixelFormat | |
bufferType: | (V2TXLiveBufferType) | bufferType | |
Turn on/off the monitoring callback of the video frame.
The SDK will no longer render the video after you turn on this switch. You can get the video frame through V2TXLivePlayerObserver and execute custom rendering logic.
enable | Whether to enable custom rendering. [Default]: NO |
pixelFormat | Video pixel format for custom rendering callback V2TXLivePixelFormat。 |
bufferType | Video data format for custom rendering callback V2TXLiveBufferType。 |
- (V2TXLiveCode) enableReceiveSeiMessage: | (BOOL) | enable | |
payloadType: | (int) | payloadType | |
Enables the receiving of SEI messages.
enable | YES : enable; NO (default): disable |
payloadType | The payload type of SEI messages. Valid values: 5 , 242 , please be consistent with the payload type of the sender |
- (V2TXLiveCode) enableVolumeEvaluation: | (NSUInteger) | intervalMs |
Enables playback volume update.
After this feature is enabled, you can obtain the SDK’s volume evaluation through the V2TXLivePlayerObserver::onPlayoutVolumeUpdate:volume: "onPlayoutVolumeUpdate" callback.
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. |
- (int) isPlaying |
Indicates whether the player is playing the audio and video streams.
- (V2TXLiveCode) pauseAudio |
Pauses the audio stream of the player.
- (V2TXLiveCode) pauseVideo |
Pauses the video stream of the player.
- (V2TXLiveCode) resumeAudio |
Resumes the audio stream of the player.
- (V2TXLiveCode) resumeVideo |
Resumes the video stream of the player.
- (V2TXLiveCode) setCacheParams: | (CGFloat) | minTime | |
maxTime: | (CGFloat) | maxTime | |
Set the minimum time and maximum time (unit: s) for auto adjustment of the player cache.
minTime | Minimum time for auto cache adjustment. The value must be greater than 0. [Default]: 1 |
maxTime | Maximum time for auto cache adjustment. The value must be greater than 0. [Default]: 5 |
- (void) setObserver: | (id< V2TXLivePlayerObserver >) | observer |
Sets the player callback.
By setting the callback, you can listen to some callback events of V2TXLivePlayer, including the player status, playback volume callback, first frame audio/video callback, statistics, warnings, and error messages.
observer | Callback target of the player. For more information, see V2TXLivePlayerObserver. |
- (V2TXLiveCode) setPlayoutVolume: | (NSUInteger) | volume |
Sets the volume.
volume | Volume. Valid range: 0 - 100. [Default]: 100 |
- (V2TXLiveCode) setProperty: | (NSString *) | key | |
value: | (NSObject *) | value | |
Calls the advanced API of V2TXLivePlayer.
key | Key of the advanced API. |
value | Parameter needed to call the advanced API corresponding to the key. |
- (V2TXLiveCode) setRenderFillMode: | (V2TXLiveFillMode) | mode |
Sets the fill mode of the view.
mode | Fill mode of the view V2TXLiveFillMode。
|
- (V2TXLiveCode) setRenderRotation: | (V2TXLiveRotation) | rotation |
Sets the rotation angle of the player view.
rotation | Rotation angle of the view V2TXLiveRotation
|
- (V2TXLiveCode) setRenderView: | (TXView *) | view |
Sets the rendering view of the player. This control is responsible for presenting the video content.
view | Player rendering view. |
- (void) showDebugView: | (BOOL) | isShow |
Indicates whether the debug view of the player video status information is displayed.
isShow | Specifies whether to display the debug view. [Default]: NO. |
- (V2TXLiveCode) snapshot |
Captures the video view in the playback process.
- (V2TXLiveCode) startLivePlay: | (NSString *) | url |
Starts playing the audio and video streams.
url | URL of the audio and video streams to be played. The RTMP, HTTP-FLV and TRTC streaming protocols are supported. |
- (V2TXLiveCode) stopPlay |
Stops playing the audio and video streams.