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

Data Structures

class  TXPlayerAuthBuilder
 

Detailed Description

The configuration for encrypted video playback through fileId.


Data Structure Documentation

◆ com::tencent::rtmp::TXPlayerAuthBuilder

class com::tencent::rtmp::TXPlayerAuthBuilder

Public Member Functions

int getAppId ()
 
String getFileId ()
 
String getTimeout ()
 
int getExper ()
 
String getSign ()
 
String getUs ()
 
boolean isHttps ()
 
void setAppId (int appId)
 
void setFileId (String fileId)
 
void setTimeout (String timeout)
 
void setUs (String us)
 
void setExper (int exper)
 
void setSign (String sign)
 
void setHttps (boolean https)
 

Protected Attributes

boolean isHttps
 

Member Function Documentation

◆ getAppId()

int getAppId ( )
inline

This API is used to get the application's appId.

Returns

◆ getExper()

int getExper ( )
inline

This API is used to get the encrypted link timeout timestamp.

Returns

◆ getFileId()

String getFileId ( )
inline

This API is used to get the file ID.

Returns

◆ getSign()

String getSign ( )
inline

This API is used to get the hotlink protection signature.

Returns

◆ getTimeout()

String getTimeout ( )
inline

This API is used to get the encrypted link timeout timestamp.

Returns

◆ getUs()

String getUs ( )
inline

This API is used to get the unique request ID.

Returns

◆ isHttps()

boolean isHttps ( )
inline

This API is used to query whether HTTPS requests are used.

Returns

◆ setAppId()

void setAppId ( int  appId)
inline

The application's appId, which is required.

Parameters
appId

◆ setExper()

void setExper ( int  exper)
inline

The preview duration in seconds, which is optional.

Parameters
exper

◆ setFileId()

void setFileId ( String  fileId)
inline

The file ID, which is required.

Parameters
fileIdFor detailed directions on how to get fileid, visit https://cloud.tencent.com/document/product/454/12148#step-3.3A-.E5.90.AF.E5.8A.A8.E6.92.AD.E6.94.BE

◆ setHttps()

void setHttps ( boolean  https)
inline

This API is used to set whether to use HTTPS requests, which is no by default.

Parameters
https

◆ setSign()

void setSign ( String  sign)
inline

If hotlink protection is not used, leave this parameter empty.

General hotlink protection signature:

sign = md5(KEY+appId+fileId+t+us)

Preview-enabled hotlink protection signature:

sign = md5(KEY+appId+fileId+t+exper+us)

The hotlink protection parameters (t, us, and exper) used by the player APIs are the same as those in CDN, and the only difference is the calculation method of sign.

For more information, visit https://www.tencentcloud.com/document/product/266/33984?lang=en&pg=3.

Parameters
sign

◆ setTimeout()

void setTimeout ( String  timeout)
inline

The encrypted link timeout timestamp, which is optional and will be converted to a hexadecimal lowercase string. The CDN server will determine whether the link is valid based on the timestamp.

Parameters
timeout

◆ setUs()

void setUs ( String  us)
inline

The unique request ID, which increases the link uniqueness.

Parameters
us

Field Documentation

◆ isHttps

boolean isHttps
protected

This API is used to set whether to use HTTPS requests, which is no by default.