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.
TXVodDownloadDataSource

Data Structures

class  TXVodDownloadDataSource
 

Detailed Description


Data Structure Documentation

◆ com::tencent::rtmp::downloader::TXVodDownloadDataSource

class com::tencent::rtmp::downloader::TXVodDownloadDataSource

Public Member Functions

 TXVodDownloadDataSource (int appId, String fileId, int quality, String pSign, String userName)
 
 TXVodDownloadDataSource (TXPlayerAuthBuilder authBuilder, int quality)
 
 TXVodDownloadDataSource (TXPlayerAuthBuilder authBuilder, String templateName)
 
String getFileId ()
 
String getPSign ()
 
void setQuality (int quality)
 
void setToken (String token)
 
TXPlayerAuthBuilder getAuthBuilder ()
 
int getQuality ()
 
String getTemplateName ()
 
String getToken ()
 
int getAppId ()
 
String getUserName ()
 
String getOverlayKey ()
 
String getOverlayIv ()
 

Static Public Attributes

static final int QUALITY_OD = 0
 
static final int QUALITY_FLU = 1
 
static final int QUALITY_SD = 2
 
static final int QUALITY_HD = 3
 
static final int QUALITY_FHD = 4
 
static final int QUALITY_2K = 5
 
static final int QUALITY_4K = 6
 
static final int QUALITY_UNK = 1000
 

Protected Member Functions

 TXVodDownloadDataSource ()
 

Protected Attributes

int appId = -1
 
String fileId = ""
 
String pSign = ""
 
int quality = QUALITY_UNK
 
String userName = "default"
 
TXPlayerAuthBuilder authBuilder
 
String token
 
String templateName
 
String overlayKey = ""
 
String overlayIv = ""
 

Constructor & Destructor Documentation

◆ TXVodDownloadDataSource() [1/4]

TXVodDownloadDataSource ( int  appId,
String  fileId,
int  quality,
String  pSign,
String  userName 
)
inline

Create a download source. We recommend you use the download parameter fileId of VOD v4.

Parameters
appIdThe appId of the video file
fileIdThe video file ID
qualityThe resolution of the stream to be downloaded. The last stream returned by the Tencent Cloud service will be downloaded by default.
pSignThe video encryption signature, which is required for encrypted videos
userNameThe account name, which will be default if no value is passed in.

◆ TXVodDownloadDataSource() [2/4]

TXVodDownloadDataSource ( TXPlayerAuthBuilder  authBuilder,
int  quality 
)
inline

Create a download source. It is used for compatibility with the download parameter fileId of VOD v2. It will be disused soon and thus is not recommended.

Parameters
authBuilder
qualityThe definition @Deprecated We recommend you use TXVodDownloadDataSource(int, String, int, String, String).

◆ TXVodDownloadDataSource() [3/4]

TXVodDownloadDataSource ( TXPlayerAuthBuilder  authBuilder,
String  templateName 
)
inline

Create a download source. It is used for compatibility with the download parameter fileId of VOD v2. It will be disused soon and thus is not recommended.

Parameters
authBuilder
templateNameThe template name, which is required if a custom template is used. @Deprecated We recommend you use TXVodDownloadDataSource(int, String, int, String, String).

◆ TXVodDownloadDataSource() [4/4]

TXVodDownloadDataSource ( )
inlineprotected

VOD download data source

Member Function Documentation

◆ getAppId()

int getAppId ( )
inline

Return the appId

Returns

◆ getAuthBuilder()

TXPlayerAuthBuilder getAuthBuilder ( )
inline

Return the authBuilder

Returns
Deprecated:

◆ getFileId()

String getFileId ( )
inline

Return the file ID

Returns

◆ getOverlayIv()

String getOverlayIv ( )
inline

Return the overlayIv

Returns

◆ getOverlayKey()

String getOverlayKey ( )
inline

Return the overlayKey

Returns

◆ getPSign()

String getPSign ( )
inline

Return the signature string

Returns

◆ getQuality()

int getQuality ( )
inline

Return the quality

Returns

◆ getTemplateName()

String getTemplateName ( )
inline

Return the template

Deprecated:

◆ getToken()

String getToken ( )
inline

Return the token

◆ getUserName()

String getUserName ( )
inline

Return the userName

Returns

◆ setQuality()

void setQuality ( int  quality)
inline

Set the definition

◆ setToken()

void setToken ( String  token)
inline

After this value is set, the player will automatically add voddrm.token.<Token> before the filename in the URL.

Parameters
token

Field Documentation

◆ appId

int appId = -1
protected

The appId of the file to be downloaded, which is required.

◆ authBuilder

TXPlayerAuthBuilder authBuilder
protected

◆ fileId

String fileId = ""
protected

The ID of file to be downloaded, which is required.

◆ overlayIv

String overlayIv = ""
protected

◆ overlayKey

String overlayKey = ""
protected

◆ pSign

String pSign = ""
protected

The encryption signature, which is required for encrypted videos.

◆ quality

int quality = QUALITY_UNK
protected

The definition ID.

◆ QUALITY_2K

final int QUALITY_2K = 5
static

2K

◆ QUALITY_4K

final int QUALITY_4K = 6
static

4K

◆ QUALITY_FHD

final int QUALITY_FHD = 4
static

FHD.

◆ QUALITY_FLU

final int QUALITY_FLU = 1
static

LD.

◆ QUALITY_HD

final int QUALITY_HD = 3
static

HD.

◆ QUALITY_OD

final int QUALITY_OD = 0
static

Original resolution.

◆ QUALITY_SD

final int QUALITY_SD = 2
static

SD.

◆ QUALITY_UNK

final int QUALITY_UNK = 1000
static

UnKnow.

◆ templateName

String templateName
protected

◆ token

String token
protected

◆ userName

String userName = "default"
protected

The account name.