How to Splice a Push URL
Last updated: 2020-02-25 09:31:29PDF
You can use the URL Generator in the LVB Console to generate push and playback addresses. If there are many live rooms, you can splice such addresses on the server. Any URL that meets Tencent Cloud standards can be used for push.
Push domain name, which can be the default push domain name provided by Tencent Cloud LVB or your own push domain name.
Application name, which is "live" by default. If you want to customize it, submit a ticket for configuration.
- StreamName (stream ID)
Custom stream name, which is used to identify a live stream. You are recommended to use an authentication key containing random digits or a combination of digits and letters. It has two parts: txSecret and txTime. If push authentication is enabled, the URL used for push should contain the authentication key; otherwise, it does not need to contain the "?" and the content behind.
- txTime (address validity period)
It refers to the time when the URL expires. It is expressed as a hexadecimal UNIX timestamp, for example, 5867D600 indicates the URL will expire at 00:00:00 AM on Jan. 1, 2017. Generally, txTime is set to a time which is 24 hours later than the current time. It is not recommended to set a too short nor too long validity period to avoid the inability of VJ to restore push in case of a flash breakdown of network during the broadcasting.
- txSecret (hotlink protection signature)
This refers to hotlink protection signature, which is used to prevent attackers from simulating your backend server to generate push URLs. For more information about the computing method, see Best Practice-Computing of Hotlink Protection.
- Sample code
Go to LVB Console > Domain Management, select a pre-configured push domain name, click Manage > Push Configuration to display the Push Address Sample Code (for both PHP and Java) that demonstrates how to generate a hotlink protection address.