Get Video URLs
Service Address
http://api-az-cn.danghongyun.com/rest
Request Method
GET
Request Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
| accessKey | The user access key | String | Required |
| action | API name, this api is "getTranscodedVideos" | String | Required |
| version | API version, currently must be 2.0 | String | Required |
| timestamp | Invoke time in milliseconds since january 1 1970, eg: 1466488681033 | String | Required |
| signature | Signature generated by signature rule. | String | Required |
| ids | video id, multiple IDs separated by ',', eg:"c82c3de31e594ab2ae58db37a92c1395,ff09ba247b9c432f8fe7527d7aaeb5a3" | String | Required |
Response Example
{
"code":0,
"message":"success",
"result":
[
{
"id":"b1906df45563431d88d5953f0a39e385",
"videoType":0,
"cdns":
[
{
"desc":"fast web",
"defaultCdn":1,
"hls":
{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/hls/2017/11/27/193_b1906df45563431d88d5953f0a39e385_10_720x576.m3u8",
"desc":"high-definition",
"width":720,
"height":576,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
},
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/hls/2017/11/27/193_b1906df45563431d88d5953f0a39e385_20_320x240.m3u8",
"desc":"standard-definition",
"width":320,
"height":240,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":0
}
]
},
"mp4":{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/mp4/2017/11/27/193_b1906df45563431d88d5953f0a39e385_10_720x576.mp4",
"desc":"high-definition",
"width":720,
"height":576,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
}, {
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/mp4/2017/11/27/193_b1906df45563431d88d5953f0a39e385_20_320x240.mp4",
"desc":"standard-definition",
"width":320,
"height":240,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":0
}
]
},
"flv":
{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/flv/2017/11/27/193_b1906df45563431d88d5953f0a39e385_10_720x576.flv",
"desc":"high-definition",
"width":720,
"height":576,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
}
]
},
"ts":
{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/ts/2017/11/27/193_b1906df45563431d88d5953f0a39e385_10_720x576.ts",
"desc":"high-definition",
"width":720,
"height":576,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
}
]
},
"audio":null,
"rtmp":null,
"thumbnail":null,
"thumbnailInterval":null
}
],
"comments":null
},
{
"id":"4b4deb6b24b54ec0b816d607a4317712",
"videoType":1,
"cdns":
[
{
"desc":"fast web",
"defaultCdn":1,
"hls":null,
"mp4":
{
"dynamic":null,
"list":
[
{
"url":"http://k35rdw4u.vodf1.danghongyun.com/target/mp4/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712_10_1280x360.mp4",
"desc":"high-quality",
"width":1280,
"height":360,
"size":null,
"encryptType":0,
"contentId":null,
"customId":null,
"aesKey":null,
"defaultVideo":1
}
]
},
"flv":null,
"ts":null,
"audio":"http://k35rdw4u.vodf1.danghongyun.com/audio/2017/11/27/193_4b4deb6b24b54ec0b816d607a4317712.mp3",
"rtmp":null,
"thumbnail":null,
"thumbnailInterval":null
}
],
"comments":null
}
],
"success":true
}
If there is no information for a video corresponding to a certain ID, then the corresponding return value for that item is null, eg:
{
"id":"ff09ba247b9c432f8fe7527d7aaeb5a3",
"videoType":null,
"cdns":null,
"comments":null
}
Response Fields
Playback urls
| Field | Description |
|---|---|
| id | The video id |
| cdns | The address lists for different CDNs, see CDN Playback Info |
| videoType | The video type, 0: normal, 1: VR |
| comments | The video comments, see Comment currently invalid |
CDN Playback Info
| Field | Description |
|---|---|
| desc | The cdn name |
| defaultCdn | Is default cdn or not, 0: no, 1: yes |
| hls | The hls streams, see Playback streams |
| mp4 | The mp4 streams, see Playback streams |
| flv | The flv streams, see Playback streams |
| ts | The ts streams, see Playback streams |
| audio | Reserved |
| rtmp | Reserved |
| thumbnail | Reserved |
| thumbnailInterval | Reserved |
Playback streams
| Field | Description |
|---|---|
| dynamic | Reserved |
| list | The playback streams, see Playback steram |
Playback stream
| Field | Description |
|---|---|
| url | The playback url |
| desc | The stream description |
| width | The video width |
| height | The video height |
| size | The file size in bytes |
| encryptType | The type of encryption, 0: no encryption, 6: AES encryption, 7: arcvideo encryption, currently AES encryption only works for hls |
| contentId | One of the keys used for arcvideo encryption |
| customId | One of the keys used for arcvideo encryption |
| aesKey | The key used for AES encryption |
| defaultVideo | Is default playback stream or not, 0: no, 1: yes |
Comment
| Field | Description |
|---|---|
| id | The comment id |
| time | The comment time |
| comment | The comment content |
Error Codes
| Code | Message |
|---|---|
| 0 | success |
| 10000 | exception |
| 10030 | no_cdn |
| 10201 | api_not_exists |