视频上传完成

最近更新时间:2019-06-06 17:45:02

事件名称

NewFileUpload

事件说明

当 App 配置了事件通知后,在视频通过客户端或服务端上传后,App 后台即可通过“普通回调”或“可靠回调”的方式获取该事件通知。事件通知内容为 FileUploadTask 结构

示例

普通回调3.0

如果选择普通回调模式,则回调 URL 会接收到来自点播的 HTTP POST 请求,BODY 内容如下所示。

{
    "EventType":"NewFileUpload",
    "FileUploadEvent":{
        "FileId":"5285890784273533167",
        "MediaBasicInfo":{
            "Name":"动物世界",
            "Description":"",
            "CreateTime":"2019-01-09T16:36:22Z",
            "UpdateTime":"2019-01-09T16:36:24Z",
            "ExpireTime":"9999-12-31T23:59:59Z",
            "ClassId":0,
            "ClassName":"其他",
            "ClassPath":"其他",
            "CoverUrl":"",
            "Type":"mp4",
            "MediaUrl":"http://125676836723.vod2.myqcloud.com/xxx/xxx/q1BORBPQH1IA.mp4",
            "TagSet":[

            ],
            "StorageRegion":"ap-guangzhou-2",
            "SourceInfo":{
                "SourceType":"Upload",
                "SourceContext":""
            },
            "Vid":"5285890784273533167"
        },
        "ProcedureTaskId":""
    },
    "ProcedureStateChangeEvent":null,
    "FileDeleteEvent":null,
    "PullCompleteEvent":null,
    "EditMediaComplete":null,
    "WechatPublishComplete":null,
    "TranscodeCompleteEvent":null,
    "ConcatCompleteEvent":null,
    "ClipCompleteEvent":null,
    "CreateImageSpriteCompleteEvent":null,
    "SnapshotByTimeOffsetCompleteEvent":null
}

可靠回调3.0

如果选择可靠回调模式,调用 拉取事件通知 API 会接收到如下形式的 HTTP 应答。

{
    "Response": {
        "EventSet": [
            {
                "EventHandle": "EventHandle.N",
                "EventType": "NewFileUpload",
                "FileUploadEvent": {
                    "FileId": "5285890784273533167",
                    "MediaBasicInfo": {
                        "Name": "动物世界",
                        "Description": "",
                        "CreateTime": "2019-01-09T16:36:22Z",
                        "UpdateTime": "2019-01-09T16:36:24Z",
                        "ExpireTime": "9999-12-31T23:59:59Z",
                        "ClassId": 0,
                        "ClassName": "其他",
                        "ClassPath": "其他",
                        "CoverUrl": "",
                        "Type": "mp4",
                        "MediaUrl": "http://125676836723.vod2.myqcloud.com/xxx/xxx/q1BORBPQH1IA.mp4",
                        "TagSet": [],
                        "StorageRegion": "ap-guangzhou-2",
                        "SourceInfo": {
                            "SourceType": "Upload",
                            "SourceContext": ""
                        },
                        "Vid": "5285890784273533167"
                    },
                    "ProcedureTaskId": ""
                },
                "ProcedureStateChangeEvent": null,
                "FileDeleteEvent": null,
                "PullCompleteEvent": null,
                "EditMediaComplete": null,
                "WechatPublishComplete": null,
                "TranscodeCompleteEvent": null,
                "ConcatCompleteEvent": null,
                "ClipCompleteEvent": null,
                "CreateImageSpriteCompleteEvent": null,
                "SnapshotByTimeOffsetCompleteEvent": null
            }
        ],
        "RequestId": "335bdaa3-db0e-46ce-9946-51941d9cb0f5"
    }
}