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.
◆ com::tencent::rtmp::TXVodPlayConfig
class com::tencent::rtmp::TXVodPlayConfig |
◆ 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()
This API is used to get the maximum playback buffer size in MB.
- Returns
◆ getMaxCacheItems()
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()
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()
This API is used to get the HLS security hardening encryption and decryption IV.
- Returns
◆ getOverlayKey()
This API is used to get the HLS security hardening encryption and decryption key.
- Returns
◆ getPlayerType()
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()
This API is used to get the player connection timeout period.
- Returns
◆ isAutoRotate()
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
-
◆ 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
-
◆ setCacheMp4ExtName()
void setCacheMp4ExtName |
( |
String |
cacheMp4ExtName | ) |
|
|
inline |
The cached MP4 file extension.
- Parameters
-
cacheMp4ExtName | Default 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
-
count | The 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
-
interval | The 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
-
◆ 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
-
◆ setExtInfo()
void setExtInfo |
( |
Map< String, Object > |
map | ) |
|
|
inline |
This API is used to set the extended configuration information of the player.
- Parameters
-
◆ 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
-
maxBufferSize | The 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
-
maxCacheItems | The 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
-
maxPreloadSize | The 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
-
◆ 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
-
◆ setOverlayKey()
void setOverlayKey |
( |
String |
overlayKey | ) |
|
|
inline |
This API is used to set the HLS security hardening encryption and decryption key.
- Parameters
-
◆ setPlayerType()
void setPlayerType |
( |
int |
playerType | ) |
|
|
inline |
This API is used to set the player type. @Deprecated This API has been deprecated.
- Parameters
-
playerType | The 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
-
◆ 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
-
intervalMs | The 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
-
smoothSwitchBitrate | If 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
-
timeout | The SDK connection timeout period in seconds. Default value: 10. |