tencent cloud

APIs

HandleCurrentPlaylist

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-09-18 18:10:36

1. API Description

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

Perform operations on the carousel current playlist. Supported operations:

  • Insert: insert a play program into the current playlist.
  • Delete: delete a play program from 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 playback list. The inserted program remains valid in subsequent carousel processes.
  • InsertTemporary: temporarily insert a program into the current playback list. Temporarily inserted programs are only effective during this carousel process.
  • Delete: delete a program from the playback list. Cannot delete currently playing programs.
  • ItemId No String Playlist program ID.
  • When Operation is Insert, this field is required, indicating that 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 behind the SegmentIndex fragment of the program corresponding to ItemId. Otherwise, it is inserted after this program.
  • When Operation is Delete, this field is required, indicating deletion of this program. Currently playing programs cannot be deleted.
  • SegmentIndex No Integer Index number of the M3U8 file segment. The SegmentIndex of the first segment 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. The maximum list length is 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 the 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 RoundPlayId parameter error.
    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.

    Bantuan dan Dukungan

    Apakah halaman ini membantu?

    masukan