Commit 8b792a251b2b9671b511911a96b85773bde6a2d6

Authored by 刘炯
1 parent c08c7971

2

02.直播云/1.1 获取直播活动信息接口APP.md
... ... @@ -67,31 +67,31 @@ HTTP GET
67 67 "extensions":"",
68 68 "activityCategory":"",
69 69 "mp4_url_rate1":"",
70   - "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi&rate=2&sp_id=iqhpk8pl19",
  70 + "mp4_url_rate2":"http://api.cnlive.com/open/api2/live_ips/liveplayByAPP?channelID=xinyingshi&appId=iqhpk8pl19&isHLS=0",
71 71 "mp4_url_rate3":"",
72 72 "mp4_url_rate4":"",
73 73 "hls_url_rate1":"",
74   - "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi&rate=2&sp_id=iqhpk8pl19",
  74 + "hls_url_rate2":"http://api.cnlive.com/open/api2/live_ips/liveplayByAPP?channelID=xinyingshi&appId=iqhpk8pl19&isHLS=1",
75 75 "hls_url_rate3":"",
76 76 "hls_url_rate4":"",
77 77 "extViews"[
78 78
79 79 "mp4_url_rate1":"",
80   - "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi_m1&rate=2&sp_id=iqhpk8pl19",
  80 + "mp4_url_rate2":"http://api.cnlive.com/open/api2/live_ips/liveplayByAPP?channelID=xinyingshi&appId=iqhpk8pl19&isHLS=0",
81 81 "mp4_url_rate3":"",
82 82 "mp4_url_rate4":"",
83 83 "hls_url_rate1":"",
84   - "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi_m1&rate=2&sp_id=iqhpk8pl19",
  84 + "hls_url_rate2":"http://api.cnlive.com/open/api2/live_ips/liveplayByAPP?channelID=xinyingshi&appId=iqhpk8pl19&isHLS=1",
85 85 "hls_url_rate3":"",
86 86 "hls_url_rate4":""
87 87 },
88 88
89 89 "mp4_url_rate1":"",
90   - "mp4_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplayBySWF?channelID=xinyingshi_m2&rate=2&sp_id=iqhpk8pl19",
  90 + "mp4_url_rate2":"http://api.cnlive.com/open/api2/live_ips/liveplayByAPP?channelID=xinyingshi&appId=iqhpk8pl19&isHLS=0",
91 91 "mp4_url_rate3":"",
92 92 "mp4_url_rate4":"",
93 93 "hls_url_rate1":"",
94   - "hls_url_rate2":"http://api.cnlive.com/open/api3/play/IPS/liveplay?channelID=xinyingshi_m2&rate=2&sp_id=iqhpk8pl19",
  94 + "hls_url_rate2":"http://api.cnlive.com/open/api2/live_ips/liveplayByAPP?channelID=xinyingshi&appId=iqhpk8pl19&isHLS=1",
95 95 "hls_url_rate3":"",
96 96 "hls_url_rate4":""
97 97
... ... @@ -101,15 +101,17 @@ HTTP GET
101 101 ```
102 102  
103 103  
  104 +#### java示例
104 105  
105 106 ``` java
106   -public String getPlayInfo() {
  107 +public Object getPlayInfo() {
107 108 String result = "";
108 109 Map params = new HashMap<>();
109   - params.put("sp_id", "iqhpk8pl19");
110   - params.put("customID", "d849bb4277be42799df3ffc21654d949");
  110 + params.put("appId", "iqhpk8pl19");
  111 + params.put("acitivityId", "d849bb4277be42799df3ffc21654d949");
111 112 params.put("timestamp", System.currentTimeMillis()/1000+"");
112   - String url = OpenUtil.buildURL("http://api.cnlive.com/open/api2/zbsc/getLiveActivityPlayInfo", params, "672db30805f848f59ec3728f8347a4a0");
  113 + params.put("platform_id", "");
  114 + String url = OpenUtil.buildURL("http://api.cnlive.com/open/api2/live_epg/getLiveActivityPlayInfo4App", params, "672db30805f848f59ec3728f8347a4a0");
113 115 HttpURLConnection connection;
114 116 try {
115 117 URL requestUrl = new URL(url);
... ... @@ -137,7 +139,7 @@ public String getPlayInfo() {
137 139  
138 140 if(BaseUtil.notBlank(result)) {
139 141 JSONObject resultJson = JSONObject.parseObject(result);
140   - return resultJson.getJSONObject("data").getString("hls_url_rate2");
  142 + return resultJson;
141 143 }
142 144  
143 145 return "";
... ...