Instance Methods | |
(void) | - setObserver |
(V2TXLiveCode) | - setRenderView |
(V2TXLiveCode) | - setRenderRotation |
(V2TXLiveCode) | - setRenderFillMode |
(V2TXLiveCode) | - startPlay |
(V2TXLiveCode) | - stopPlay |
(int) | - isPlaying |
(V2TXLiveCode) | - pauseAudio |
(V2TXLiveCode) | - resumeAudio |
(V2TXLiveCode) | - pauseVideo |
(V2TXLiveCode) | - resumeVideo |
(V2TXLiveCode) | - setPlayoutVolume |
(V2TXLiveCode) | - setCacheParams:maxTime |
(V2TXLiveCode) | - enableVolumeEvaluation |
(V2TXLiveCode) | - snapshot |
(V2TXLiveCode) | - enableCustomRendering:pixelFormat:bufferType |
(void) | - showDebugView |
(V2TXLiveCode) | - setProperty:value |
- (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) setRenderView: | (TXView *) | view |
Sets the rendering view of the player. This control is responsible for presenting the video content.
view | Player rendering view. |
- (V2TXLiveCode) setRenderRotation: | (V2TXLiveRotation) | rotation |
Sets the rotation angle of the player view.
rotation | Rotation angle of the view V2TXLiveRotation
|
- (V2TXLiveCode) setRenderFillMode: | (V2TXLiveFillMode) | mode |
Sets the fill mode of the view.
mode | Fill mode of the view V2TXLiveFillMode。
|
- (V2TXLiveCode) startPlay: | (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.
- (int) isPlaying |
Indicates whether the player is playing the audio and video streams.
- (V2TXLiveCode) pauseAudio |
Pauses the audio stream of the player.
- (V2TXLiveCode) resumeAudio |
Resumes the audio stream of the player.
- (V2TXLiveCode) pauseVideo |
Pauses the video stream of the player.
- (V2TXLiveCode) resumeVideo |
Resumes the video stream of the player.
- (V2TXLiveCode) setPlayoutVolume: | (NSUInteger) | volume |
Sets the volume.
volume | Volume. Valid range: 0 - 100. [Default]: 100 |
- (V2TXLiveCode) setCacheParams: | (CGFloat) | minTime | |
maxTime: | (CGFloat) | maxTime | |
Set the minimum time and maximum time (unit: ms) 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 |
- (V2TXLiveCode) enableVolumeEvaluation: | (NSUInteger) | intervalMs |
Enables playback volume update.
After this feature is enabled, you can obtain the SDK’s volume evaluation through the 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. |
- (V2TXLiveCode) snapshot |
Captures the video view in the playback process.
- (V2TXLiveCode) enableCustomRendering: | (BOOL) | enable | |
pixelFormat: | (V2TXLivePixelFormat) | pixelFormat | |
bufferType: | (V2TXLiveBufferType) | bufferType | |
Sets the custom video rendering callback.
Using this method, you can obtain every frame of the video view after decoding, perform custom rendering, and add custom display effects.
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。 |
- (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) 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. |