Starts playing an episode list.
Usage notes
You can call the AddPlaylistItems operation to add episodes to an episode list and then call this operation to start playing the episode list.
QPS limit
You can call this operation up to 10 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 | StartPlaylist | The operation that you want to perform. Set the value to StartPlaylist. |
ProgramId | String | Yes | 445409ec-7eaa-461d-8f29-4bec2eb9**** | The ID of the episode list. If you call the AddPlaylistItems operation to add episodes to an episode list, you can obtain the ID of the episode list from the ProgramId parameter in the response. |
ResumeMode | String | No | Custom | The method to resume the playback of the episode list. Valid values:
|
StartItemId | String | No | asdfasdfasdf**** | The ID of the first episode to play. This episode is the first to play in carousel playback. Important This parameter is required only if you set ResumeMode to Custom.
|
Offset | Integer | No | 10000 | The offset of the position where the system starts the playback. This parameter takes effect only if the input source is a video file. Unit: milliseconds. A value greater than 0 indicates an offset from the first frame. |
Response parameters
Parameter |
Type |
Example |
Description |
ProgramId | String | 445409ec-7eaa-461d-8f29-4bec2eb9**** | The ID of the episode list. You can use the ID as a request parameter in the API operation that is used to stop playing the episode list. |
RequestId | String | 5c6a2a0d-f228-4a64-af62-20e91b96**** | The request ID. |
StreamInfo | Object | The information about the live stream. |
|
AppName | String | liveApp**** | The name of the application. |
DomainName | String | example.com | The main streaming domain. |
StreamName | String | liveStream**** | The name of the live stream. |
Streams | Array of Stream | The streaming URLs. |
|
Stream | |||
PullFlvUrl | String | http://aliyundoc.com/caster/liveStream****.flv?auth_key=1612772224-0-0-3632be7cd9907169e8b09e91099c**** | The streaming URL in the Flash Video (FLV) format. |
PullM3U8Url | String | rtmp:///aliyundoc.com/caster/liveStream****?auth_key=1612772224-0-0-4404ca59c0246226d49d01f734b1**** | The streaming URL in the Real-Time Messaging Protocol (RTMP) format. |
PullRtmpUrl | String | http://aliyundoc.com/caster/liveStream****.m3u8?auth_key=1612772224-0-0-919a023a127156fe82e3562c3b3b**** | The streaming URL in the M3U8 format. |
Quality | String | original | The video quality of the live stream. Valid values: original: original quality |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=StartPlaylist
&ProgramId=445409ec-7eaa-461d-8f29-4bec2eb9****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<StartPlaylistResponse>
<ProgramId>445409ec-7eaa-461d-8f29-4bec2eb9****</ProgramId>
<RequestId>5c6a2a0d-f228-4a64-af62-20e91b96****</RequestId>
<StreamInfo>
<AppName>liveApp****</AppName>
<DomainName>example.com</DomainName>
<StreamName>liveStream****</StreamName>
<Streams>
<PullFlvUrl>http://aliyundoc.com/caster/liveStream****.flv?auth_key=1612772224-0-0-3632be7cd9907169e8b09e91099c****</PullFlvUrl>
<PullM3U8Url>rtmp:///aliyundoc.com/caster/liveStream****?auth_key=1612772224-0-0-4404ca59c0246226d49d01f734b1****</PullM3U8Url>
<PullRtmpUrl>http://aliyundoc.com/caster/liveStream****.m3u8?auth_key=1612772224-0-0-919a023a127156fe82e3562c3b3b****</PullRtmpUrl>
<Quality>original</Quality>
</Streams>
</StreamInfo>
</StartPlaylistResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"ProgramId" : "445409ec-7eaa-461d-8f29-4bec2eb9****",
"RequestId" : "5c6a2a0d-f228-4a64-af62-20e91b96****",
"StreamInfo" : {
"AppName" : "liveApp****",
"DomainName" : "example.com",
"StreamName" : "liveStream****",
"Streams" : [ {
"PullFlvUrl" : "http://aliyundoc.com/caster/liveStream****.flv?auth_key=1612772224-0-0-3632be7cd9907169e8b09e91099c****",
"PullM3U8Url" : "rtmp:///aliyundoc.com/caster/liveStream****?auth_key=1612772224-0-0-4404ca59c0246226d49d01f734b1****",
"PullRtmpUrl" : "http://aliyundoc.com/caster/liveStream****.m3u8?auth_key=1612772224-0-0-919a023a127156fe82e3562c3b3b****",
"Quality" : "original"
} ]
}
}
Error codes
For a list of error codes, see Service error codes.