视频创作回调通知
作用
用户发起任务后,服务端会对客户所设置的接口地址,以POST方式提交任务处理情况到用户自定义的回调接口。
回调失败重试
- 接口如果没有返回 http status 200 状态码, 会认为用户处理本次回调失败,针对失败的情况, 会重试3次回调
回调参数说明
提交制课任务回调
- 请求方式: POST
URL参数
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| timestamp | long | 13位时间戳 |
| sign | string | 签名, 签名生成的规则是MD5(appSecret + timestamp), 为防止回调请求伪造, 请务必校验sign值的正确性 |
BODY参数:
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| id | long | 制课任务id |
| fileId | string | 制课所用到ppt的文件id |
| fileName | string | 制课所用到ppt的文件名 |
| videoName | string | 视频名称 |
| existDigitalHuman | boolean | 是否包含数字人 |
| status | string | 状态, WAITING, 代表提交任务成功, 进入等待制作状态 |
| childUserInfo | Object | 子账号信息, 如果是主账号创建的制课任务, 此字段返回null 【详见childUserInfo字段说明】 |
| subtitleInfo | Object | 字幕信息 【详见字幕信息字段说明】 |
回调数据示例
请求地址示例: https://www.example.com/xxx/callback?sign=d5079f2e8ba19e49bfd3d9575866d80f×tamp=1701964858687
请求体(body参数: application/json)示例
{
"existDigitalHuman": true,
"fileName": "智能制课测试PPT.pptx",
"videoName": "智能制课测试PPT",
"id": 1000,
"status": "WAITING",
"childUserInfo": {
"userId": "abc483974343",
"email": "xxx-child-user@qq.com",
"name": "张三",
"organizationId": 1001
},
"subtitleInfo": {
"enableSubtitle": "true"
}
}
制课成功回调
- 请求方式: POST
URL参数
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| timestamp | long | 13位时间戳 |
| sign | string | 签名, 签名生成的规则是MD5(appSecret + timestamp), 为防止回调请求伪造, 请务必校验sign值的正确性 |
BODY参数:
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| id | long | 制课任务id |
| fileId | string | 制课所用到ppt的文件id |
| fileName | string | 制课所用到ppt的文件名 |
| videoName | string | 视频名称 |
| videoPath | string | 视频地址 |
| audioPath | string | 音频地址 |
| videoFileSize | Long | 视频文件大小, 单位是byte |
| videoImage | string | 视频封面图地址 |
| videoDuration | Integer | 视频时长, 单位是秒 |
| dealTime | string | 制作完成时间(格式:yyyy-MM-dd HH:mm:ss) |
| existDigitalHuman | boolean | 是否包含数字人 |
| status | string | 状态, SUCCESS代表制课成功 |
| childUserInfo | Object | 子账号信息, 如果是主账号创建的制课任务, 此字段返回null 【详见childUserInfo字段说明】 |
| subtitleInfo | Object | 字幕信息 【详见字幕信息字段说明】 |
回调数据示例
请求地址示例: https://www.example.com/xxx/callback?sign=d5079f2e8ba19e49bfd3d9575866d80f×tamp=1701964858687
请求体(body参数: application/json)示例
{
"existDigitalHuman": true,
"videoPath": "https://oss-live-1.videocc.net/pptvideo/20231207/video/1000_5a8eaaceb8c58ef8c872c7dah8db71eb5453dbe25b5pptVideocommon.mp4",
"audioPath": "https://oss-live-1.videocc.net/pptvideo/20231207/video/1000_5a8eaaceb8c58ef8c872c7dah8db71eb5453dbe25b5pptVideocommon.mp3",
"fileName": "智能制课测试PPT.pptx",
"videoFileSize": 1025386,
"dealTime": "2023-12-05 14:30:30",
"videoName": "智能制课测试PPT",
"videoImage": "https://oss-live-1.videocc.net/pptvideo/20231207/image/1000_5a8eaaceb8c58ef8c872c7dah8db71eb5453dbe25b5pptVideocommon.jpeg",
"videoDuration": 62,
"id": 1000,
"status": "SUCCESS",
"childUserInfo": {
"userId": "abc483974343",
"email": "xxx-child-user@qq.com",
"name": "张三",
"organizationId": 1001
},
"subtitleInfo": {
"enableSubtitle": "true",
"subtitlePath": "http://example.com/xxx/xxx/abc.srt"
}
}
制课失败回调
当视频创作任务最终进入失败状态时触发。对于同一个任务,仅首次由非失败状态进入失败状态时发送回调,重复更新失败状态不会重复发送。
- 请求方式: POST
URL参数
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| timestamp | long | 13位时间戳 |
| sign | string | 签名, 签名生成的规则是MD5(appSecret + timestamp), 为防止回调请求伪造, 请务必校验sign值的正确性 |
BODY参数:
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| id | long | 制课任务id |
| fileId | string | 制课所用到ppt的文件id,没有值时返回空字符串 |
| fileName | string | 制课所用到ppt的文件名,没有值时返回空字符串 |
| videoName | string | 视频名称 |
| videoPath | string | 视频地址,失败时可能返回null |
| audioPath | string | 音频地址,失败时可能返回null |
| videoFileSize | Long | 视频文件大小,单位是byte,失败时可能返回null |
| videoDuration | Integer | 视频时长,单位是秒,失败时可能返回null |
| videoImage | string | 视频封面图地址,失败时可能返回null |
| dealTime | string | 制作完成时间(格式:yyyy-MM-dd HH:mm:ss),失败时可能返回null |
| existDigitalHuman | string | 是否包含数字人,取值为true或false |
| status | string | 状态,FAIL代表制课失败 |
| errorMessage | string | 面向客户的失败原因;无法提供明确原因时返回“视频制作失败,请联系技术支持” |
| source | string | 视频创作来源,PPT_VIDEO代表PPT视频,VIDEO_PRODUCE代表视频制作 |
| accountUserInfo | Object | 主账号信息 【详见accountUserInfo字段说明】 |
| childUserInfo | Object | 子账号信息,如果是主账号创建的制课任务,此字段返回null 【详见childUserInfo字段说明】 |
| subtitleInfo | Object | 字幕信息 【详见字幕信息字段说明】 |
回调数据示例
请求地址示例: https://www.example.com/xxx/callback?sign=d5079f2e8ba19e49bfd3d9575866d80f×tamp=1701964858687
请求体(body参数: application/json)示例
{
"id": 1000,
"videoName": "智能制课测试PPT",
"videoPath": null,
"audioPath": null,
"videoFileSize": null,
"videoDuration": null,
"videoImage": null,
"fileId": "abc123456",
"fileName": "智能制课测试PPT.pptx",
"dealTime": null,
"existDigitalHuman": "true",
"status": "FAIL",
"source": "VIDEO_PRODUCE",
"errorMessage": "素材文件为空",
"accountUserInfo": {
"userId": "abc483974343",
"email": "xxx@qq.com"
},
"childUserInfo": null,
"subtitleInfo": {
"enableSubtitle": true,
"subtitlePath": null
}
}
删除制课任务回调
- 请求方式: POST
URL参数
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| timestamp | long | 13位时间戳 |
| sign | string | 签名, 签名生成的规则是MD5(appSecret + timestamp), 为防止回调请求伪造, 请务必校验sign值的正确性 |
BODY参数:
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| id | long | 制课任务id |
| fileId | string | 制课所用到ppt的文件id |
| fileName | string | 制课所用到ppt的文件名 |
| videoName | string | 视频名称 |
| videoPath | string | 视频地址 (如果删除的是制课失败的任务, 此字段返回为null) |
| videoImage | string | 视频封面图地址 (如果删除的是制课失败的任务, 此字段返回为null) |
| videoDuration | Integer | 视频时长, 单位是秒 (如果删除的是制课失败的任务, 此字段返回为null) |
| dealTime | string | 制作完成时间(格式:yyyy-MM-dd HH:mm:ss)(如果删除的是制课失败的任务, 此字段返回为null) |
| existDigitalHuman | boolean | 是否包含数字人 |
| status | string | 状态, DELETE代表删除制课任务 |
| childUserInfo | Object | 子账号信息, 如果是主账号创建的制课任务, 此字段返回null 【详见childUserInfo字段说明】 |
回调数据示例
请求地址示例: https://www.example.com/xxx/callback?sign=d5079f2e8ba19e49bfd3d9575866d80f×tamp=1701964858687
请求体(body参数: application/json)示例
{
"existDigitalHuman": true,
"videoPath": "https://oss-live-1.videocc.net/pptvideo/20231207/video/1000_5a8eaaceb8c58ef8c872c7dah8db71eb5453dbe25b5pptVideocommon.mp4",
"fileName": "智能制课测试PPT.pptx",
"dealTime": "2023-12-05 14:30:30",
"videoName": "智能制课测试PPT",
"videoImage": "https://oss-live-1.videocc.net/pptvideo/20231207/image/1000_5a8eaaceb8c58ef8c872c7dah8db71eb5453dbe25b5pptVideocommon.jpeg",
"id": 1000,
"status": "DELETE",
"childUserInfo": null
}
accountUserInfo字段说明
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| userId | string | 主账号id |
| string | 主账号邮箱 |
childUserInfo字段说明
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| userId | string | 子账号id |
| string | 子账号邮箱 | |
| name | string | 子账号名字 |
| organizationId | Integer | 子账号组织id |
字幕信息字段说明
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| enableSubtitle | Boolean | 是否开启字幕 |
| subtitlePath | string | 字幕链接 |
成功保存制课任务草稿回调
- 请求方式: POST
URL参数
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| timestamp | long | 13位时间戳 |
| sign | string | 签名, 签名生成的规则是MD5(appSecret + timestamp), 为防止回调请求伪造, 请务必校验sign值的正确性 |
BODY参数:
| 参数名 | 类型及范围 | 说明 |
|---|---|---|
| id | long | 制课任务id |
| fileId | string | 草稿所使用PPT的文件id,未选择或未传入PPT时返回空字符串 |
| fileName | string | 草稿所使用PPT的文件名,未选择或未传入PPT时返回空字符串 |
| videoName | string | 视频名称 |
| existDigitalHuman | boolean | 是否包含数字人 |
| clientIp | String | 修改人的IP |
| status | string | 状态, DRAFT, 代表成功保存草稿 |
回调数据示例
请求地址示例: https://www.example.com/xxx/callback?sign=d5079f2e8ba19e49bfd3d9575866d80f×tamp=1701964858687
请求体(body参数: application/json)示例
{
"existDigitalHuman": true,
"fileId": "2c38b75fc16a1dee3822950fa817d477915c3aad3apptVideocommon",
"fileName": "智能制课测试PPT.pptx",
"videoName": "智能制课测试PPT",
"id": 1000,
"clientIp": "183.22.1.33",
"status": "DRAFT"
}
未选择或未传入PPT时,fileId和fileName字段仍会返回,字段值为空字符串:
{
"existDigitalHuman": true,
"fileId": "",
"fileName": "",
"videoName": "智能制课测试PPT",
"id": 1000,
"clientIp": "183.22.1.33",
"status": "DRAFT"
}
如何设置
通过后台设置:
登录账户 - 进入【云直播】 - 点击【开发设置】- 点击【回调设置】- 视频创作信息回调
注意:提交的接口地址必须要以 http:// 或者 https:// 开头
