Creates tasks to prefetch live streams in batches.
Operation description
You can specify up to 100 URLs in a request.
URLs in the HTTP Live Steaming (HLS) format are not supported.
QPS limit
You can call this operation up to 50 times per second per account. Requests that exceed this limit are dropped and you may experience service interruptions.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
live:SetLiveStreamPreloadTasks | *Domain
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
RegionId | string | No | The region ID. | cn-shanghai |
DomainName | string | Yes | The streaming domain name. | example.com |
PlayUrl | string | Yes | A comma-separated list of the live stream URLs to prefetch. You can specify up to 100 URLs. | rtmp://guide.aliyundoc.com/liveApp****/liveStream**** |
Area | string | No | The acceleration region where you want to prefetch the live content. Valid values:
If you do not specify this parameter, the acceleration region of the domain name is used. | domestic |
PreloadedStartTime | string | No | The start time of the prefetch task. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. If you do not specify this parameter, the prefetch task runs for 1 hour by default. | 2016-06-29T19:00:00Z |
PreloadedEndTime | string | No | The end time of the prefetch task. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. The interval between the start time and end time cannot exceed 6 hours. | 2016-06-30T19:00:00Z |
Response elements
Parameter | Type | Description | Example |
object | |||
FailedURL | integer | The number of URLs in the request for which a prefetch task failed to be created. | 0 |
| PreloadTasksMessages | object | ||
| PreloadTasksMessage | array<object> | The details of the prefetch tasks. | |
object | The details of the prefetch tasks. | ||
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 overall status of the task creation request. Valid values:
Note Success is returned only if the prefetch task is configured for all specified URLs. | Success |
SuccessURL | integer | The number of URLs in the request for which a prefetch task was created. | 1 |
TotalURL | integer | The total number of URLs submitted in the request. | 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.