跳到主要内容

视频列表

服务地址

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

请求方法

GET

请求参数

参数说明类型是否必须
accessKey访问API用的accessKeyString必选
actionAPI名称,此接口为 "queryVideo"String必选
versionAPI版本,目前必须为2.0 String必选
timestampAPI调用时间戳,1970年1月1日以来的毫秒数,如1466488681033String必选
signature签名,请参考签名规则String必选
start开始位置String必选
number数量String必选
sort结果按该字段排序,只能为title, size, category, uploadTime, status, tagString必选
orderasc 顺序,desc 倒序String必选
searchTypesearchType 查找视频,查找类型为title,tag,all, 分别为按title查找,按tag查找,按title和tag一起查找,查找时必须同时要输入参数keyword。为空时为获取视频列表,此时不必须输入参数keywordString可选
keyword查找的关键字String可选
categoryId视频类别id,按以上要求查找的同时查属于该分类的结果,若不填,则为所有分类Integer可选
videoType0:普通视频,1:VR,不传该值的话默认为0Integer可选
status视频状态,不传该值的话为返回所有状态的视频,状态取值:0,1,2,3,4,5,6,7详见下面说明Integer可选

status 取值说明

0:TRANSCODE_STATUS_UPLOAD_FINISHED
1:TRANSCODE_STATUS_START
2:TRANSCODE_STATUS_COMPLETED
3:TRANSCODE_STATUS_FAILED
4:TRANSCODE_STATUS_UPLOAD_FAILED
5:TRANSCODE_STATUS_UNKNOWN_FILE_TYPE
6:TRANSCODE_STATUS_SECOND_TRANSCODE_START
7:TRANSCODE_STATUS_WAITTING

响应示例

{
"code":0,
"message":"success",
"result":
[
{
"id":"b01811bcb49a4bef9847f3555752a3c6",
"parentId":null,
"playrate":"1.0",
"fileName":"290c4314065646f384ac52d21a718c9e.mp4",
"thumbnail":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/b01811bcb49a4bef9847f3555752a3c6/193_b01811bcb49a4bef9847f3555752a3c6_0.jpg",
"cover":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/b01811bcb49a4bef9847f3555752a3c6/193_b01811bcb49a4bef9847f3555752a3c6_0.jpg",
"title":"1.mp4",
"width":720,
"height":576,
"bitrate":333209,
"audioBitrate":0,
"duration":286000,
"playNum":0,
"size":11361,
"userId":193,
"categoryId":0,
"category":null,
"status":2,
"date":"2017/11/27",
"uploadTime":1511779239632,
"tag":null,
"description":null,
"contentId":null,
"customId":null,
"sourceContentId":null,
"sourceCustomId":null,
"transcodedVideoList":
[
{
"name":"high-definition",
"hlsUrl":"http://k35rdw4u.vod2.danghongyun.com/target/hls/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.m3u8",
"hlsSize":23635592,
"mp4Url":"http://k35rdw4u.vod2.danghongyun.com/target/mp4/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.mp4",
"mp4Size":19244116,
"flvUrl":"http://k35rdw4u.vod2.danghongyun.com/target/flv/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.flv",
"flvSize":19442983,
"tsUrl":"http://k35rdw4u.vod2.danghongyun.com/target/ts/2017/11/27/193_b01811bcb49a4bef9847f3555752a3c6_10_720x576.ts",
"tsSize":23762824,
"videoWidth":720,
"videoHeight":576,
"videoBitrate":500,
"audioBitrate":64000,
"defaultVideo":1,
"taskId":"113444",
"status":2,
"idx":1,
"type":0,
"hlsEncryptType":0,
"mp4EncryptType":0,
"flvEncryptType":0,
"tsEncryptType":0,
"contentId":null,
"customId":null,
"aesKey":null
}
],
"subPlayrateList":
[
{
"videoId":"577e0bcfc4774cc295668d1638e1752b",
"playrate":"0.8",
"subVideoType":0
},
{
"videoId":"dd9220fc79e34651a8140d77ecbe7e95",
"playrate":"30",
"subVideoType":0
}
],
"playCode":
{
"previewUrl":"http://www.danghongyun.com/video/preview/193/b01811bcb49a4bef9847f3555752a3c6",
"flashUrl":"http://www.danghongyun.com/video/preview/193/b01811bcb49a4bef9847f3555752a3c6.swf",
"htmlEmbedCode":"<div id=\"193_b01811bcb49a4bef9847f3555752a3c6\" style=\"text-align:center;\"></div>\r\n<script type=\"text/javascript\" src=\"http://static.danghongyun.com/libs/embed/H_E_v0.2.js\"></script>\r\n<script type=\"text/javascript\">\r\n HONGSHIYUN.embed(\"193_b01811bcb49a4bef9847f3555752a3c6\",{\r\n width:\"100%\",\r\n height:\"100%\",\r\n autoPlay:false\r\n });\r\n</script>"
},
"type":0,
"uri":null,
"fastEditor":0,
"videoType":0,
"audio":null,
"audioStatus":null,
"audioTaskId":null,
"subtitle":null,
"subVideoType":null,
"shareStatus":0,
"shareToUserId":null,
"shareCategoryId":0,
"logoGroupId":null
},
{
"id":"4b4deb6b24b54ec0b816d607a4317712",
"parentId":null,
"playrate":"1.0",
"fileName":"254b95af058441218eddeae1ff7f10df.mp4",
"thumbnail":"http://k35rdw4u.images.danghongyun.com/thumb/2017/11/27/4b4deb6b24b54ec0b816d607a4317712/193_4b4deb6b24b54ec0b816d607a4317712_0.jpg",
"cover":"http://k35rdw4u.images.danghongyun.com/cover/2017/11/27/4b4deb6b24b54ec0b816d607a4317712/193_4b4deb6b24b54ec0b816d607a4317712_0.jpg",
"title":"7.mp4",
"width":1280,
"height":720,
"bitrate":1312051,
"audioBitrate":0,
"duration":35360,
"playNum":0,
"size":5530,
"userId":193,
"categoryId":0,
"category":null,
"status":2,
"date":"2017/11/27",
"uploadTime":1511778702647,
"tag":null,
"description":null,
"contentId":null,
"customId":null,
"sourceContentId":null,
"sourceCustomId":null,
"transcodedVideoList":
[
{
"name":"high-quality",
"hlsUrl":null,
"hlsSize":0,
"mp4Url":"http://k35rdw4u.vod2.danghongyun.com/target/mp4/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712_10_1280x360.mp4",
"mp4Size":2318404,
"flvUrl":null,
"flvSize":0,
"tsUrl":null,
"tsSize":0,
"videoWidth":1280,
"videoHeight":360,
"videoBitrate":500,
"audioBitrate":64000,
"defaultVideo":1,
"taskId":"113442",
"status":2,
"idx":1,
"type":0,
"hlsEncryptType":0,
"mp4EncryptType":0,
"flvEncryptType":0,
"tsEncryptType":0,
"contentId":null,
"customId":null,
"aesKey":null
}
],
"subPlayrateList":[],
"playCode":
{
"previewUrl":"http://www.danghongyun.com/video/preview/193/4b4deb6b24b54ec0b816d607a4317712?isVR=true",
"flashUrl":"http://www.danghongyun.com/video/preview/193/4b4deb6b24b54ec0b816d607a4317712.swf?isVR=true",
"htmlEmbedCode":"<div id=\"193_4b4deb6b24b54ec0b816d607a4317712\" style=\"text-align:center;\"></div>\r\n<script type=\"text/javascript\" src=\"http://static.danghongyun.com/libs/embed/H_E_v0.2.js\"></script>\r\n<script type=\"text/javascript\">\r\n HONGSHIYUN.embed(\"193_4b4deb6b24b54ec0b816d607a4317712\",{\r\n width:\"100%\",\r\n height:\"100%\",\r\n autoPlay:false\r\n });\r\n</script>"
},
"type":0,
"uri":null,
"fastEditor":0,
"videoType":1,
"audio":"audio/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712.mp3",
"audioStatus":3,
"audioTaskId":"113443",
"subtitle":null,
"subVideoType":null,
"shareStatus":0,
"shareToUserId":null,
"shareCategoryId":0,
"logoGroupId":null
}
],
"success":true
}

响应字段说明

视频信息

字段说明
audioVR转出的音频地址
audioStatusVR转出的音频转码状态
audioTaskIdVR转出的音频转码任务id
audioBitrate源文件音频码率
bitrate源文件比特率
category类别
categoryId类别id
contentIdcontent id,用于视频加解密
cover默认封面图
customIdcustom id,用于视频加解密
date视频上传日期
description描述
duration视频时长,毫秒
fastEditor是否快编
fileName文件名
height源视频文件高度
id视频id
logoGroupId转码时所用的台标组id
parentId父视频id
playCode请参考播放码
playNum播放次数
playrate播放速率,目前为倍数:0.8,1.2,1.4,1.6;缩时:10,30,60,180,单位为秒
shareCategoryId分享的视频类别,目前无效
shareStatus分享状态,目前无效
shareToUserId分享给的用户id,目前无效
size视频大小,KB
sourceContentId视频源本身为加密时所使用的key之一
sourceCustomId视频源本身为加密时所使用的key之一
status视频转码状态,1 转码中,2 转码完成,3 转码出错,4 上传失败,5 未知文件类型,6 二次转码中,7 排队中
subtitle字幕
subPlayrateList子视频列表, 请参考子视频
subVideoType如果该视频为子视频,则表示子视频类型,0 倍数转码,1 缩时转码
tag视频标签
taskId视频转码任务id,
thumbnail默认缩略图
title标题
transcodedVideoList转码后的视频地址列表,请参考视频输出
type源文件类型,0 普通文件,1 hls文件,3 直播录制,4 快编,5 直播录制二次转码,6 快编二次转码,7 视频叠加,8 视频叠加二次转码
uploadTime上传时间
userId用户id
uri源文件uri
videoType视频类型 0 普通,1 VR
width源视频文件宽度

播放码

字段说明
flashUrlflash播放地址
htmlEmbedCodehtml嵌入式代码
previewUrl预览地址

子视频

字段说明
videoId子视频id
playrate子视频播放速率,含义同上
subVideoType子视频类型,0 倍数转码,1 缩时转码

视频输出

字段说明
aesKeyAES加密所用的key
audioBitrate转码后音频码率
contentId当虹加密所用的key之一
customId当虹加密所用的key之一
defaultVideo是否为默认播放,1 是, 0 否
flvEncryptType转码后flv加密类型,0 不加密,7 当虹加密
flvUrl转码后flv地址
flvSize转码后flv文件大小,Byte
hlsEncryptType转码后hls加密类型,0 不加密,6 AES加密,7 当虹加密,目前AES加密只对hls起作用
hlsUrl转码后hls地址
hlsSize转码后hls文件大小,Byte
idx同一个文件的不同输出地址索引
mp4EncryptType转码后mp4加密类型,0 不加密,7当虹加密
mp4Url转码后mp4地址
mp4Size转码后mp4文件大小,Byte
name名称
status转码任务状态
taskId转码任务id
tsEncryptType转码后ts加密类型,0 不加密,7 当虹加密
tsUrl转码后ts地址
tsSize转码后ts文件大小,Byte
type转码后的文件类型,0 普通,1 试看片段
videoBitrate视频码率
videoHeight转码后视频高度
videoWidth转码后视频宽度

响应错误码

错误码说明
0success
10000exception
10013sort_type_is_incorrect
10018search_type_is_incorrect
10201api_not_exists