提交工单
咨询集成、功能及报价等问题
Starts forwarding the specified stream from ZEGO's RTC server to the specified CDN URL. Perform this step before starting to publish the stream.
If you are publishing streams from RTC to CDN, or mixing and publishing streams to CDN, the ZEGO server will automatically handle CDN authentication for you. You do not need to perform additional CDN authentication.
Listed below are the parameters specific to this request and part of the public request parameters. For the complete list of public request parameters, see Server APIs public request parameters.
Parameter | Type | Required | Description |
---|---|---|---|
StreamId |
String |
Yes |
Stream ID. |
CDNUrl |
String |
Yes |
The CDN URL (in RTMP format) to which the stream is to be forwarded. |
Sequence |
String |
Yes |
Request sequence number. For the same stream StreamId, within continuous 10 seconds, it must be ensured that the request sequence number of this StreamId is strictly increasing; this avoids the situation where the server receives requests out of order which may lead to operation confusion. If there is no concurrent scenario, it is recommended to use timestamps (at millisecond level). |
https://rtc-api.zego.im/?Action=CreatCDNTransferRule
&StreamId=rtc01
&CDNUrl=rtmp%3A%2F%2Fwsdemo.zego.im%2Flivestream%2Frtc01
&Sequence=1617249600001
&<Public Request Parameters>
Parameter | Type | Description |
---|---|---|
Code |
Number |
Return code. |
Message |
String |
Description of the request execution result. |
RequestId |
String |
Request ID. |
Data |
Object |
Returned data. |
{
"Code":0,
"Message":"ok",
"RequestId":"918334131114317411",
"Data":null
}
Listed below are the return codes related to this API. For the complete list of return codes, see Return codes.
Return Code | Description | Handling Suggestions |
---|---|---|
5000, 5001, 5002, 5006, 30003 | Internal error. | Please contact ZEGOCLOUD technical support for handling. |
5003 | Authentication failed. | Please check if the signature Signature is correct. |
5004 | Invalid CDN address. | Please check if the request parameter CDNUrl is correct. |
5005 | Invalid request. | Please contact ZEGOCLOUD technical support for handling. |
5007, 30002 | API call frequency is too high. | Please reduce the API request frequency. |
30001 | Invalid CDN address. | Please check if the request parameter CDNUrl is correct. |
30004 | Incorrect parameter isTest. | Please check if the common request parameter isTest is correct. |
30005 | Invalid AppId. | Please check if the AppId is correct. |
30009 | Invalid StreamId, stream name is not standard. | Please check if the StreamId conforms to the stream name coding standards. |