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
 

Enumerations

enum  TX_Enum_PlayerType : NSInteger
 
enum  TX_Enum_VideoResolution : NSInteger
 
enum  TX_Enum_MediaType : NSInteger
 

Variables

const NSInteger INDEX_AUTO
 

Detailed Description


Data Structure Documentation

◆ TXVodPlayConfig

class TXVodPlayConfig

The VOD player configuration.

+ Inheritance diagram for TXVodPlayConfig:

Instance Methods

(NSString *cacheFolderPath) - DEPRECATED_MSG_ATTRIBUTE
 
(int maxCacheItems) - DEPRECATED_MSG_ATTRIBUTE
 

Properties

int connectRetryCount
 
int connectRetryInterval
 
NSTimeInterval timeout
 
OSType playerPixelFormatType
 
BOOL keepLastFrameWhenStop
 
int firstStartPlayBufferTime
 
int nextStartPlayBufferTime
 
NSInteger playerType
 
NSDictionary * headers
 
BOOL enableAccurateSeek
 
BOOL autoRotate
 
BOOL smoothSwitchBitrate
 
NSTimeInterval progressInterval
 
int maxBufferSize
 
int maxPreloadSize
 
NSString * overlayKey
 
NSString * overlayIv
 
BOOL enableRenderProcess
 
long preferredResolution
 
TX_Enum_MediaType mediaType
 
NSDictionary * extInfoMap
 

Method Documentation

◆ DEPRECATED_MSG_ATTRIBUTE() [1/2]

- (NSString* cacheFolderPath) DEPRECATED_MSG_ATTRIBUTE ("Use TXPlayerGlobalSetting##setCacheFolderPath instead.") 

The video cache directory, which takes effect for VOD MP4 and HLS files.

Attention
The cache directory should be used only for video cache, as the SDK may clear files in it.

◆ DEPRECATED_MSG_ATTRIBUTE() [2/2]

- (int maxCacheItems) DEPRECATED_MSG_ATTRIBUTE ("Use TXPlayerGlobalSetting##setMaxCacheSizeMB instead.") 

The maximum number of cache files.

Property Documentation

◆ autoRotate

- (BOOL) autoRotate
readwritenonatomicassign

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 EVT_VIDEO_CHANGE_ROTATION event. Default value: YES.

◆ connectRetryCount

- (int) connectRetryCount
readwritenonatomicassign

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

◆ connectRetryInterval

- (int) connectRetryInterval
readwritenonatomicassign

The interval between player connection retries in seconds. Value range: 3–30. Default value: 3.

◆ enableAccurateSeek

- (BOOL) enableAccurateSeek
readwritenonatomicassign

Whether to enable accurate seek. Default value: YES. After accurate seek is enabled, the seek time increases by 200 ms on average.

◆ enableRenderProcess

- (BOOL) enableRenderProcess
readwritenonatomicassign

This API is used to set whether to display the processing flag. It sets whether to display the postproduction flag after rendering. Postproduction includes features such as super resolution. To use such features, you need to set this flag, which is disabled by default.

◆ extInfoMap

- (NSDictionary*) extInfoMap
readwritenonatomicstrong

This API is used to set the some special configuration items.

◆ firstStartPlayBufferTime

- (int) firstStartPlayBufferTime
readwritenonatomicassign

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

◆ headers

- (NSDictionary*) headers
readwritenonatomicstrong

Custom HTTP headers.

◆ keepLastFrameWhenStop

- (BOOL) keepLastFrameWhenStop
readwritenonatomicassign

Whether to retain the last image frame when stopPlay is called. Default value: NO.

◆ maxBufferSize

- (int) maxBufferSize
readwritenonatomicassign

The maximum preloading buffer size in MB. The setting will affect playableDuration. The greater the value, the more the data that is buffered in advance.

◆ maxPreloadSize

- (int) maxPreloadSize
readwritenonatomicassign

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

◆ mediaType

- (TX_Enum_MediaType) mediaType
readwritenonatomicassign

This API is used to set the media asset type. Note: If adaptive bitrate streaming is used, you need to specify a type. To play back an HLS live stream in adaptive bitrate streaming, you need to pass in the MEDIA_TYPE_HLS_LIVE type.

◆ nextStartPlayBufferTime

- (int) nextStartPlayBufferTime
readwritenonatomicassign

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.

◆ overlayIv

- (NSString*) overlayIv
readwritenonatomiccopy

The encryption IV.

◆ overlayKey

- (NSString*) overlayKey
readwritenonatomiccopy

The encryption key.

◆ playerPixelFormatType

- (OSType) playerPixelFormatType
readwritenonatomicassign

The video format called back by the video rendering object. Valid values: kCVPixelFormatType_32BGRA, kCVPixelFormatType_420YpCbCr8BiPlanarFullRange, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange.

◆ playerType

- (NSInteger) playerType
readwritenonatomicassign

The player type.

◆ preferredResolution

- (long) preferredResolution
readwritenonatomicassign

This API is used to set the most preferred program (bitstream) according to the configured preferredResolution if there are multiple HLS bitstreams. Here, preferredResolution is the product of the video width and height. The value must be an integer greater than or equal to -1. If the default value (-1) is used, the playback kernel will use the information with a lower priority for configuration and select the bitstream closest to the program. The priority order is bitrateIndex > mPreferredBitrate > mPreferredResolution.

◆ progressInterval

- (NSTimeInterval) progressInterval
readwritenonatomicassign

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

◆ smoothSwitchBitrate

- (BOOL) smoothSwitchBitrate
readwritenonatomicassign

Whether to enable smooth bitrate switch. Default value: NO.

◆ timeout

- (NSTimeInterval) timeout
readwritenonatomicassign

The timeout period in seconds. Default value: 10s.

Enumeration Type Documentation

◆ TX_Enum_MediaType

enum TX_Enum_MediaType : NSInteger

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. Currently, the auto type is not supported.

Enumerator
MEDIA_TYPE_AUTO 

The auto type, which is the default value and is not supported for adaptive bitrate streaming currently.

MEDIA_TYPE_HLS_VOD 

The HLS VOD media asset for adaptive bitrate streaming.

MEDIA_TYPE_HLS_LIVE 

The HLS live stream media asset for adaptive bitrate streaming.

◆ TX_Enum_PlayerType

enum TX_Enum_PlayerType : NSInteger

The player type definition.

Enumerator
PLAYER_AVPLAYER 

System-based player.

PLAYER_THUMB_PLAYER 

FFmpeg-based player, which supports software decoding and has a higher compatibility.

◆ TX_Enum_VideoResolution

enum TX_Enum_VideoResolution : NSInteger

The preferred player resolution selected from width * height values of common resolutions, which is be used to assign a value to preferredResolution.

Enumerator
VIDEO_RESOLUTION_720X1280 

RESOLUTION 720X1280.

VIDEO_RESOLUTION_1080X1920 

RESOLUTION 1080X1920.

VIDEO_RESOLUTION_1440X2560 

RESOLUTION 1440X2560.

VIDEO_RESOLUTION_2160X3840 

RESOLUTION 2160X3840.

Variable Documentation

◆ INDEX_AUTO

const NSInteger INDEX_AUTO

Adaptive code rate 'bitrate index' parameter setting