The configuration for encrypted video playback through fileId
.
◆ com::tencent::rtmp::TXPlayerAuthBuilder
class com::tencent::rtmp::TXPlayerAuthBuilder |
◆ getAppId()
This API is used to get the application's appId
.
- Returns
◆ getExper()
This API is used to get the encrypted link timeout timestamp.
- Returns
◆ getFileId()
This API is used to get the file ID.
- Returns
◆ getSign()
This API is used to get the hotlink protection signature.
- Returns
◆ getTimeout()
This API is used to get the encrypted link timeout timestamp.
- Returns
◆ getUs()
This API is used to get the unique request ID.
- Returns
◆ isHttps()
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
-
◆ setExper()
void setExper |
( |
int |
exper | ) |
|
|
inline |
The preview duration in seconds, which is optional.
- Parameters
-
◆ setFileId()
void setFileId |
( |
String |
fileId | ) |
|
|
inline |
The file ID, which is required.
- Parameters
-
◆ setHttps()
void setHttps |
( |
boolean |
https | ) |
|
|
inline |
This API is used to set whether to use HTTPS requests, which is no by default.
- Parameters
-
◆ 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
-
◆ 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
-
◆ setUs()
The unique request ID, which increases the link uniqueness.
- Parameters
-
◆ isHttps
This API is used to set whether to use HTTPS requests, which is no by default.