This topic describes the SubmitMediaRefreshComplete event, its notification content, and callback examples.
Event type
SubmitMediaRefreshComplete
Event description
After you call the RefreshMediaPlayUrls operation, ApsaraVideo VOD submits a separate refresh or prefetch request for each of a media file's playback URLs. This process generates multiple task IDs. The SubmitMediaRefreshComplete event is triggered after all of these requests are submitted.
You cannot configure this callback event in the ApsaraVideo VOD console. To configure this event, call the SetMessageCallback operation.
Event content
Parameter Name | Type | Required | Description |
EventTime | String | Yes | The time when the event was generated. The time is in UTC and follows the yyyy-MM-ddTHH:mm:ssZ format. |
EventType | String | Yes | The event type. This is a system parameter. The value is fixed to SubmitMediaRefreshComplete. |
Status | String | Yes | Indicates whether the refresh or prefetch task was successfully submitted. Valid values:
|
MediaRefreshJobId | String | Yes | The ID of the refresh or prefetch job. |
MediaId | String | Yes | The media ID. This can be an audio ID or a video ID. |
TaskType | String | Yes | The task type. Valid values:
|
SuccessPlayUrls | String | Yes | The playback URLs for which refresh or prefetch tasks were successfully submitted. Separate multiple URLs with a comma (,). |
TaskIds | String | Yes | The IDs of the refresh or prefetch tasks for the playback URLs. Each URL corresponds to one task ID. Use this task ID to query the status of each task by calling the DescribeVodRefreshTasks operation. |
FilterPolicy | String | Yes | The policy for filtering playback streams. This is in JSON format and contains the request parameters of the RefreshMediaPlayUrls operation. |
Extend | String | No | The custom pass-through parameters. |
ErrorCode | String | No | The error code. This field is returned when the refresh or prefetch task fails to be submitted. |
ErrorMessage | String | No | The error message. This field is 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.
Task completed successfully.
{ "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" }The task failed.
{ "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." }