The DynamicImageComplete event notifies you when a dynamic image job is complete. This topic covers the event content and a callback example.
Event type
DynamicImageComplete
Event description
The DynamicImageComplete event is triggered after a dynamic image job is complete.
-
If you configure a CDN-accelerated domain name and enable URL signing, you must generate an auth_key to access the dynamic image URL. Otherwise, an
HTTP 403error is returned. For more information, see URL signing. -
If you do not configure a CDN-accelerated domain name, the address of the origin OSS server is returned. You can access this address only if the bucket is set to public-read. To ensure data security, configure a CDN-accelerated domain name. For more information, see Domain name management.
Event content
|
Parameter Name |
Type |
Required |
Description |
|
EventTime |
String |
Yes |
The time when the event was generated, in UTC. Format: yyyy-MM-ddTHH:mm:ssZ. |
|
EventType |
String |
Yes |
The event type. The value is fixed as DynamicImageComplete. |
|
VideoId |
String |
Yes |
The ID of the video. |
|
Status |
String |
Yes |
The status of the dynamic image job.
|
|
JobId |
String |
Yes |
The ID of the dynamic image job. |
|
ErrorCode |
String |
No |
The error code returned when the job fails. |
|
ErrorMessage |
String |
No |
The error message returned when the job fails. |
|
DynamicImageJobInfo |
DynamicImageJobInfo[] |
No |
The details of the dynamic image, returned as a JSON string. Not returned if the job fails. For more information, see the DynamicImageJobInfo data table below. |
DynamicImageJobInfo data
|
Parameter name |
Type |
Required |
Description |
|
JobId |
String |
Yes |
The ID of the dynamic image job. |
|
Status |
String |
Yes |
The status of the dynamic image job.
|
|
FileURL |
String |
Yes |
The URL of the dynamic image file. |
|
FileSize |
String |
No |
The size of the dynamic image file, in bytes. |
|
Fps |
String |
No |
The frame rate of the video stream, in frames per second. |
|
Height |
String |
No |
The height of the dynamic image, in pixels. |
|
Width |
String |
No |
The width of the dynamic image, in pixels. |
Callback example
Sample callback:
-
HTTP callback: The body of the HTTP POST request.
-
MNS callback: The message body.
{
"Status":"success",
"VideoId":"6a45f222e08fhdjdn2d144503213****",
"EventType":"DynamicImageComplete",
"EventTime":"2019-11-05T09:12:58Z",
"DynamicImageJobInfo": {
"FileSize":"1834831",
"FileURL":"http://example.aliyundoc.com/6a45f222e08fhdjdn2d144503213****/image/dynamic/3af1e9705cb24321d4c3719f0d41****.gif",
"Fps":"25",
"Height":"200",
"JobId":"3af7e9705cb24js83j231d4c3719****",
"Status":"success",
"Width":"200"
},
"JobId":"3af7e9705cb24js83j231d4c3719****"
}