TXLivePlayer
Video player
For more information, see TXLivePlayer.
TXLivePlayer decodes the audio and video data in live streams and performs local rendering. It provides the following capabilities:
- For Tencent Cloud's playback addresses, use low-delay playback to implement live streaming mic connect.
- For Tencent Cloud's playback addresses, use live streaming time shifting to implement seamless switching between live viewing and time-shifting viewing.
- Custom audio and video data processing allows you to process the audio and video data in live streams based on project requirements and then render and playback them.
Basic SDK APIs
API |
Description |
delegate |
Sets the playback callback. For more information, see the detailed definition in the TXLivePlayListener.h file. |
videoProcessDelegate |
Sets the video processing callback. For more information, see the detailed definition in the TXVideoCustomProcessDelegate.h file. |
audioRawDataDelegate |
Sets the audio processing callback. For more information, see the detailed definition in the TXAudioRawDataDelegate.h file. |
enableHWAcceleration |
Sets whether to enable hardware acceleration. Default value: NO. |
config |
Sets TXLivePlayConfig playback configuration items. For more information, see the detailed definition in the TXLivePlayConfig.h file. |
recordDelegate |
Sets the short video recording callback. For more information, see the detailed definition in the TXLiveRecordListener.h file. |
isAutoPlay |
Sets whether to start playback immediately after call of startPlay . This API takes effect only for VOD. Default value: YES. |
Basic playback APIs
API |
Description |
setupVideoWidget |
Creates the video rendering view. This control is used to display the video content. |
removeVideoWidget |
Removes the video rendering widget. |
startPlay |
Plays back the RTMP audio/video stream at the specified URL. |
stopPlay |
Stops the audio/video stream. |
isPlaying |
Gets whether playback is ongoing. |
pause |
Pauses playback. |
resume |
Resumes playback. This API can be used for VOD and live streaming. |
Video APIs
Audio APIs
Live streaming time shifting APIs
API |
Description |
prepareLiveSeek |
Prepares for live streaming time shifting and pulls the playback start time of the live stream. |
resumeLive |
Resumes live playback from time-shifting playback. |
seek |
- |
Video recording APIs
Other APIs
Enumerated values
Enumerated Value |
Description |
TX_Enum_PlayType |
Supported live streaming and VOD types. |
TXLivePlayConfig
TXLivePlayer parameter configuration module
For more information, see TXLivePlayConfig.
It is used to set TXLivePlayer parameters, most of which cannot take effect if they are set after playback starts.
TXLivePlayListener
TXLivePlayer callback notifications
For more information, see TXLivePlayListener.
Was this page helpful?