LiteAVSDK
Tencent Cloud TRTC SDK, is a high availability components serving tens of thousands of enterprise customers, which is committed to helping you to minimize your research and development costs.
TXVodPlayConfig

Data Structures

class  TXVodPlayConfig
 

Detailed Description

The VOD player parameter configuration module. It is used to set TXVodPlayer parameters, most of which cannot take effect if they are set after playback starts.


Data Structure Documentation

◆ com::tencent::rtmp::TXVodPlayConfig

class com::tencent::rtmp::TXVodPlayConfig

Public Member Functions

void setConnectRetryCount (int count)
 
int getConnectRetryCount ()
 
void setConnectRetryInterval (int interval)
 
int getConnectRetryInterval ()
 
void setTimeout (int timeout)
 
int getTimeout ()
 
void setCacheFolderPath (String folderPath)
 
String getCacheFolderPath ()
 
void setMaxCacheItems (int maxCacheItems)
 
int getMaxCacheItems ()
 
void setPlayerType (int playerType)
 
int getPlayerType ()
 
void setHeaders (Map< String, String > headers)
 
Map< String, String > getHeaders ()
 
void setEnableAccurateSeek (boolean accurateSeek)
 
boolean isEnableAccurateSeek ()
 
void setAutoRotate (boolean autoRotate)
 
boolean isAutoRotate ()
 
void setSmoothSwitchBitrate (boolean smoothSwitchBitrate)
 
boolean isSmoothSwitchBitrate ()
 
void setCacheMp4ExtName (String cacheMp4ExtName)
 
String getCacheMp4ExtName ()
 
void setProgressInterval (int intervalMs)
 
int getProgressInterval ()
 
void setMaxBufferSize (int maxBufferSize)
 
int getMaxBufferSize ()
 
void setMaxPreloadSize (int maxPreloadSize)
 
int getMaxPreloadSize ()
 
void setFirstStartPlayBufferTime (int milliseconds)
 
void setNextStartPlayBufferTime (int milliseconds)
 
void setOverlayKey (String overlayKey)
 
String getOverlayKey ()
 
void setOverlayIv (String overlayIv)
 
String getOverlayIv ()
 
void setEnableRenderProcess (boolean enableRenderProcess)
 
boolean isEnableRenderProcess ()
 
void setPreferredResolution (long preferredResolution)
 
long getPreferredResolution ()
 
void setMediaType (int mediaType)
 
int getMediaType ()
 
void setExtInfo (Map< String, Object > map)
 
Map< String, Object > getExtInfoMap ()
 

Member Function Documentation

◆ getCacheFolderPath()

String getCacheFolderPath ( )
inline

This API is used to get the VOD cache directory, which takes effect for VOD of MP4 and HLS files.

Returns

◆ getCacheMp4ExtName()

String getCacheMp4ExtName ( )
inline

This API is used to get cached MP4 file extension.

Returns
The cached MP4 file extension.

◆ getConnectRetryCount()

int getConnectRetryCount ( )
inline

This API is used to get the number of player connection retries.

Returns

◆ getConnectRetryInterval()

int getConnectRetryInterval ( )
inline

This API is used to get the connection retry interval for the player.

Returns

◆ getExtInfoMap()

Map<String, Object> getExtInfoMap ( )
inline

This API is used to return the extended configuration information of the player.

Returns

◆ getHeaders()

Map<String, String> getHeaders ( )
inline

This API is used to get custom HTTP headers.

Returns

◆ getMaxBufferSize()

int getMaxBufferSize ( )
inline

This API is used to get the maximum playback buffer size in MB.

Returns

◆ getMaxCacheItems()

int getMaxCacheItems ( )
inline

This API is used to get the number of cached files.

Returns

◆ getMaxPreloadSize()

int getMaxPreloadSize ( )
inline

This API is used to get the maximum preloading buffer size in MB.

Returns

◆ getMediaType()

int getMediaType ( )
inline

This API is used to get the product of the width and height of the most preferred bitstream specified by preferredResolution if there are multiple HLS bitstreams.

Returns

◆ getOverlayIv()

String getOverlayIv ( )
inline

This API is used to get the HLS security hardening encryption and decryption IV.

Returns

◆ getOverlayKey()

String getOverlayKey ( )
inline

This API is used to get the HLS security hardening encryption and decryption key.

Returns

◆ getPlayerType()

int getPlayerType ( )
inline

This API is used to get the player type. @Deprecated This API has been deprecated.

Returns

◆ getPreferredResolution()

long getPreferredResolution ( )
inline

◆ getProgressInterval()

int getProgressInterval ( )
inline

This API is used to get the progress callback interval.

Returns

◆ getTimeout()

int getTimeout ( )
inline

This API is used to get the player connection timeout period.

Returns

◆ isAutoRotate()

boolean isAutoRotate ( )
inline

This API is used to get whether automatic rotation is enabled. Default value: YES.

Returns

◆ isEnableAccurateSeek()

boolean isEnableAccurateSeek ( )
inline

This API is used to get whether accurate seek is enabled. Default value: true.

Returns

◆ isEnableRenderProcess()

boolean isEnableRenderProcess ( )
inline

Whether to allow postrendering and postproduction features.

Returns

◆ isSmoothSwitchBitrate()

boolean isSmoothSwitchBitrate ( )
inline

This API is used to get whether smooth switch for multi-bitrate HLS streams is enabled. Default value: false.

Returns

◆ setAutoRotate()

void setAutoRotate ( boolean  autoRotate)
inline

If it is set to YES, the MP4 file will be automatically rotated according to the rotation angle set in the file, which can be obtained from the PLAY_EVT_CHANGE_ROTATION event. Default value: YES.

Parameters
autoRotate

◆ setCacheFolderPath()

void setCacheFolderPath ( String  folderPath)
inline

This API is used to set the VOD cache directory, which takes effect for VOD of MP4 and HLS files.

Note: This API has been deprecated. Use TXPlayerGlobalSetting#setCacheFolderPath for global configuration. The set global configuration will be used first.

Parameters
folderPathThe cache path

◆ setCacheMp4ExtName()

void setCacheMp4ExtName ( String  cacheMp4ExtName)
inline

The cached MP4 file extension.

Parameters
cacheMp4ExtNameDefault value: mp4

◆ setConnectRetryCount()

void setConnectRetryCount ( int  count)
inline

This API is used to set the number of connection retries for the player.

The SDK will try to reconnect to the server after it is disconnected unexpectedly. You can call this API to set the number of connection retries.

Parameters
countThe number of player connection retries. Value range: 1–10. Default value: 3.

◆ setConnectRetryInterval()

void setConnectRetryInterval ( int  interval)
inline

This API is used to set the connection retry interval for the player.

The SDK will try to reconnect to the server after it is disconnected unexpectedly. You can call this API to set the connection retry interval.

Parameters
intervalThe SDK connection retry interval in seconds. Value range: 3–30. Default: 3.

◆ setEnableAccurateSeek()

void setEnableAccurateSeek ( boolean  accurateSeek)
inline

This API is used to set whether to enable accurate seek. Default value: true.

Parameters
accurateSeek

◆ setEnableRenderProcess()

void setEnableRenderProcess ( boolean  enableRenderProcess)
inline

Whether to allow postrendering and postproduction features.

It is enabled by default. If the super-resolution plugin exists after it is enabled, the plugin will be loaded by default.

Parameters
enableRenderProcess

◆ setExtInfo()

void setExtInfo ( Map< String, Object >  map)
inline

This API is used to set the extended configuration information of the player.

Parameters
map

◆ setFirstStartPlayBufferTime()

void setFirstStartPlayBufferTime ( int  milliseconds)
inline

The duration of the video data that needs to be loaded during the first buffering in ms. Default value: 100 ms.

Attention
This API has been deprecated. Use this#setMaxBufferSize or this#setMaxPreloadSize to set the buffer size.

◆ setHeaders()

void setHeaders ( Map< String, String >  headers)
inline

This API is used to set custom HTTP headers.

Parameters
headers(String, String) type

◆ setMaxBufferSize()

void setMaxBufferSize ( int  maxBufferSize)
inline

The maximum playback buffer size in MB.

The setting will affect playableDuration. The greater the value, the more the data that is buffered in advance.

Parameters
maxBufferSizeThe playback buffer size

◆ setMaxCacheItems()

void setMaxCacheItems ( int  maxCacheItems)
inline

This API is used to set the number of cached files.

Note: This API has been disused. Use TXPlayerGlobalSetting#setMaxCacheSize for global configuration. The set global configuration will be used first.

Parameters
maxCacheItemsThe maximum number of cached items. One item equals to 100 MB.

◆ setMaxPreloadSize()

void setMaxPreloadSize ( int  maxPreloadSize)
inline

This API is used to set the maximum preloading buffer size in MB.

Parameters
maxPreloadSizeThe preloading buffer size

◆ setMediaType()

void setMediaType ( int  mediaType)
inline

The media asset type. You need to set whether the specific HLS bitstream is a VOD or live stream media asset when using the adaptive bitrate streaming feature. The default type is MEDIA_TYPE_AUTO.

【Important】 For adaptive bitrate playback, the specific type must be specified temporarily. For adaptive playback of hls live resources, the MEDIA_TYPE_HLS_LIVE type must be passed in.

Parameters
mediaTypemeida type TXVodConstants#MEDIA_TYPE_HLS_VOD

◆ setNextStartPlayBufferTime()

void setNextStartPlayBufferTime ( int  milliseconds)
inline

The minimum buffered data size to stop buffering (secondary buffering for insufficient buffered data or progress bar drag buffering caused by seek) in ms. Default value: 250 ms.

Attention
This API has been deprecated. Use this#setMaxBufferSize or this#setMaxPreloadSize to set the buffer size.

◆ setOverlayIv()

void setOverlayIv ( String  overlayIv)
inline

This API is used to set the HLS security hardening encryption and decryption IV.

Parameters
overlayIv

◆ setOverlayKey()

void setOverlayKey ( String  overlayKey)
inline

This API is used to set the HLS security hardening encryption and decryption key.

Parameters
overlayKey

◆ setPlayerType()

void setPlayerType ( int  playerType)
inline

This API is used to set the player type. @Deprecated This API has been deprecated.

Parameters
playerTypeThe player type

◆ setPreferredResolution()

void setPreferredResolution ( long  preferredResolution)
inline

This API is used to start playing back the most preferred bitstream according to the configured preferredResolution if there are multiple HLS bitstreams.

Here, preferredResolution is the product of the video width and height.

It can only take effect if it is set before playback starts.

Parameters
preferredResolution

◆ setProgressInterval()

void setProgressInterval ( int  intervalMs)
inline

This API is used to set the progress callback interval.

If it is not set, the SDK will call back the progress once every 0.5 seconds.

Parameters
intervalMsThe interval in milliseconds

◆ setSmoothSwitchBitrate()

void setSmoothSwitchBitrate ( boolean  smoothSwitchBitrate)
inline

This API is used to set whether to enable smooth switch for multi-bitrate HLS streams. Default value: false.

Parameters
smoothSwitchBitrateIf it is set to false (default), the opening speed of multi-bitrate URLs is increased. If it is set to true, the bitrate can be switched smoothly when IDR frames are aligned.

◆ setTimeout()

void setTimeout ( int  timeout)
inline

This API is used to set the player connection timeout period.

Parameters
timeoutThe SDK connection timeout period in seconds. Default value: 10.