Commit bcea872711edead3d5368bf64a99d31e292c775e
1 parent
6c9515ae
修改参数
Showing
4 changed files
with
16 additions
and
11 deletions
src/main/java/com/cnlive/mz/live/action/UgcLiveAction.java
| @@ -306,9 +306,7 @@ public class UgcLiveAction { | @@ -306,9 +306,7 @@ public class UgcLiveAction { | ||
| 306 | @Request.Get("/live/epg/play/app") | 306 | @Request.Get("/live/epg/play/app") |
| 307 | public Redirect app(Params params) { | 307 | public Redirect app(Params params) { |
| 308 | log.info(params); | 308 | log.info(params); |
| 309 | - Redirect r = new Redirect(); | ||
| 310 | - r.setRedirectUrl(ugcLiveService.getAppPlayUrl(params)); | ||
| 311 | - return r; | 309 | + return ugcLiveService.getAppPlayUrl(params); |
| 312 | } | 310 | } |
| 313 | 311 | ||
| 314 | /** | 312 | /** |
| @@ -319,9 +317,8 @@ public class UgcLiveAction { | @@ -319,9 +317,8 @@ public class UgcLiveAction { | ||
| 319 | */ | 317 | */ |
| 320 | @Request.Get("/live/epg/play/h5") | 318 | @Request.Get("/live/epg/play/h5") |
| 321 | public Redirect h5(Params params) { | 319 | public Redirect h5(Params params) { |
| 322 | - String url = ugcLiveService.getH5PlayUrl(params); | ||
| 323 | - Redirect r = new Redirect(); | ||
| 324 | - r.setRedirectUrl(url); | 320 | + log.info(params); |
| 321 | + Redirect r = ugcLiveService.getH5PlayUrl(params); | ||
| 325 | return r; | 322 | return r; |
| 326 | } | 323 | } |
| 327 | 324 | ||
| @@ -334,9 +331,11 @@ public class UgcLiveAction { | @@ -334,9 +331,11 @@ public class UgcLiveAction { | ||
| 334 | @Request.Get("/live/epg/play/swf") | 331 | @Request.Get("/live/epg/play/swf") |
| 335 | public ResultBean swf(Params params) { | 332 | public ResultBean swf(Params params) { |
| 336 | ResultBean rb = new ResultBean(); | 333 | ResultBean rb = new ResultBean(); |
| 334 | + log.info(params); | ||
| 337 | Map<String, Object> map = new HashMap<String, Object>(); | 335 | Map<String, Object> map = new HashMap<String, Object>(); |
| 338 | - String url = ugcLiveService.getH5PlayUrl(params); | ||
| 339 | - map.put("location", url); | 336 | + Redirect r= ugcLiveService.getSwfPlayUrl(params); |
| 337 | + map.put("videoUrl", r.getRedirectUrl()); | ||
| 338 | + rb.setData(map); | ||
| 340 | rb.setErrorMessage("启动swf活动成功"); | 339 | rb.setErrorMessage("启动swf活动成功"); |
| 341 | rb.setErrorCode("0"); | 340 | rb.setErrorCode("0"); |
| 342 | return rb; | 341 | return rb; |
src/main/java/com/cnlive/mz/live/action/VodIpsAction.java
| @@ -56,7 +56,7 @@ public class VodIpsAction { | @@ -56,7 +56,7 @@ public class VodIpsAction { | ||
| 56 | String url=vodIpsServer.getFlashPlayUrl(vId, rate); | 56 | String url=vodIpsServer.getFlashPlayUrl(vId, rate); |
| 57 | ResultBean rb = new ResultBean(); | 57 | ResultBean rb = new ResultBean(); |
| 58 | Map map = new HashMap(); | 58 | Map map = new HashMap(); |
| 59 | - map.put("location",url); | 59 | + map.put("videoUrl",url); |
| 60 | rb.setData(map); | 60 | rb.setData(map); |
| 61 | rb.setErrorCode("0"); | 61 | rb.setErrorCode("0"); |
| 62 | rb.setErrorMessage("成功"); | 62 | rb.setErrorMessage("成功"); |
src/main/java/com/cnlive/socket/TE.java
| @@ -14,7 +14,7 @@ import org.apache.commons.httpclient.methods.GetMethod; | @@ -14,7 +14,7 @@ import org.apache.commons.httpclient.methods.GetMethod; | ||
| 14 | 14 | ||
| 15 | public class TE { | 15 | public class TE { |
| 16 | public static void main(String[] args) { | 16 | public static void main(String[] args) { |
| 17 | - new TE().doGet("http://bc.cnlive.com/live/epg/play/app?app_id=60_irg1rhs308&channelID=1471754157393"); | 17 | + new TE().doGet("http://localhost:8080/cnlive_live_web/live/epg/play/app?channelId=xinyingshi&appId=82_irej0pbo53×tamp=1472440205&sp_id=82_irej0pbo53&spId=82_irej0pbo53"); |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | private HttpClient getHttpClient() { | 20 | private HttpClient getHttpClient() { |
| @@ -41,6 +41,12 @@ public void doGet(String url) { | @@ -41,6 +41,12 @@ public void doGet(String url) { | ||
| 41 | String playUrl = h.getValue(); | 41 | String playUrl = h.getValue(); |
| 42 | 42 | ||
| 43 | } | 43 | } |
| 44 | + Header[] hss = method.getResponseHeaders("message"); | ||
| 45 | + for (Header h : hss) { | ||
| 46 | + System.out.println(h.getName() + "--" + h.getValue()); | ||
| 47 | + String playUrl = h.getValue(); | ||
| 48 | + | ||
| 49 | + } | ||
| 44 | } else { | 50 | } else { |
| 45 | stream = method.getResponseBodyAsStream(); | 51 | stream = method.getResponseBodyAsStream(); |
| 46 | in = new BufferedReader(new InputStreamReader(stream, "UTF-8")); | 52 | in = new BufferedReader(new InputStreamReader(stream, "UTF-8")); |
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties
| 1 | #Generated by Maven Integration for Eclipse | 1 | #Generated by Maven Integration for Eclipse |
| 2 | -#Thu Aug 25 16:34:25 CST 2016 | 2 | +#Sun Aug 28 15:02:32 CST 2016 |
| 3 | version=0.0.1-SNAPSHOT | 3 | version=0.0.1-SNAPSHOT |
| 4 | groupId=com.cnlive.mz.live.web | 4 | groupId=com.cnlive.mz.live.web |
| 5 | m2e.projectName=cnlive_live_web | 5 | m2e.projectName=cnlive_live_web |