All Products
Search
Document Center

ApsaraVideo VOD:Audio and video refresh or prefetch completed

Last Updated:Sep 14, 2026

Learn about the SubmitMediaRefreshComplete event, including its notification content and callback examples.

Event type

SubmitMediaRefreshComplete

Event description

When you call the RefreshMediaPlayUrls operation, ApsaraVideo VOD submits a separate refresh or prefetch request for each playback URL of a media file, generating multiple task IDs. The SubmitMediaRefreshComplete event is triggered after all requests are submitted.

Note

This callback event cannot be configured in the ApsaraVideo VOD console. To configure it, call the SetMessageCallback operation.

Event content

Parameter Name

Type

Required

Description

EventTime

String

Yes

The time when the event was generated, in the yyyy-MM-ddTHH:mm:ssZ format (UTC).

EventType

String

Yes

The event type. The value is fixed to SubmitMediaRefreshComplete.

Status

String

Yes

Whether the refresh or prefetch task was successfully submitted. Valid values:

  • success

  • fail

MediaRefreshJobId

String

Yes

The ID of the refresh or prefetch job.

MediaId

String

Yes

The media ID, which can be an audio ID or a video ID.

TaskType

String

Yes

The task type. Valid values:

  • Refresh

  • Preload: Prefetch

SuccessPlayUrls

String

Yes

The playback URLs for which refresh or prefetch tasks were successfully submitted. Multiple URLs are separated by commas (,).

TaskIds

String

Yes

The IDs of the refresh or prefetch tasks for the playback URLs. Each URL corresponds to one task ID. You can use these task IDs to query the status of each task by calling the DescribeVodRefreshTasks operation.

FilterPolicy

String

Yes

The policy for filtering playback streams, in JSON format.

Extend

String

No

Custom pass-through parameters.

ErrorCode

String

No

The error code, returned when the refresh or prefetch task fails to be submitted.

ErrorMessage

String

No

The error message, returned when the refresh or prefetch task fails to be submitted.

Callback examples

The following notes apply to the callback examples:

  • For HTTP callbacks, the following content is the HTTP POST body.

  • For MNS callbacks, the following content is the message body.

  • Successful task submission:

    {
    "SuccessPlayUrls":"https://shenzhen.****.aliyuncdn.com/2defb8b2cb85b87206646055c95****/62948766/sv/4841bb0f-1810a5fc460/4841bb0f-1810a5****.mp4",
    "Status":"success",
    "MediaId":"affab1a4c6ed4408aead501f32b5****",
    "FilterPolicy":"{\"SliceFlag\":false,\"ResultType\":\"Single\"}",
    "TaskIds":"1460435****",
    "EventType":"SubmitMediaRefreshComplete",
    "EventTime":"2022-05-30T08:59:21Z",
    "MediaRefreshJobId":"c5ae61bf9af1****",
    "TaskType":"refresh"
    }
  • Failed task submission:

    {
    "Status":"fail",
    "MediaId":"e8a73a514fb74fd79ff77c26dbfb****",
    "FilterPolicy":"{\"SliceFlag\":false,\"ResultType\":\"Single\"}",
    "EventType":"SubmitMediaRefreshComplete",
    "EventTime":"2022-05-30T08:56:14Z",
    "MediaRefreshJobId":"aa23298375bd****",
    "TaskType":"refresh",
    "ErrorCode":"InvalidDomain.NotFound",
    "ErrorMessage":"Can't find domain."
    }