Switches to a specified episode.
Usage notes
After you add episodes to an episode list and start a live stream, you can call this operation to switch between episodes. For information about how to add episodes to an episode list, see AddShowIntoShowList.
QPS limit
You can send up to 10 requests per second to call this operation by using your Alibaba Cloud account. If the number of the calls per second exceeds the limit, throttling is triggered. This may affect your business. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit on an API operation in ApsaraVideo Live.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | PlayChoosenShow |
The operation that you want to perform. Set the value to PlayChoosenShow. |
CasterId | String | Yes | LIVEPRODUCER_POST-cn-0pp1czt**** |
The ID of the production studio instance.
Note The value displayed in the Name column for an instance on the Production Studio Management
page is the ID of the instance.
|
ShowId | String | Yes | a2b8e671-2fe5-4642-a2ec-bf93880e**** |
The ID of the episode to be switched to. Note You can obtain the episode ID from the response parameters of AddShowIntoShowList or DescribeShowList.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
The ID of the request. |
ShowId | String | a2b8e671-2fe5-4642-a2ec-bf93880e**** |
The ID of the episode. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=PlayChoosenShow
&CasterId=LIVEPRODUCER_POST-cn-0pp1czt****
&ShowId=a2b8e671-2fe5-4642-a2ec-bf93880e****
&<Common request parameters>
Sample success responses
XML
format
<PlayChoosenShowResponse>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
<ShowId>a2b8e671-2fe5-4642-a2ec-bf93880e****</ShowId>
</PlayChoosenShowResponse>
JSON
format
{"RequestId":"16A96B9A-F203-4EC5-8E43-CB92E68F4CD8","ShowId":"a2b8e671-2fe5-4642-a2ec-bf93880e****"}
Error codes
For a list of error codes, visit the API Error Center.
Sample code
public static DefaultAcsClient initClient(String accessKeyId, String accessKeySecret) throws ClientException {
String regionId = "cn-shanghai";
DefaultProfile profile = DefaultProfile.getProfile(regionId, accessKeyId, accessKeySecret);
DefaultAcsClient client = new DefaultAcsClient(profile);
return client;
}
private static void playChoosenShow(DefaultAcsClient client, String casterId, String showId) throws ClientException {
CommonRequest playChoosenShow = new CommonRequest();
playChoosenShow.setSysDomain("live.aliyuncs.com");
playChoosenShow.setSysVersion("2016-11-01");
playChoosenShow.setSysAction("playChoosenShow");
playChoosenShow.putQueryParameter("CasterId", casterId);
playChoosenShow.putQueryParameter("ShowId", showId);
CommonResponse playChoosenShowResponse = client.getCommonResponse(playChoosenShow);
System.out.println("Manual switching of showId: "+showId+" completed");
}
public void playChooseShow() throws ClientException {
DefaultAcsClient client = initClient(ACCESS_KEY_ID, ACCESS_KEY_SECRET);
String showId= "";
playChoosenShow(client,testCasterId,showId);
}