跳到主要内容

获取视频下载地址

服务地址

http://api-az-cn.danghongyun.com/rest

请求方法

GET

请求参数

参数说明类型是否必须
accessKey访问API用的accessKeyString必选
actionAPI名称,此接口为 "getDownloadAddress"String必选
versionAPI版本,目前必须为2.0 String必选
timestampAPI调用时间戳,1970年1月1日以来的毫秒数,如1466488681033String必选
signature签名,请参考签名规则String必选
ids视频id, 多个id以逗号隔开,如"c82c3de31e594ab2ae58db37a92c1395,ff09ba247b9c432f8fe7527d7aaeb5a3"String必选
type转码后的视频类型,0 普通, 1 试看,默认值0Integer非必选

响应示例

{
"code": 0,
"message": "success",
"result": [{
"id": "e59034b72ccb4c7e9914eea84cf7c6b0",
"hls": [
{
"url": "http: //dc2vcvis.dl2.hongshiyun.dev/target/hls/2017/05/31/185_e59034b72ccb4c7e9914eea84cf7c6b0_10_1280x720.m3u8",
"desc: "high-quality",
"width": 1280,
"height": 720,
"size": 0,
"encryptType": 0,
"contentId": null,
"customId": null,
"aesKey": null,
"defaultVideo": 1
},
{
"url": "http://dc2vcvis.dl2.hongshiyun.dev/target/hls/2017/05/31/185_e59034b72ccb4c7e9914eea84cf7c6b0_20_854x480.m3u8",
"desc": "high-definition",
"width": 854,
"height": 480,
"size": 0,
"encryptType": 0,
"contentId": null,
"customId": null,
"aesKey": null,
"defaultVideo": 0
},
{
"url": "http://dc2vcvis.dl2.hongshiyun.dev/target/hls/2017/05/31/185_e59034b72ccb4c7e9914eea84cf7c6b0_30_640x360.m3u8",
"desc": "standard-definition",
"width": 640,
"height": 360,
"size": 0,
"encryptType": 0,
"contentId": null,
"customId": null,
"aesKey": null,
"defaultVideo": 0
}],
"mp4": null,
"flv": null,
"ts": null
},
{
"id": "f8e0221bf5ef4ee3b30d1bd4a25e61e2",
"hls": null,
"mp4": null,
"flv": null,
"ts": null
}],
"success": true
}

失败返回:

{
"code": 10000,
"message": "exception",
"success": false
}

响应字段说明

字段说明
url流地址
desc流名称,如高清,标清等
width视频宽
height视频高
size视频文件大小(字节)
encryptType加密类型,0:不加密,6:AES加密,7:当虹加密,目前AES加密只对hls起作用
contentId虹加密所用的key之一
customId当虹加密所用的key之一
aesKeyAES加密所用的key
defaultVideo是否是默认播放流,0:否,1:是

响应错误码

错误码说明
0success
10000exception
10030no_cdn
10201api_not_exists