Skip to content

Notification for Live

Description: This defines notification messages which will be sent when special events happen during live transcoding for live event and linear live.

1. Notification Event

Event Available_Body_Data Description
STREAMING_PUBLISH -- --
STREAMING_UNPUBLISH status_desc the description of status. "close" or "timeout"
RECORD_FILE_GENERATED dvr_url e.g. http://example/vod.m3u8
dvr_duration dvr vod duration
RECORD_FILE_ERROR err_msg the reason of the error

2. Notification Structure

{
    "event":{event},
    "domain": "__defaultVhost__",
    "app": {app name},
    "stream": {stream name},
    "body":{
       Different content for different event
    },
    "notification_time": {unix_timestamp}
}

3. Notification template for spec event

3.1 STREAMING_PUBLISH

{
    "event": "STREAMING_PUBLISH",
    "domain": "__defaultVhost__",
    "app": "{app name}",
    "stream": "{stream name}",
    "notification_time": {timestamp}
}

3.2 STREAMING_UNPUBLISH

{
    "event": "STREAMING_UNPUBLISH",
    "domain": "__defaultVhost__",
    "app": "{app name}",
    "stream": "{stream name}",
    "body": {
        "status_desc":"close" 
    },
    "notification_time": {timestamp}
}

3.3 RECORD_FILE_GENERATED

{
    "event": "RECORD_FILE_GENERATED",
    "domain": "__defaultVhost__",
    "app": "{app name}",
    "stream": "{stream name}",
    "body": {
        "dvr_index_file_id":"{index id of DVR file}",
        "dvr_duration": {duration of each single DVR file for one stream},
        "dvr_url": "{URL of manifest m3u8 file for all DVR recording of the spec stream}" 
    },
    "notification_time": {timestamp}
}

3.4 RECORD_FILE_ERROR

{
    "event": "RECORD_FILE_ERROR",
    "domain": "__defaultVhost__",
    "app": "{app name}",
    "stream": "{stream name}",
    "body": {
        "dvr_index_file_id":"{index id of DVR file}",
        "err_msg" : "{error message}"    
    },
    "notification_time": {timestamp}
}