Sets live stream prefetch tasks. You can prefetch up to 100 live streams in a batch.
Operation description
You can call this operation to set live stream prefetch tasks in batches. You can set up to 100 live stream URLs at a time.
Live stream prefetch does not support HLS URLs.
QPS limit
The single-user QPS limit for this operation is 50 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Call this operation as needed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:SetLiveStreamPreloadTasks |
none |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| DomainName |
string |
Yes |
The streaming domain. |
example.com |
| PlayUrl |
string |
Yes |
The live stream URLs. You can specify multiple URLs separated by commas (,). A maximum of 100 URLs can be specified. |
rtmp://guide.aliyundoc.com/liveApp****/liveStream**** |
| Area |
string |
No |
The prefetch area. Valid values:
If you do not specify this parameter, the default prefetch area is the acceleration region configured for your domain name. Valid values:
|
domestic |
| PreloadedStartTime |
string |
No |
The start time of the prefetch task in UTC. Example: 2016-06-29T19:00:00Z. If you do not specify this parameter, the default prefetch duration is 1 hour. |
2016-06-29T19:00:00Z |
| PreloadedEndTime |
string |
No |
The end time of the prefetch task in UTC. Example: 2016-06-30T19:00:00Z. The interval between EndTime and StartTime cannot exceed 6 hours. |
2016-06-30T19:00:00Z |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| FailedURL |
integer |
The number of URLs for which the prefetch task failed. |
0 |
| PreloadTasksMessages |
object |
||
| PreloadTasksMessage |
array<object> |
The details of the live stream prefetch task. |
|
|
object |
The details of the live stream prefetch task. |
||
| Description |
string |
Indicates if the prefetch task for a URL was created. Valid values:
|
Successfully |
| PlayUrl |
string |
The live stream URL. |
rtmp://guide.aliyundoc.com/liveApp****/liveStream**** |
| TaskId |
string |
The task ID. |
yourTaskId |
| RequestId |
string |
The request ID. |
36E0E523-E0C6-5D95-A465-A8EA2DCBA2A5 |
| Status |
string |
The task status. Valid values:
Note
The status is Failed if any task fails to be created. |
Success |
| SuccessURL |
integer |
The number of URLs for which the prefetch task succeeded. |
1 |
| TotalURL |
integer |
The total number of URLs in the prefetch task. |
1 |
Examples
Success response
JSON format
{
"FailedURL": 0,
"PreloadTasksMessages": {
"PreloadTasksMessage": [
{
"Description": "Successfully",
"PlayUrl": "rtmp://guide.aliyundoc.com/liveApp****/liveStream****",
"TaskId": "yourTaskId"
}
]
},
"RequestId": "36E0E523-E0C6-5D95-A465-A8EA2DCBA2A5",
"Status": "Success",
"SuccessURL": 1,
"TotalURL": 1
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParam | Parameter invalid. | Illegal input parameters |
| 400 | InvalidEndTime.Mismatch | Specified end time does not match the specified start time. | |
| 400 | Duration.Exceed | Duration between StartTime and EndTime is too long. | |
| 400 | QuotaExceeded.PreloadTaskslimit | Exceed max task count limit | |
| 400 | NoSpecialConfiguration | no special configuration for domain name. | |
| 500 | InternalError | The request processing has failed due to backend service exception. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.