Starts playback for an episode list.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 for which you want to start playback.

ResumeMode String No Custom

The method to resume the playback of the episode list. Valid values:

  • Restart: resumes the playback from the first episode.
  • Continue: resumes the playback from the episode where the previous playback stops.
  • Custom: resumes the playback from a custom position.
StartItemId String No asdfasdfasdf****

The ID of the first episode to play. This episode is the first to play in carousel playback.

Note If you set the ResumeMode parameter to Custom, this parameter is required.
Offset Integer No 10000

The offset of the position where the system starts to play the episode. This parameter is returned only if the episode resource is a 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 that started to play.

RequestId String 5c6a2a0d-f228-4a64-af62-20e91b96****

The ID of the request.

StreamInfo Struct

The information about the stream that is used to play the episode list.

AppName String caster

The name of the application.

DomainName String yourdomainname.com

The main streaming domain.

StreamName String streamname

The name of the live stream.

Streams Array of Stream

The information about the live stream that was generated for playback based on different protocols.

Stream
PullFlvUrl String http://yourdomainname.com/caster/streamname.flv?auth_key=1612772224-0-0-3632be7cd9907169e8b09e91099c****

The Flash Video (FV) URL of the live stream.

PullM3U8Url String rtmp:///yourdomainname.com/caster/streamname?auth_key=1612772224-0-0-4404ca59c0246226d49d01f734b1****

The Real-Time Messaging Protocol (RTMP) URL of the live stream.

PullRtmpUrl String http://yourdomainname.com/caster/streamname.m3u8?auth_key=1612772224-0-0-919a023a127156fe82e3562c3b3b****

The M3U8 URL of the live stream.

Quality String original

The image quality of the live stream. Valid value:

original: original quality

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=StartPlaylist
&ProgramId=445409ec-7eaa-461d-8f29-4bec2eb9****
&ResumeMode=Custom
&StartItemId=asdfasdfasdf****
&Offset=10000
&<Common request parameters>

Sample success responses

XML format

<StartPlaylistResponse>
      <RequestId>5c6a2a0d-f228-4a64-af62-20e91b96****</RequestId>
      <StreamInfo>
           <StreamName>streamname</StreamName>
           <DomainName>yourdomainname.com</DomainName>
           <AppName>caster</AppName>
          <Streams>
                <Stream>
                      <PullFlvUrl>http://yourdomainname.com/caster/streamname.flv?auth_key=1612772224-0-0-3632be7cd9907169e8b09e91099c****</PullFlvUrl>
                     <PullM3U8Url>rtmp:///yourdomainname.com/caster/streamname?auth_key=1612772224-0-0-4404ca59c0246226d49d01f734b1****</PullM3U8Url>
                        <Quality>original</Quality>
                        <PullRtmpUrl>http://yourdomainname.com/caster/streamname.m3u8?auth_key=1612772224-0-0-919a023a127156fe82e3562c3b3b****</PullRtmpUrl>
                  </Stream>
          </Streams>
      </StreamInfo>
      <ProgramId>445409ec-7eaa-461d-8f29-4bec2eb9****</ProgramId>
</StartPlaylistResponse>

JSON format

{
    "RequestId":"5c6a2a0d-f228-4a64-af62-20e91b96****",
    "StreamInfo":{
        "StreamName":"streamname",
        "DomainName":"yourdomainname.com",
        "AppName":"caster",
        "Streams":{
            "Stream":[{
                "PullFlvUrl":"http://yourdomainname.com/caster/streamname.flv?auth_key=1612772224-0-0-3632be7cd9907169e8b09e91099c****",
                "PullM3U8Url":"rtmp:///yourdomainname.com/caster/streamname?auth_key=1612772224-0-0-4404ca59c0246226d49d01f734b1****","Quality":"original",
                "PullRtmpUrl":"http://yourdomainname.com/caster/streamname.m3u8?auth_key=1612772224-0-0-919a023a127156fe82e3562c3b3b****"
                }]
        }
    },
    "ProgramId":"445409ec-7eaa-461d-8f29-4bec2eb9****"
}

Error codes

For a list of error codes, visit the API Error Center.