The AddLiveRecordVideoComplete event is triggered when a live stream recording to VOD completes and a VOD file is created. This topic covers the event content and a callback sample.
Event type
AddLiveRecordVideoComplete
Event description
When you enable the recording of live streams to video-on-demand (VOD), the AddLiveRecordVideoComplete event is triggered each time a VOD file is created after a recording epoch completes or a live stream ends.
-
A stream ingest ends if the stream is disconnected for more than 3 minutes.
-
To obtain audio and video information in real time after a video is recorded, configure a VOD callback. For more information, see Video upload complete.
After you receive the VideoId from the AddLiveRecordVideoComplete event, call the GetVideoInfo operation to query video information. The Duration field in the response indicates the video duration in seconds.
Event content
|
Parameter Name |
Type |
Required |
Description |
|
EventTime |
String |
Yes |
The time when the event was generated. The time is in UTC and uses the yyyy-MM-ddTHH:mm:ssZ format. |
|
EventType |
String |
Yes |
The event type. The value is fixed to AddLiveRecordVideoComplete. |
|
VideoId |
String |
Yes |
The video ID. |
|
Status |
String |
Yes |
The completion status of the recording.
|
|
StreamName |
String |
No |
The name of the stream. |
|
DomainName |
String |
No |
The domain name. |
|
AppName |
String |
No |
The app name. |
|
RecordStartTime |
String |
No |
The start time of the recording. The time is in UTC and uses the yyyy-MM-ddTHH:mm:ssZ format. |
|
RecordEndTime |
String |
No |
The end time of the recording. The time is in UTC and uses the yyyy-MM-ddTHH:mm:ssZ format. |
Callback sample
Notes on the callback sample:
-
For an HTTP callback, the following content is the HTTP POST body.
-
For an MNS callback, the following content is the message body.
{
"EventTime": "2017-12-08T09:26:17Z",
"EventType": "AddLiveRecordVideoComplete",
"VideoId": "43q9fjdhef****",
"Status": "success",
"StreamName": "xxx",
"DomainName": "xxx",
"AppName": "xxx",
"RecordStartTime":"2017-12-08T07:40:56Z",
"RecordEndTime":"2017-12-08T09:26:17Z"
}