Get Playback Code
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 "getVideoPlaycode" | 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 |
videoId | video id | String | Required |
Response Example
{
"code":0,
"message":"success",
"result":
{
"previewUrl":"http://www.stg.danghongyun.com/video/preview/2/262673e5c3f44cf7939523f14b42ed2b",
"flashUrl":"http://www.stg.danghongyun.com/video/preview/2/262673e5c3f44cf7939523f14b42ed2b.swf",
"htmlEmbedCode":"<div id=\"2_262673e5c3f44cf7939523f14b42ed2b\" style=\"text-align:center;\"></div>\r\n<script type=\"text/javascript\" src=\"http://static.danghongyun.com/libs/embed/H_E_v0.1.js\"></script>\r\n<script type=\"text/javascript\">\r\n HONGSHIYUN.embed(\"2_262673e5c3f44cf7939523f14b42ed2b\",{\r\n \t width:\"100%\",\r\n \t height:\"100%\",\r\n \t autoPlay:false\r\n \t });\r\n</script>\r\n\r\n"
},
"success":true
}
Response Fields
Field | Description |
---|---|
previewUrl | preview url |
flashUrl | flash playback url |
htmlEmbedCode | html embedded code |
Error Codes
Code | Message |
---|---|
0 | success |
10000 | exception |
10012 | video_not_exists |
10017 | video_not_exists |
10201 | api_not_exists |