tencent cloud

云点播

HandleCurrentPlaylist

下载
聚焦模式
字号
最后更新时间: 2026-09-22 21:50:01

1. API Description

Domain name for API request: vod.intl.tencentcloudapi.com.

Perform operations on the carousel current playlist. Supported operations:

  • Insert: Insert a program into the current playlist.
  • Delete: Delete a program in the playlist.
  • A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: HandleCurrentPlaylist.
    Version Yes String Common Params. The value used for this API: 2018-07-17.
    Region No String Common Params. This parameter is not required.
    SubAppId Yes Integer VOD application ID.
    RoundPlayId Yes String Carousel playlist unique identifier.
    Operation Yes String Operation type. Valid values:
  • Insert: Insert a program into the current playlist. The inserted program remains valid in subsequent carousel processes.
  • InsertTemporary: Temporarily insert a program into the current playlist. Temporarily inserted programs are only effective during this carousel process.
  • Delete: Delete a program from the playlist. Currently playing programs cannot be deleted.
  • ItemId No String Playlist program ID.
  • When Operation is Insert, this field is required. It means the inserted program list is located after this program.
  • When Operation is InsertTemporary, this field is optional. If not filled in, the program is inserted at the latest insertion point. If this field is filled in and SegmentIndex is also filled in, the program is inserted after the SegmentIndex fragment of the program corresponding to ItemId. Otherwise, it is inserted after this program.
  • When Operation is Delete, this field is required. It means to delete this program. Currently playing programs cannot be deleted.
  • SegmentIndex No Integer Index number of the M3U8 file shard. The SegmentIndex of the first shard in an M3U8 file is 0. This parameter is valid when Operation is InsertTemporary and ItemId has a value.
    RoundPlaylist.N No Array of RoundPlayListItemInfo Program list. Required when Operation is Insert, InsertTemporary, or Delete. Indicates the program list to operate. Maximum list length: 10.

    3. Output Parameters

    Parameter Name Type Description
    RoundPlaylist Array of RoundPlayListItemInfo List of successfully operated programs.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Insert a program after program a003 in the current playlist

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: HandleCurrentPlaylist
    <Common request parameters>
    
    {
        "SubAppId": 123,
        "RoundPlayId": "130",
        "Operation": "Insert",
        "ItemId": "a003",
        "RoundPlaylist": [
            {
                "FileId": "528xxx5487985271487",
                "AudioVideoType": "Transcode",
                "Definition": 100210
            }
        ]
    }

    Output Example

    {
        "Response": {
            "RoundPlaylist": [
                {
                    "ItemId": "a01",
                    "AudioVideoType": "Transcode",
                    "Definition": 100,
                    "FileId": "528xxx5487985271487"
                }
            ],
            "RequestId": "6xxxxe3a-6b8e-4b4e-9256-fdc700064ef3"
        }
    }

    Example2 Delete a Program From a Playback List

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: HandleCurrentPlaylist
    <Common request parameters>
    
    {
        "SubAppId": 123,
        "RoundPlayId": "130",
        "Operation": "Delete",
        "RoundPlaylist": [
            {
                "ItemId": "a004",
                "FileId": "",
                "AudioVideoType": ""
            }
        ]
    }

    Output Example

    {
        "Response": {
            "RoundPlaylist": [
                {
                    "ItemId": "a004",
                    "AudioVideoType": "",
                    "Definition": 100,
                    "FileId": ""
                }
            ],
            "RequestId": "6xxxxe3a-6b8e-4b4e-9256-fdc700064ef3"
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidParameterValue.FileId FileId does not exist.
    InvalidParameterValue.Index Index parameter error.
    InvalidParameterValue.ItemId ItemId error.
    InvalidParameterValue.RoundPlayId Invalid parameter: RoundPlayId.
    InvalidParameterValue.RoundPlaylist Invalid RoundPlaylist parameter length.
    InvalidParameterValue.SubAppId Parameter value error: app ID.
    LimitExceeded.PlayList Playlist length is too large.
    LimitExceeded.RoundPlaylist The playlist length exceeds the upper limit.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈