This topic describes the SubmitMediaRefreshComplete event, the content of its notification, and sample callbacks.
Event
SubmitMediaRefreshComplete
Event description
After a media refresh or prefetch task is submitted, a refresh or prefetch request
for each playback URL is submitted. This generates multiple task IDs. When refresh
or prefetch requests for all playback URLs are submitted, the SubmitMediaRefreshComplete
event is triggered. For more information, see RefreshMediaPlayUrls.
Note You cannot configure this callback event in the ApsaraVideo VOD console. You need
to call the SetMessageCallback operation to configure this callback event.
Event notification content
Parameter | Type | Required | Description |
---|---|---|---|
EventTime | String | Yes | The time when the event is generated. The time is in the yyyy-MM-ddTHH:mm:ssZ format and is displayed in UTC. |
EventType | String | Yes | The event type. The value of the parameter is fixed to SubmitMediaRefreshComplete. |
Status | String | Yes | The submission status of the refresh or prefetch request. Valid values:
|
MediaRefreshJobId | String | Yes | The ID of the refresh task. |
MediaId | String | Yes | The ID of the media file. It can be the audio ID or video ID. |
TaskType | String | Yes | The type of the task. Valid values:
|
SuccessPlayUrls | String | Yes | The playback URLs that were submitted for refresh or prefetch. Separate multiple URLs with commas (,). |
TaskIds | String | Yes | The IDs of the refresh or prefetch tasks for the playback URLs of media files. Only one URL can be refreshed or prefetched in a task. This task ID is used in the DescribeVodRefreshTasks operation to query the refresh or prefetch status of each playback URL. |
FilterPolicy | String | Yes | The filtering conditions for streams. The filtering conditions, displayed in the JSON format. They are the request parameters of the RefreshMediaPlayUrls operation. |
Extend | String | No | The custom parameters. |
ErrorCode | String | No | The error code. This parameter is returned if the refresh or prefetch task fails. |
ErrorMessage | String | No | The error message. This parameter is returned if the refresh or prefetch task fails. |
Sample callbacks
Description:
- For an HTTP callback, the following example is the body of the HTTP POST request.
- For an MNS callback, the following example is the message body.
- Success example
{ "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" }
- Failure example
{ "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." }