Commit 8b792a251b2b9671b511911a96b85773bde6a2d6
1 parent
c08c7971
2
Showing
1 changed file
with
13 additions
and
11 deletions
02.直播云/1.1 获取直播活动信息接口APP.md
| @@ -67,31 +67,31 @@ HTTP GET | @@ -67,31 +67,31 @@ HTTP GET | ||
| 67 | "extensions":"", | 67 | "extensions":"", |
| 68 | "activityCategory":"", | 68 | "activityCategory":"", |
| 69 | "mp4_url_rate1":"", | 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 | "mp4_url_rate3":"", | 71 | "mp4_url_rate3":"", |
| 72 | "mp4_url_rate4":"", | 72 | "mp4_url_rate4":"", |
| 73 | "hls_url_rate1":"", | 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 | "hls_url_rate3":"", | 75 | "hls_url_rate3":"", |
| 76 | "hls_url_rate4":"", | 76 | "hls_url_rate4":"", |
| 77 | "extViews"[ | 77 | "extViews"[ |
| 78 | { | 78 | { |
| 79 | "mp4_url_rate1":"", | 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 | "mp4_url_rate3":"", | 81 | "mp4_url_rate3":"", |
| 82 | "mp4_url_rate4":"", | 82 | "mp4_url_rate4":"", |
| 83 | "hls_url_rate1":"", | 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 | "hls_url_rate3":"", | 85 | "hls_url_rate3":"", |
| 86 | "hls_url_rate4":"" | 86 | "hls_url_rate4":"" |
| 87 | }, | 87 | }, |
| 88 | { | 88 | { |
| 89 | "mp4_url_rate1":"", | 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 | "mp4_url_rate3":"", | 91 | "mp4_url_rate3":"", |
| 92 | "mp4_url_rate4":"", | 92 | "mp4_url_rate4":"", |
| 93 | "hls_url_rate1":"", | 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 | "hls_url_rate3":"", | 95 | "hls_url_rate3":"", |
| 96 | "hls_url_rate4":"" | 96 | "hls_url_rate4":"" |
| 97 | } | 97 | } |
| @@ -101,15 +101,17 @@ HTTP GET | @@ -101,15 +101,17 @@ HTTP GET | ||
| 101 | ``` | 101 | ``` |
| 102 | 102 | ||
| 103 | 103 | ||
| 104 | +#### java示例 | ||
| 104 | 105 | ||
| 105 | ``` java | 106 | ``` java |
| 106 | -public String getPlayInfo() { | 107 | +public Object getPlayInfo() { |
| 107 | String result = ""; | 108 | String result = ""; |
| 108 | Map params = new HashMap<>(); | 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 | params.put("timestamp", System.currentTimeMillis()/1000+""); | 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 | HttpURLConnection connection; | 115 | HttpURLConnection connection; |
| 114 | try { | 116 | try { |
| 115 | URL requestUrl = new URL(url); | 117 | URL requestUrl = new URL(url); |
| @@ -137,7 +139,7 @@ public String getPlayInfo() { | @@ -137,7 +139,7 @@ public String getPlayInfo() { | ||
| 137 | 139 | ||
| 138 | if(BaseUtil.notBlank(result)) { | 140 | if(BaseUtil.notBlank(result)) { |
| 139 | JSONObject resultJson = JSONObject.parseObject(result); | 141 | JSONObject resultJson = JSONObject.parseObject(result); |
| 140 | - return resultJson.getJSONObject("data").getString("hls_url_rate2"); | 142 | + return resultJson; |
| 141 | } | 143 | } |
| 142 | 144 | ||
| 143 | return ""; | 145 | return ""; |