Commit 5166350759e52f3745e0e3a5021cd31d1afedca1

Authored by 费有文
1 parent dde27c07

22

8.直播云/1.1 获取直播活动信息接口.md
... ... @@ -17,7 +17,7 @@ HTTP GET
17 17 | sp_id | string | true | 应用ID |
18 18 | activityid| string | true | 由开发者通过API创建接口或者在直播云管理端创建,保证唯一性 |
19 19 | timestamp | int | true | 精确到秒,当前Unix时间戳,请保证请求服务器时间正确 |
20   -| sign | String | true | 签名规则见 [签名详情](http://help.open.cnlive.com/common.html) |
  20 +| sign | String | true | 签名规则见<a href="http://help.open.cnlive.com/common.html">签名详情</a> |
21 21  
22 22  
23 23 ### 返回值 ###
... ... @@ -33,46 +33,46 @@ HTTP GET
33 33 "data"{
34 34 "activitystatus":"1",
35 35 "activityname":"测试活动",
36   - "coverImgUrl":"小图图片URL",
37   - "smallImg":"小图图片URL",
38   - "bigImg":"大图图片URL",
39   - "isHorizontalScreen":"1",
40   - "channelID":"xinyingshi",
41   - "startTime":"",
42   - "EndTime":"",
43   - "createTime":"",
44   - "extensions":"",
45   - "activityCategory":"",
46   - "mp4_url_rate1":"",
47   - "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi&rate=2&sp_id=iqhpk8pl19",
48   - "mp4_url_rate3":"",
49   - "mp4_url_rate4":"",
50   - "hls_url_rate1":"",
51   - "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi&rate=2&sp_id=iqhpk8pl19",
52   - "hls_url_rate3":""
53   - "hls_url_rate4":""
54   - "extViews"[
55   - {
56   - "mp4_url_rate1":"",
57   - "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi_m1&rate=2&sp_id=iqhpk8pl19",
58   - "mp4_url_rate3":"",
59   - "mp4_url_rate4":"",
60   - "hls_url_rate1":"",
61   - "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi_m1&rate=2&sp_id=iqhpk8pl19",
62   - "hls_url_rate3":""
63   - "hls_url_rate4":""
64   - }
65   - {
66   - "mp4_url_rate1":"",
67   - "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi_m2&rate=2&sp_id=iqhpk8pl19",
68   - "mp4_url_rate3":"",
69   - "mp4_url_rate4":"",
70   - "hls_url_rate1":"",
71   - "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi_m2&rate=2&sp_id=iqhpk8pl19",
72   - "hls_url_rate3":""
73   - "hls_url_rate4":""
74   - }
75   - }
  36 + "coverImgUrl":"小图图片URL",
  37 + "smallImg":"小图图片URL",
  38 + "bigImg":"大图图片URL",
  39 + “isHorizontalScreen”:“1”,
  40 + “channelID”:“xinyingshi”,
  41 + “startTime”:“”,
  42 + “EndTime”:“”,
  43 + “CreateTime”:“”,
  44 + “extensions”:“”,
  45 + “activityCategory”:“”,
  46 + "mp4_url_rate1":"",
  47 + "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi&rate=2&sp_id=iqhpk8pl19",
  48 + "mp4_url_rate3":"",
  49 + "mp4_url_rate4":"",
  50 + "hls_url_rate1":"",
  51 + "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi&rate=2&sp_id=iqhpk8pl19",
  52 + "hls_url_rate3":"",
  53 + "hls_url_rate4":"",
  54 + extViews[
  55 + {
  56 + "mp4_url_rate1":"",
  57 + "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi_m1&rate=2&sp_id=iqhpk8pl19",
  58 + "mp4_url_rate3":"",
  59 + "mp4_url_rate4":"",
  60 + "hls_url_rate1":"",
  61 + "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi_m1&rate=2&sp_id=iqhpk8pl19",
  62 + "hls_url_rate3":"",
  63 + "hls_url_rate4":""
  64 + },
  65 + {
  66 + "mp4_url_rate1":"",
  67 + "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi_m2&rate=2&sp_id=iqhpk8pl19",
  68 + "mp4_url_rate3":"",
  69 + "mp4_url_rate4":"",
  70 + "hls_url_rate1":"",
  71 + "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi_m2&rate=2&sp_id=iqhpk8pl19",
  72 + "hls_url_rate3":"",
  73 + "hls_url_rate4":""
  74 + }
  75 + ]
76 76 }
77 77 }
78 78 ```
... ... @@ -80,7 +80,7 @@ HTTP GET
80 80  
81 81  
82 82 ``` java
83   -public String getPlayVideo() {
  83 +public String getPlayVideo(ModelMap model,HttpServletRequest request) {
84 84 String result = "";
85 85 Map params = new HashMap<>();
86 86 params.put("sp_id", "iqhpk8pl19");
... ... @@ -114,9 +114,9 @@ public String getPlayVideo() {
114 114  
115 115 if(BaseUtil.notBlank(result)) {
116 116 JSONObject resultJson = JSONObject.parseObject(result);
117   - return resultJson.getJSONObject("data").getString("hls_url_rate2");
  117 + model.put("videoInfo", resultJson);
118 118 }
119 119  
120   - return "";
  120 + return "play_demo";
121 121 }
122 122 ```
123 123 \ No newline at end of file
... ...