Skip to main content

Get Playback Code

Service Address

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

Request Method

GET

Request Parameters

ParameterDescriptionTypeRequired
accessKeyThe user access keyStringRequired
actionAPI name, this api is "getVideoPlaycode"StringRequired
versionAPI version, currently must be 2.0StringRequired
timestampInvoke time in milliseconds since january 1 1970, eg: 1466488681033StringRequired
signatureSignature generated by signature rule.StringRequired
videoIdvideo idStringRequired

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

FieldDescription
previewUrlpreview url
flashUrlflash playback url
htmlEmbedCodehtml embedded code

Error Codes

CodeMessage
0success
10000exception
10012video_not_exists
10017video_not_exists
10201api_not_exists