Configures a prefetch task.
Usage notes
You can call this operation to specify multiple URLs to prefetch at a time. 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 will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | SetLiveStreamPreloadTasks | The operation that you want to perform. Set the value to SetLiveStreamPreloadTasks. |
DomainName | String | Yes | example.com | The streaming domain. |
PlayUrl | String | Yes | rtmp://guide.aliyundoc.com/liveApp****/liveStream**** | The streaming URL. You can specify up to 100 streaming URLs at a time. Separate multiple streaming URLs with commas (,). |
Area | String | No | domestic | The acceleration region of the prefetch task. Valid values:
|
PreloadedStartTime | String | No | 2016-06-29T19:00:00Z | 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. Example: 2016-06-29T19:00:00Z. If you do not specify this parameter, the prefetch task runs for 1 hour by default. |
PreloadedEndTime | String | No | 2016-06-30T19:00:00Z | 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. Example: 2016-06-30T19:00:00Z. The maximum time range that can be specified by the EndTime and StartTime parameters is 6 hours. |
Response parameters
Parameter | Type | Example | Description |
FailedURL | Integer | 0 | The number of URLs that failed to be configured for the prefetch task. |
PreloadTasksMessages | Array of PreloadTasksMessage | The details. | |
PreloadTasksMessage | |||
Description | String | Successfully | Indicates whether the prefetch task is successful. Valid values:
|
PlayUrl | String | rtmp://guide.aliyundoc.com/liveApp****/liveStream**** | The streaming URL. |
TaskId | String | yourTaskId | The task ID. |
RequestId | String | 36E0E523-E0C6-5D95-A465-A8EA2DCBA2A5 | The request ID. |
Status | String | Success | The task status. Valid values:
Note The value is Failed if any URL failed to be configured. |
SuccessURL | Integer | 1 | The number of URLs that were successfully configured for the prefetch task. |
TotalURL | Integer | 1 | The total number of URLs in the prefetch task. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=SetLiveStreamPreloadTasks
&DomainName=example.com
&PlayUrl=rtmp://guide.aliyundoc.com/liveApp****/liveStream****
&Area=domestic
&PreloadedStartTime=2016-06-29T19:00:00Z
&PreloadedEndTime=2016-06-30T19:00:00Z
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<SetLiveStreamPreloadTasksResponse>
<FailedURL>0</FailedURL>
<PreloadTasksMessages>
<Description>Successfully</Description>
<PlayUrl>rtmp://guide.aliyundoc.com/liveApp****/liveStream****</PlayUrl>
<TaskId>yourTaskId</TaskId>
</PreloadTasksMessages>
<RequestId>36E0E523-E0C6-5D95-A465-A8EA2DCBA2A5</RequestId>
<Status>Success</Status>
<SuccessURL>1</SuccessURL>
<TotalURL>1</TotalURL>
</SetLiveStreamPreloadTasksResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"FailedURL" : 0,
"PreloadTasksMessages" : [ {
"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
For a list of error codes, see Service error codes.