Configures VOD. For more information on the configuration, see TXVodPlayConfig.
Sets whether to start playback automatically after
Sets the token for HLS encryption. After the token is set, the player will automatically add
Sets whether to loop
Sets whether to enable hardware acceleration.
Sets the player business parameters in the format of
Set the subtitle style information, and the subtitle style can be updated after playback (only supported by the advanced version of the player).
Plays a video from an HTTP URL. Since v10.7,
Start a standard FairPlay DRM playback.
Plays a video by VOD file ID. Since v10.7,
Stops the audio/video stream.
Gets whether playback is ongoing.
Pauses playback. The player will stop pulling data and freeze on the last frame.
Resumes playback. The player will resume pulling data.
Seeks to a specified time point of the video stream (in seconds).
Gets the current playback time point in seconds.
Gets the total video duration in seconds.
Gets the playable video duration in seconds.
Gets the video width.
Gets the video height.
Sets the playback start time.
Create a Video rendering View, which hosts the display of video content.
Remove Video rendering View .
Add external subtitles (only supported by the advanced version of the player).
Returns the list of subtitle track information (only supported by the advanced version of the player).
Returns the list of audio track information (supported only by the advanced version of the player).
Select a track (supported only in the premium version of the player).
Deselects a track (only supported in advanced versions of the player).
Gets the current video frame image.
Note: Because this operation is time-consuming, the screenshot will be called back asynchronously.
Sets whether to flip the video image.
Sets the VOD playback speed. Default value: 1.0.
Returns the current playback bitrate index.
Sets the current playback bitrate index for seamless definition switch.
You may need to wait momentarily to switch the definition.
When the playback address is a master playlist, return the supported bitrates (resolutions).
Sets the image fill mode.
Sets the rotation.
Enter the picture-in-picture function.
Exit the picture-in-picture function.
Network status notification of the VOD player.
Picture-in-Picture state callback.
Picture-in-Picture error state callback.
Sets the maximum number of player reconnection attempts.
Sets the player reconnection interval in seconds.
Sets the player connection timeout period in seconds.
This interface has been deprecated. It is recommended to useTXPlayerGlobalSetting##setCacheFolderPath.
Sets the VOD cache directory, which takes effect for MP4 and HLS files.
This interface has been deprecated. It is recommended to useTXPlayerGlobalSetting#setMaxCacheSizeMB.
Sets the maximum number of cached files.
Sets the player type.
Sets custom HTTP headers.
Sets whether to enable accurate seek. Default value: true.
Sets whether to enable auto rotation. If the parameter is set to
You can get the rotation angle from the
Sets whether to enable smooth switch for multi-bitrate HLS streams. Default value: false.
Sets the progress callback interval in ms.
Sets the maximum buffer size in MB.
Sets the maximum preloading size in MB.
Sets the duration (ms) of video that needs to be loaded before playback starts. Default value: 100 ms.
Sets the minimum data to buffer when there is insufficient buffer data or after seeking is performed. Default value: 250 ms.
Sets the HLS security hardening encryption and decryption key.
Sets the HLS security hardening encryption and decryption IV.
Sets the extended information.
Sets the preferred resolution. In case of multi-bitrate HLS streams, the resolution specified by
Sets whether to enable post-rendering and post-processing (such as that used by the super-resolution plugin). They are enabled by default.
The video format of the video rendering object callback.
Whether to keep the last frame when calling `stopPlay`, with a default value of NO.
Set the media type. Optional values are:
MEDIA_TYPE_AUTO, AUTO type (default value, not supported for adaptive bitrate playback).
MEDIA_TYPE_HLS_VOD, HLS on-demand media.
MEDIA_TYPE_HLS_LIVE, HLS live media.
MEDIA_TYPE_HLS_VOD, MP4 and other general file on-demand media (supported since version 11.2).
MEDIA_TYPE_DASH_VOD, DASH on-demand media (supported since version 11.2).
Sets the cache directory of the playback engine. After setting, this directory will be first read and written during predownloading and player use.
Sets the playback engine’s maximum cache size in MB. The cache directory will be cleared automatically if its size exceeds the specified value.
Gets a singleton object of
Starts predownloading. Before you call this API, make sure you have called
File ID information.
Download definition, default original.
If the address is encrypted, please fill in the token.
Application AppID. Required.
HLS EXT-X-KEY encryption and decryption parameters.
Encryption and decryption parameter overlayIv.
Whether the download is complete.
FileID download object (optional).
Get the total size of the downloaded file, in bytes, only valid for FileID download sources. Note: The total size refers to the size of the original file uploaded to the Tencent Cloud VOD console, and the size of the sub-streams after being converted to adaptive bitrate streams cannot be obtained temporarily.
Downloaded size, in bytes.
Total number of segments.
Number of segments downloaded.
Play path, can be passed to TXVodPlayer for playback.
Download speed, in bytes per second.
Determine whether the downloaded video resource is damaged, and return YES if it is deleted after downloading, etc. (Supported since version 11.0).
Get the TXVodDownloadManager instance object, singleton mode.
Set the download root directory.
Set the download HTTP headers.
Set the download callback method, which must be set before downloading.
Start downloading using URL.
Start downloading using FileID.
Stop downloading, and stop successfully when ITXVodDownloadListener.onDownloadStop is called back.
Delete the downloaded file.
Delete the download information.
Get the download list information for all users.
Get the download information.
Get the HLS EXT-X-KEY. genRandomHexStringForHls
Get the encryption random number.
File ID authentication failed.
No file of this definition.
Format not supported.
Failed to obtain HLS decryption key.
Failed to access download directory.
Download initial state.
Full High Definition.
Standard Definition 480P.
Standard Definition 540P.
High Definition 720P.
High Definition 1080P.
Video playback started, and the loading icon animation (if any) ended.
The video playback progress (including the current playback progress, the loaded duration, and the total video duration).
The video is being loaded. The
Video loading ended, and video playback resumed.
Video playback ended.
The player is ready.
The network received the first renderable video data packet (IDR).
The video resolution changed.
The MP4 video was rotated.
The network was disconnected and could not be reconnected after multiple retries. You can restart the player to perform more connection retries.
Failed to get the HLS decryption key.
Failed to decode the current video frame.
Failed to decode the current audio frame.
The player was disconnected and is trying to reconnect. The
Failed to start the hardware decoder, and the software decoder was used instead.
H.265 decoding failed.
The file to be played back does not exist.
Playback event: The first video frame was successfully received.
Play event: The first audio frame was successfully received.
Play event: Play has started.
Play event: Play progress update, dedicated to VodPlayer.
Play event: Play has ended.
Play event: data buffering.
Playback event: The video decoder has started.
Playback event: Video resolution changed.
Play event: the information about successfully obtaining the VOD file, dedicated to the VOD player (VodPlayer).
Play event: The rotation angle of the MP4 video changes, dedicated to VodPlayer.
Play event: Video loading is complete, dedicated to VodPlayer.
Play event: Video buffering ends, dedicated to VodPlayer.
Playback event: Stream switching (switching between video streams with different resolutions) has been successfully completed.
The TCP connection was successful.
The first frame of data is received.
Video playback Seek complete.
Playback event: Audio Session is interrupted by other apps (applicable to iOS platform only).
Streaming Error: The network connection was disconnected (after three retries and failed to reconnect).
On-demand error: The playback file does not exist.
On-demand error: Failed to obtain HLS decoding KEY.
On-demand error: Failed to obtain the file information of the on-demand file.
The device or system version does not support (iPad iOS9+ only supports PIP).
Player does not support.
Video not supported.
PIP controller not available.
The PIP controller reports an error.
The player object does not exist.
The PIP function is already running.
PIP function is not started.
Picture-in-picture is about to start.
Picture-in-picture has started.
Picture-in-picture is coming to an end.
Picture-in-picture is over.