Commit ae7626ef2701d51cf4ec384a0638452d0d708ec3
Merge branch 'master' of http://bj.gitlab.cnlive.com/liujicheng/cnlive_live_web into zzpUGC
# Conflicts: # src/main/java/com/cnlive/mz/live/rest/BaseUtil.java
Showing
52 changed files
with
1564 additions
and
189 deletions
.classpath.rej
0 → 100644
| 1 | +diff a/.classpath b/.classpath (rejected hunks) | ||
| 2 | +@@ -1,29 +0,29 @@ | ||
| 3 | +-<?xml version="1.0" encoding="UTF-8"?> | ||
| 4 | +-<classpath> | ||
| 5 | +- <classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
| 6 | +- <attributes> | ||
| 7 | +- <attribute name="optional" value="true"/> | ||
| 8 | +- <attribute name="maven.pomderived" value="true"/> | ||
| 9 | +- </attributes> | ||
| 10 | +- </classpathentry> | ||
| 11 | +- <classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
| 12 | +- <attributes> | ||
| 13 | +- <attribute name="optional" value="true"/> | ||
| 14 | +- <attribute name="maven.pomderived" value="true"/> | ||
| 15 | +- </attributes> | ||
| 16 | +- </classpathentry> | ||
| 17 | ++<?xml version="1.0" encoding="UTF-8"?> | ||
| 18 | ++<classpath> | ||
| 19 | ++ <classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
| 20 | ++ <attributes> | ||
| 21 | ++ <attribute name="optional" value="true"/> | ||
| 22 | ++ <attribute name="maven.pomderived" value="true"/> | ||
| 23 | ++ </attributes> | ||
| 24 | ++ </classpathentry> | ||
| 25 | ++ <classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
| 26 | ++ <attributes> | ||
| 27 | ++ <attribute name="optional" value="true"/> | ||
| 28 | ++ <attribute name="maven.pomderived" value="true"/> | ||
| 29 | ++ </attributes> | ||
| 30 | ++ </classpathentry> | ||
| 31 | + <classpathentry including="**/*.java" kind="src" path="src/main/resources"/> | ||
| 32 | +- <classpathentry kind="src" path="src/main/resources/i18n"/> | ||
| 33 | +- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| 34 | +- <attributes> | ||
| 35 | +- <attribute name="maven.pomderived" value="true"/> | ||
| 36 | +- <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
| 37 | +- </attributes> | ||
| 38 | +- </classpathentry> | ||
| 39 | +- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> | ||
| 40 | +- <attributes> | ||
| 41 | +- <attribute name="maven.pomderived" value="true"/> | ||
| 42 | +- </attributes> | ||
| 43 | +- </classpathentry> | ||
| 44 | +- <classpathentry kind="output" path="target/classes"/> | ||
| 45 | +-</classpath> | ||
| 46 | ++ <classpathentry kind="src" path="src/main/resources/i18n"/> | ||
| 47 | ++ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
| 48 | ++ <attributes> | ||
| 49 | ++ <attribute name="maven.pomderived" value="true"/> | ||
| 50 | ++ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
| 51 | ++ </attributes> | ||
| 52 | ++ </classpathentry> | ||
| 53 | ++ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> | ||
| 54 | ++ <attributes> | ||
| 55 | ++ <attribute name="maven.pomderived" value="true"/> | ||
| 56 | ++ </attributes> | ||
| 57 | ++ </classpathentry> | ||
| 58 | ++ <classpathentry kind="output" path="target/classes"/> | ||
| 59 | ++</classpath> |
.settings/org.eclipse.wst.common.component
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<project-modules id="moduleCoreId" project-version="1.5.0"> | 1 | +<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> |
| 3 | <wb-module deploy-name="cnlive_live_web"> | 2 | <wb-module deploy-name="cnlive_live_web"> |
| 4 | <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> | 3 | <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> |
| 5 | <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> | 4 | <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> |
| @@ -9,10 +8,10 @@ | @@ -9,10 +8,10 @@ | ||
| 9 | <dependent-module archiveName="cnlive_live_model-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_live_model/cnlive_live_model"> | 8 | <dependent-module archiveName="cnlive_live_model-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_live_model/cnlive_live_model"> |
| 10 | <dependency-type>uses</dependency-type> | 9 | <dependency-type>uses</dependency-type> |
| 11 | </dependent-module> | 10 | </dependent-module> |
| 12 | - <dependent-module archiveName="cnlive_ks3-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_ks3/cnlive_ks3"> | 11 | + <dependent-module archiveName="smart-framework-4.0.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-framework/smart-framework"> |
| 13 | <dependency-type>uses</dependency-type> | 12 | <dependency-type>uses</dependency-type> |
| 14 | </dependent-module> | 13 | </dependent-module> |
| 15 | - <dependent-module archiveName="smart-framework-4.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-framework/smart-framework"> | 14 | + <dependent-module archiveName="smart-plugin-job-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-job/smart-plugin-job"> |
| 16 | <dependency-type>uses</dependency-type> | 15 | <dependency-type>uses</dependency-type> |
| 17 | </dependent-module> | 16 | </dependent-module> |
| 18 | <dependent-module archiveName="smart-plugin-dbcp-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-dbcp/smart-plugin-dbcp"> | 17 | <dependent-module archiveName="smart-plugin-dbcp-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-dbcp/smart-plugin-dbcp"> |
pom.xml
| @@ -53,11 +53,6 @@ | @@ -53,11 +53,6 @@ | ||
| 53 | <artifactId>cnlive_live_model</artifactId> | 53 | <artifactId>cnlive_live_model</artifactId> |
| 54 | <version>0.0.1-SNAPSHOT</version> | 54 | <version>0.0.1-SNAPSHOT</version> |
| 55 | </dependency> | 55 | </dependency> |
| 56 | - <dependency> | ||
| 57 | - <groupId>com.cnlive</groupId> | ||
| 58 | - <artifactId>cnlive_media_tools</artifactId> | ||
| 59 | - <version>1.0.0</version> | ||
| 60 | - </dependency> | ||
| 61 | </dependencies> | 56 | </dependencies> |
| 62 | <packaging>war</packaging> | 57 | <packaging>war</packaging> |
| 63 | </project> | 58 | </project> |
src/main/java/com/cnlive/mz/live/action/CheckAction.java
0 → 100644
| 1 | +package com.cnlive.mz.live.action; | ||
| 2 | + | ||
| 3 | +import java.io.UnsupportedEncodingException; | ||
| 4 | +import java.net.URLEncoder; | ||
| 5 | +import java.util.List; | ||
| 6 | +import java.util.Map; | ||
| 7 | + | ||
| 8 | +import org.smart4j.framework.dao.bean.Pager; | ||
| 9 | +import org.smart4j.framework.ioc.annotation.Inject; | ||
| 10 | +import org.smart4j.framework.mvc.DataContext; | ||
| 11 | +import org.smart4j.framework.mvc.annotation.Action; | ||
| 12 | +import org.smart4j.framework.mvc.annotation.Request; | ||
| 13 | +import org.smart4j.framework.mvc.bean.Params; | ||
| 14 | +import org.smart4j.framework.mvc.bean.Result; | ||
| 15 | +import org.smart4j.framework.mvc.bean.View; | ||
| 16 | +import org.smart4j.framework.util.CastUtil; | ||
| 17 | + | ||
| 18 | +import com.cnlive.mz.commons.JsonUtil; | ||
| 19 | +import com.cnlive.mz.commons.net.HttpReq; | ||
| 20 | +import com.cnlive.mz.live.common.LiveUtils; | ||
| 21 | +import com.cnlive.mz.live.entity.TLive; | ||
| 22 | +import com.cnlive.mz.live.rest.BaseUtil; | ||
| 23 | +import com.cnlive.mz.live.service.TCheckService; | ||
| 24 | +import com.cnlive.mz.live.service.TLiveService; | ||
| 25 | +import com.cnlive.mz.live.service.TRoomService; | ||
| 26 | + | ||
| 27 | +@Action | ||
| 28 | +public class CheckAction { | ||
| 29 | + | ||
| 30 | + @Inject | ||
| 31 | + private TLiveService tLiveService; | ||
| 32 | + @Inject | ||
| 33 | + private TRoomService tRoomService; | ||
| 34 | + @Inject | ||
| 35 | + private TCheckService tCheckService; | ||
| 36 | + | ||
| 37 | + @Request.Get("/check/list/{page_number}") | ||
| 38 | + public View list(int page_number) { | ||
| 39 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 40 | + System.out.println(user_id); | ||
| 41 | + Pager<TLive> tLive = tCheckService.getTCheckLivePager(page_number, 9, user_id); | ||
| 42 | + List list = tLiveService.getLives(user_id); | ||
| 43 | + View view = new View("check/check_management.jsp"); | ||
| 44 | + view.data("tLive", tLive); | ||
| 45 | + view.data("list", list); | ||
| 46 | + return view; | ||
| 47 | + //return new View("check/demo.html"); | ||
| 48 | + } | ||
| 49 | + @Request.Post("/check/close/{id}") | ||
| 50 | + public Result coseLive(int id,Params params) throws UnsupportedEncodingException{ | ||
| 51 | + String userId = params.getString("user_id"); | ||
| 52 | + String streamName = userId+"_"+id; | ||
| 53 | + String accesskey = BaseUtil.getAccessKey(); | ||
| 54 | + accesskey = java.net.URLEncoder.encode(accesskey,"utf-8"); | ||
| 55 | + String signature = BaseUtil.signature(streamName); | ||
| 56 | + String del = "del"; | ||
| 57 | + String delsignature = BaseUtil.signature(del,streamName); | ||
| 58 | + String expire = BaseUtil.getTimestamp(); | ||
| 59 | + System.out.println(expire+"---expire---"); | ||
| 60 | + //添加到黑名单。。 | ||
| 61 | + try { | ||
| 62 | + addBlackList(signature,accesskey,expire,streamName); | ||
| 63 | + delBlackList(delsignature,accesskey,expire,streamName); | ||
| 64 | + } catch (UnsupportedEncodingException e) { | ||
| 65 | + e.printStackTrace(); | ||
| 66 | + } | ||
| 67 | + boolean flag = tCheckService.closeLive(id); | ||
| 68 | + return new Result(flag); | ||
| 69 | + } | ||
| 70 | + /** | ||
| 71 | + * 添加到黑名单 | ||
| 72 | + * @param signature | ||
| 73 | + * @param accesskey | ||
| 74 | + * @param expire | ||
| 75 | + * @param streamName | ||
| 76 | + * @return | ||
| 77 | + * @throws UnsupportedEncodingException | ||
| 78 | + */ | ||
| 79 | + public String addBlackList(String signature, String accesskey, String expire,String streamName) throws UnsupportedEncodingException { | ||
| 80 | + String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature="+signature+"&accesskey="+accesskey+"&expire="+expire+"&app=live&method=add&name=" + streamName; | ||
| 81 | + System.out.println(url); | ||
| 82 | + String jsonArrStr = HttpReq.getRequestWidthResult(url); | ||
| 83 | + int status = HttpReq.getRequest(url); | ||
| 84 | + System.out.println(status+"......and......"+jsonArrStr); | ||
| 85 | + /*Map map = JsonUtil.getMapFromJsonObjStr(jsonArrStr); | ||
| 86 | + String chatRoomid = (String) map.get("Content-Length");*/ | ||
| 87 | + return jsonArrStr; | ||
| 88 | + } | ||
| 89 | + /** | ||
| 90 | + * 从黑名单删除 | ||
| 91 | + * @param signature | ||
| 92 | + * @param accesskey | ||
| 93 | + * @param expire | ||
| 94 | + * @param streamName | ||
| 95 | + * @return | ||
| 96 | + * @throws UnsupportedEncodingException | ||
| 97 | + */ | ||
| 98 | + public Object delBlackList(String signature, String accesskey, String expire,String streamName) throws UnsupportedEncodingException { | ||
| 99 | + String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature="+signature+"&accesskey="+accesskey+"&expire="+expire+"&app=live&method=del&name=" + streamName; | ||
| 100 | + System.out.println("..url.."+url); | ||
| 101 | + String jsonArrStr = HttpReq.getRequestWidthResult(url); | ||
| 102 | + System.out.println("..jsonArrStr.."+jsonArrStr); | ||
| 103 | + /*Map map = JsonUtil.getMapFromJsonObjStr(jsonArrStr); | ||
| 104 | + String chatRoomid = (String) map.get("Content-Length");*/ | ||
| 105 | + return jsonArrStr; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | +} |
src/main/java/com/cnlive/mz/live/action/HttpPostArgumentTest2.java
0 → 100644
| 1 | +package com.cnlive.mz.live.action; | ||
| 2 | + | ||
| 3 | +import java.io.File; | ||
| 4 | +import java.io.IOException; | ||
| 5 | + | ||
| 6 | +import org.apache.commons.httpclient.NameValuePair; | ||
| 7 | +import org.apache.commons.httpclient.params.HttpMethodParams; | ||
| 8 | +import org.apache.http.HttpEntity; | ||
| 9 | +import org.apache.http.HttpResponse; | ||
| 10 | +import org.apache.http.HttpStatus; | ||
| 11 | +import org.apache.http.ParseException; | ||
| 12 | +import org.apache.http.client.HttpClient; | ||
| 13 | +import org.apache.http.client.methods.HttpPost; | ||
| 14 | +import org.apache.http.entity.mime.MultipartEntity; | ||
| 15 | +import org.apache.http.entity.mime.content.FileBody; | ||
| 16 | +import org.apache.http.entity.mime.content.StringBody; | ||
| 17 | +import org.apache.http.impl.client.DefaultHttpClient; | ||
| 18 | +import org.apache.http.util.EntityUtils; | ||
| 19 | + | ||
| 20 | +import com.cnlive.mz.commons.net.HttpReq; | ||
| 21 | + | ||
| 22 | +public class HttpPostArgumentTest2 { | ||
| 23 | + | ||
| 24 | + private static String user_access_key = "cf34f28db21b46678237bfa849e239ea"; | ||
| 25 | + private static String app_access_key = "7338ebf9cab441c0843e437a18d85549"; | ||
| 26 | + | ||
| 27 | + public void SubmitPost(String url, String filepath) { | ||
| 28 | + HttpClient httpclient = new DefaultHttpClient(); | ||
| 29 | + try { | ||
| 30 | + HttpPost httppost = new HttpPost(url); | ||
| 31 | + FileBody bin = new FileBody(new File(filepath)); | ||
| 32 | + MultipartEntity reqEntity = new MultipartEntity(); | ||
| 33 | + // reqEntity.addPart("file", bin); | ||
| 34 | + reqEntity.addPart("app_access_key", new StringBody("7338ebf9cab441c0843e437a18d85549")); | ||
| 35 | + reqEntity.addPart("user_access_key", new StringBody("cf34f28db21b46678237bfa849e239ea")); | ||
| 36 | + reqEntity.addPart("direct", new StringBody("0")); | ||
| 37 | + reqEntity.addPart("upload_type", new StringBody("1")); | ||
| 38 | + reqEntity.addPart("md5", new StringBody("liujicheng")); | ||
| 39 | + reqEntity.addPart("title", new StringBody("title")); | ||
| 40 | + reqEntity.addPart("name", new StringBody("中投视频宣传片熊猫test")); | ||
| 41 | + reqEntity.addPart("server_access_key", new StringBody("3830ce241dad4b9f844d131c890231ae")); | ||
| 42 | + | ||
| 43 | + httppost.setEntity(reqEntity); | ||
| 44 | + HttpResponse response = httpclient.execute(httppost); | ||
| 45 | + int statusCode = response.getStatusLine().getStatusCode(); | ||
| 46 | + System.out.println(statusCode); | ||
| 47 | + System.out.println("服务器正常响应....."); | ||
| 48 | + HttpEntity resEntity = response.getEntity(); | ||
| 49 | + System.out.println(EntityUtils.toString(resEntity)); | ||
| 50 | + System.out.println(resEntity.getContent()); | ||
| 51 | + EntityUtils.consume(resEntity); | ||
| 52 | + | ||
| 53 | + } catch (ParseException e) { | ||
| 54 | + e.printStackTrace(); | ||
| 55 | + } catch (IOException e) { | ||
| 56 | + e.printStackTrace(); | ||
| 57 | + } finally { | ||
| 58 | + try { | ||
| 59 | + httpclient.getConnectionManager().shutdown(); | ||
| 60 | + } catch (Exception ignore) { | ||
| 61 | + ignore.printStackTrace(); | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public static void redirect() { | ||
| 67 | + NameValuePair[] param = { new NameValuePair("relation_id", "282512"), new NameValuePair("video_type", "3"), | ||
| 68 | + new NameValuePair("user_access_key", user_access_key), | ||
| 69 | + new NameValuePair("app_access_key", app_access_key) }; | ||
| 70 | + String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/redirect", param); | ||
| 71 | + System.out.println(c); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public static void delete() { | ||
| 75 | + NameValuePair[] param = { new NameValuePair("video_type", "2"), | ||
| 76 | + new NameValuePair("app_access_key", "7338ebf9cab441c0843e437a18d85549"), | ||
| 77 | + new NameValuePair("user_access_key", "cf34f28db21b46678237bfa849e239ea"), | ||
| 78 | + new NameValuePair("video_uuid", "a8794762b3e92c7d6589a6157cf1ef27,7e26dee78a584f8c5ab1d93a9c878f1d") }; | ||
| 79 | + String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/delete", param); | ||
| 80 | + System.out.println(c); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + private static String md5 = "ffa699fb66750acab30b71b8ceb0172d1"; | ||
| 84 | + | ||
| 85 | + public static void supload() { | ||
| 86 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 87 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("video_type", "2"), | ||
| 88 | + new NameValuePair("upload_type", "0"), new NameValuePair("direct", "1"), new NameValuePair("md5", md5), | ||
| 89 | + new NameValuePair("title", "tit三道恩le1"), new NameValuePair("relation_id", "615207"), | ||
| 90 | + new NameValuePair("custom_args", "custom_args1"), new NameValuePair("name", "VID_20151224_105421.mp4"), | ||
| 91 | + new NameValuePair("server_access_key", "3830ce241dad4b9f844d131c890231ae") }; | ||
| 92 | + String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/supload", param); | ||
| 93 | + System.out.println(c); | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public static void uploadNotify() { | ||
| 97 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 98 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("upload_type", "1"), | ||
| 99 | + new NameValuePair("video_type", "2"), new NameValuePair("state", "200"), | ||
| 100 | + new NameValuePair("video_uuid", md5) }; | ||
| 101 | + String c = HttpReq | ||
| 102 | + .postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/uploadNotify", param); | ||
| 103 | + System.out.println(c); | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public static void all() { | ||
| 107 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | ||
| 108 | + new NameValuePair("relation_id", "498122"), | ||
| 109 | + | ||
| 110 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("upload_type", "1"), | ||
| 111 | + new NameValuePair("video_type", "2"), new NameValuePair("page_no", "1"), | ||
| 112 | + new NameValuePair("video_uuid", md5) }; | ||
| 113 | + String c = HttpReq.postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/all", param); | ||
| 114 | + System.out.println(c); | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public static void main(String[] args) { | ||
| 118 | + // new HttpPostArgumentTest2().delete(); | ||
| 119 | + //HttpPostArgumentTest2.all(); | ||
| 120 | + HttpPostArgumentTest2.redirect(); | ||
| 121 | + // HttpReq.postRequestWidthResult("http://120.132.76.51:9696/cnlive_encoding_job/task", | ||
| 122 | + // "json", "jsonjsonjsonjson");r | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | +} |
src/main/java/com/cnlive/mz/live/action/IndexAction.java
| @@ -15,6 +15,7 @@ import java.util.Map; | @@ -15,6 +15,7 @@ import java.util.Map; | ||
| 15 | 15 | ||
| 16 | import javax.servlet.http.HttpSession; | 16 | import javax.servlet.http.HttpSession; |
| 17 | 17 | ||
| 18 | +import org.apache.commons.lang3.StringUtils; | ||
| 18 | import org.smart4j.framework.core.ConfigHelper; | 19 | import org.smart4j.framework.core.ConfigHelper; |
| 19 | import org.smart4j.framework.ioc.annotation.Inject; | 20 | import org.smart4j.framework.ioc.annotation.Inject; |
| 20 | import org.smart4j.framework.mvc.DataContext; | 21 | import org.smart4j.framework.mvc.DataContext; |
| @@ -53,7 +54,6 @@ public class IndexAction { | @@ -53,7 +54,6 @@ public class IndexAction { | ||
| 53 | @Inject | 54 | @Inject |
| 54 | private TUserService tUserService; | 55 | private TUserService tUserService; |
| 55 | 56 | ||
| 56 | - | ||
| 57 | int type = 1; | 57 | int type = 1; |
| 58 | 58 | ||
| 59 | @Request.Get("/index") | 59 | @Request.Get("/index") |
| @@ -89,11 +89,16 @@ public class IndexAction { | @@ -89,11 +89,16 @@ public class IndexAction { | ||
| 89 | @Request.Post("/doswitch") | 89 | @Request.Post("/doswitch") |
| 90 | public Result doSwitch(Params params) { | 90 | public Result doSwitch(Params params) { |
| 91 | String channel_ids = params.getString("channel_ids"); | 91 | String channel_ids = params.getString("channel_ids"); |
| 92 | - String wowza_id = params.getString("wowza_id"); | ||
| 93 | - tActivityService.doSwitch(channel_ids, Integer.parseInt(wowza_id)); | ||
| 94 | - return new Result(true); | 92 | + if (StringUtils.isEmpty(channel_ids)) { |
| 93 | + System.out.println("没选择频道"); | ||
| 94 | + return new Result(false); | ||
| 95 | + } else { | ||
| 96 | + String wowza_id = params.getString("wowza_id"); | ||
| 97 | + tActivityService.doSwitch(channel_ids, Integer.parseInt(wowza_id)); | ||
| 98 | + return new Result(true); | ||
| 99 | + } | ||
| 95 | } | 100 | } |
| 96 | - | 101 | + |
| 97 | @Request.Get("/login/success") | 102 | @Request.Get("/login/success") |
| 98 | public View loginSuccess(Params params) { | 103 | public View loginSuccess(Params params) { |
| 99 | String userName = params.getString("username"); | 104 | String userName = params.getString("username"); |
| @@ -102,7 +107,7 @@ public class IndexAction { | @@ -102,7 +107,7 @@ public class IndexAction { | ||
| 102 | if (tUser == null) { | 107 | if (tUser == null) { |
| 103 | view = new View("index/loginfail.jsp"); | 108 | view = new View("index/loginfail.jsp"); |
| 104 | } else { | 109 | } else { |
| 105 | - HttpSession session=DataContext.getRequest().getSession(); | 110 | + HttpSession session = DataContext.getRequest().getSession(); |
| 106 | session.setAttribute(LiveUtils.SESSION_KEY_NAME, tUser.getName()); | 111 | session.setAttribute(LiveUtils.SESSION_KEY_NAME, tUser.getName()); |
| 107 | session.setAttribute(LiveUtils.SESSION_KEY_ID, tUser.getId()); | 112 | session.setAttribute(LiveUtils.SESSION_KEY_ID, tUser.getId()); |
| 108 | session.setAttribute(LiveUtils.SESSION_ROLE_ID, tUser.getIs_admin()); | 113 | session.setAttribute(LiveUtils.SESSION_ROLE_ID, tUser.getIs_admin()); |
| @@ -125,17 +130,17 @@ public class IndexAction { | @@ -125,17 +130,17 @@ public class IndexAction { | ||
| 125 | public void logout() { | 130 | public void logout() { |
| 126 | HttpSession session = DataContext.getRequest().getSession(); | 131 | HttpSession session = DataContext.getRequest().getSession(); |
| 127 | String logoutUrl = ConfigHelper.getString("auth.logout.url"); | 132 | String logoutUrl = ConfigHelper.getString("auth.logout.url"); |
| 128 | - String webUrl= ConfigHelper.getString("website.url"); | 133 | + String webUrl = ConfigHelper.getString("website.url"); |
| 129 | session.removeAttribute(LiveUtils.SESSION_KEY_NAME); | 134 | session.removeAttribute(LiveUtils.SESSION_KEY_NAME); |
| 130 | session.removeAttribute(LiveUtils.SESSION_KEY_ID); | 135 | session.removeAttribute(LiveUtils.SESSION_KEY_ID); |
| 131 | session.invalidate(); | 136 | session.invalidate(); |
| 132 | try { | 137 | try { |
| 133 | - DataContext.getResponse().sendRedirect(logoutUrl+webUrl+"/logout/success"); | 138 | + DataContext.getResponse().sendRedirect(logoutUrl + webUrl + "/logout/success"); |
| 134 | } catch (IOException e) { | 139 | } catch (IOException e) { |
| 135 | e.printStackTrace(); | 140 | e.printStackTrace(); |
| 136 | } | 141 | } |
| 137 | } | 142 | } |
| 138 | - | 143 | + |
| 139 | @Request.Get("/logout/success") | 144 | @Request.Get("/logout/success") |
| 140 | public Result logoutSuccess() { | 145 | public Result logoutSuccess() { |
| 141 | return new Result(true).data("退出成功"); | 146 | return new Result(true).data("退出成功"); |
src/main/java/com/cnlive/mz/live/action/Init.java
0 → 100644
| 1 | +package com.cnlive.mz.live.action; | ||
| 2 | + | ||
| 3 | +import java.io.IOException; | ||
| 4 | + | ||
| 5 | +import javax.servlet.ServletConfig; | ||
| 6 | +import javax.servlet.ServletException; | ||
| 7 | +import javax.servlet.http.HttpServlet; | ||
| 8 | +import javax.servlet.http.HttpServletRequest; | ||
| 9 | +import javax.servlet.http.HttpServletResponse; | ||
| 10 | + | ||
| 11 | +import org.smart4j.plugin.job.JobHelper; | ||
| 12 | + | ||
| 13 | +import com.cnlive.mz.live.service.impl.Job; | ||
| 14 | + | ||
| 15 | +public class Init extends HttpServlet { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public void init(ServletConfig config) throws ServletException { | ||
| 19 | + // 初始化 | ||
| 20 | + JobHelper.startJob(Job.class, "0/30 * * * * ?"); | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + @Override | ||
| 24 | + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
| 25 | + super.doGet(req, resp); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + @Override | ||
| 29 | + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
| 30 | + super.doPost(req, resp); | ||
| 31 | + } | ||
| 32 | +} |
src/main/java/com/cnlive/mz/live/action/LiveAction.java
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | 9 | ||
| 10 | package com.cnlive.mz.live.action; | 10 | package com.cnlive.mz.live.action; |
| 11 | 11 | ||
| 12 | +import java.io.UnsupportedEncodingException; | ||
| 12 | import java.util.List; | 13 | import java.util.List; |
| 13 | 14 | ||
| 14 | import org.smart4j.framework.dao.bean.Pager; | 15 | import org.smart4j.framework.dao.bean.Pager; |
| @@ -21,13 +22,14 @@ import org.smart4j.framework.mvc.bean.Multiparts; | @@ -21,13 +22,14 @@ import org.smart4j.framework.mvc.bean.Multiparts; | ||
| 21 | import org.smart4j.framework.mvc.bean.Params; | 22 | import org.smart4j.framework.mvc.bean.Params; |
| 22 | import org.smart4j.framework.mvc.bean.Result; | 23 | import org.smart4j.framework.mvc.bean.Result; |
| 23 | import org.smart4j.framework.mvc.bean.View; | 24 | import org.smart4j.framework.mvc.bean.View; |
| 24 | -import org.smart4j.framework.orm.DataSet; | ||
| 25 | import org.smart4j.framework.util.CastUtil; | 25 | import org.smart4j.framework.util.CastUtil; |
| 26 | 26 | ||
| 27 | import com.cnlive.mz.commons.Constants; | 27 | import com.cnlive.mz.commons.Constants; |
| 28 | +import com.cnlive.mz.commons.net.HttpReq; | ||
| 28 | import com.cnlive.mz.live.common.LiveUtils; | 29 | import com.cnlive.mz.live.common.LiveUtils; |
| 29 | import com.cnlive.mz.live.entity.TLive; | 30 | import com.cnlive.mz.live.entity.TLive; |
| 30 | import com.cnlive.mz.live.entity.TRoom; | 31 | import com.cnlive.mz.live.entity.TRoom; |
| 32 | +import com.cnlive.mz.live.rest.BaseUtil; | ||
| 31 | import com.cnlive.mz.live.service.TLiveService; | 33 | import com.cnlive.mz.live.service.TLiveService; |
| 32 | import com.cnlive.mz.live.service.TRoomService; | 34 | import com.cnlive.mz.live.service.TRoomService; |
| 33 | 35 | ||
| @@ -94,4 +96,102 @@ public class LiveAction { | @@ -94,4 +96,102 @@ public class LiveAction { | ||
| 94 | view.data("tRoom", tRoom); | 96 | view.data("tRoom", tRoom); |
| 95 | return view; | 97 | return view; |
| 96 | } | 98 | } |
| 99 | + | ||
| 100 | + @Request.Get("/check/list/{page_number}") | ||
| 101 | + public View check(int page_number) { | ||
| 102 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 103 | + Pager<TLive> tLive = tLiveService.getTCheckLivePager(page_number, 12, user_id); | ||
| 104 | + View view = new View("check/monitor.jsp"); | ||
| 105 | + view.data("tLive", tLive); | ||
| 106 | + return view; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + // 置顶 | ||
| 110 | + @Request.Get("/check/top/{id}") | ||
| 111 | + public Result top(int id) { | ||
| 112 | + tLiveService.top(id); | ||
| 113 | + return new Result(true); | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + // 切断 | ||
| 117 | + @Request.Get("/check/cut/{id}") | ||
| 118 | + public Result cut(int id) { | ||
| 119 | + return new Result(true); | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + // 通过审核 | ||
| 123 | + @Request.Get("/check/pass/{id}") | ||
| 124 | + public Result pass(int id) { | ||
| 125 | + tLiveService.pass(id); | ||
| 126 | + return new Result(true); | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + @Request.Post("/check/close/{id}") | ||
| 130 | + public Result coseLive(int id, Params params) throws UnsupportedEncodingException { | ||
| 131 | + String userId = params.getString("user_id"); | ||
| 132 | + String streamName = userId + "_" + id; | ||
| 133 | + // String streamName = "498122_57"; | ||
| 134 | + String accesskey = "I3TC8a4xboPUMe5xlp22"; | ||
| 135 | + accesskey = java.net.URLEncoder.encode(accesskey, "utf-8"); | ||
| 136 | + String signature = BaseUtil.signature(streamName); | ||
| 137 | + String expire = String.valueOf(BaseUtil.getTimestamp()).substring(0, 10); | ||
| 138 | + System.out.println(expire + "---expire---"); | ||
| 139 | + // 添加到黑名单。。 | ||
| 140 | + try { | ||
| 141 | + addBlackList(signature, accesskey, expire, streamName); | ||
| 142 | + } catch (UnsupportedEncodingException e) { | ||
| 143 | + e.printStackTrace(); | ||
| 144 | + } | ||
| 145 | + boolean flag = tLiveService.closeLive(id); | ||
| 146 | + return new Result(flag); | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + /** | ||
| 150 | + * 添加到黑名单 | ||
| 151 | + * | ||
| 152 | + * @param signature | ||
| 153 | + * @param accesskey | ||
| 154 | + * @param expire | ||
| 155 | + * @param streamName | ||
| 156 | + * @return | ||
| 157 | + * @throws UnsupportedEncodingException | ||
| 158 | + */ | ||
| 159 | + public String addBlackList(String signature, String accesskey, String expire, String streamName) | ||
| 160 | + throws UnsupportedEncodingException { | ||
| 161 | + String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey | ||
| 162 | + + "&expire=" + expire + "&method=add&app=live&name=" + streamName; | ||
| 163 | + System.out.println(url); | ||
| 164 | + String jsonArrStr = HttpReq.getRequestWidthResult(url); | ||
| 165 | + int status = HttpReq.getRequest(url); | ||
| 166 | + System.out.println("............" + status); | ||
| 167 | + System.out.println("............" + jsonArrStr); | ||
| 168 | + /* | ||
| 169 | + * Map map = JsonUtil.getMapFromJsonObjStr(jsonArrStr); String | ||
| 170 | + * chatRoomid = (String) map.get("Content-Length"); | ||
| 171 | + */ | ||
| 172 | + return jsonArrStr; | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + /** | ||
| 176 | + * 从黑名单删除 | ||
| 177 | + * | ||
| 178 | + * @param signature | ||
| 179 | + * @param accesskey | ||
| 180 | + * @param expire | ||
| 181 | + * @param streamName | ||
| 182 | + * @return | ||
| 183 | + * @throws UnsupportedEncodingException | ||
| 184 | + */ | ||
| 185 | + public Object delBlackList(String signature, String accesskey, String expire, String streamName) | ||
| 186 | + throws UnsupportedEncodingException { | ||
| 187 | + String url = "http://cnlive.uplive.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey | ||
| 188 | + + "&expire=" + expire + "&method=del&app=live&name=" + streamName; | ||
| 189 | + String jsonArrStr = HttpReq.getRequestWidthResult(url); | ||
| 190 | + System.out.println(); | ||
| 191 | + /* | ||
| 192 | + * Map map = JsonUtil.getMapFromJsonObjStr(jsonArrStr); String | ||
| 193 | + * chatRoomid = (String) map.get("Content-Length"); | ||
| 194 | + */ | ||
| 195 | + return jsonArrStr; | ||
| 196 | + } | ||
| 97 | } | 197 | } |
| 98 | \ No newline at end of file | 198 | \ No newline at end of file |
src/main/java/com/cnlive/mz/live/action/VideoAction.java
0 → 100644
| 1 | +package com.cnlive.mz.live.action; | ||
| 2 | + | ||
| 3 | +import java.util.Date; | ||
| 4 | +import java.util.LinkedHashMap; | ||
| 5 | +import java.util.Map; | ||
| 6 | + | ||
| 7 | +import org.apache.commons.lang3.StringUtils; | ||
| 8 | +import org.smart4j.framework.dao.bean.Pager; | ||
| 9 | +import org.smart4j.framework.ioc.annotation.Inject; | ||
| 10 | +import org.smart4j.framework.mvc.DataContext; | ||
| 11 | +import org.smart4j.framework.mvc.annotation.Action; | ||
| 12 | +import org.smart4j.framework.mvc.annotation.Request; | ||
| 13 | +import org.smart4j.framework.mvc.bean.ApiBean; | ||
| 14 | +import org.smart4j.framework.mvc.bean.Params; | ||
| 15 | +import org.smart4j.framework.mvc.bean.Result; | ||
| 16 | +import org.smart4j.framework.mvc.bean.View; | ||
| 17 | +import org.smart4j.framework.util.CastUtil; | ||
| 18 | + | ||
| 19 | +import com.cnlive.mz.commons.CnliveUtil; | ||
| 20 | +import com.cnlive.mz.live.common.LiveUtils; | ||
| 21 | +import com.cnlive.mz.live.entity.TLive; | ||
| 22 | +import com.cnlive.mz.live.entity.TVideo; | ||
| 23 | +import com.cnlive.mz.live.service.TDispatchServerService; | ||
| 24 | +import com.cnlive.mz.live.service.TLiveService; | ||
| 25 | +import com.cnlive.mz.live.service.TUserService; | ||
| 26 | +import com.cnlive.mz.live.service.TVideoService; | ||
| 27 | + | ||
| 28 | +@Action | ||
| 29 | +public class VideoAction { | ||
| 30 | + @Inject | ||
| 31 | + private TDispatchServerService tDispatchServerService; | ||
| 32 | + @Inject | ||
| 33 | + private TVideoService tVideoService; | ||
| 34 | + @Inject | ||
| 35 | + private TUserService tUserService; | ||
| 36 | + @Inject | ||
| 37 | + private TLiveService tLiveService; | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 服务器定向 | ||
| 41 | + * | ||
| 42 | + * @param params | ||
| 43 | + * @return | ||
| 44 | + * {"mediaComment":"","nickName":"阳Sir","appId":"1","mediaName":"","userId" | ||
| 45 | + * :"1167015","uuid": | ||
| 46 | + * "1167015_1463725085798_6a551f9122494a05ac8566b7a2ae1092"} | ||
| 47 | + */ | ||
| 48 | + @Request.Post("/api/video/redirect") | ||
| 49 | + public ApiBean redirect(Params params) { | ||
| 50 | + String app_access_key = params.getString("app_access_key"); | ||
| 51 | + String video_type = params.getString("video_type"); | ||
| 52 | + String user_id = params.getString("relation_id"); | ||
| 53 | + ApiBean apiBean = tDispatchServerService.redirect(video_type, app_access_key, user_id); | ||
| 54 | + return apiBean; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + @Request.Post("/api/video/supload") | ||
| 58 | + public ApiBean supload(Params params) { | ||
| 59 | + Map data = new LinkedHashMap(); | ||
| 60 | + String app_access_key = params.getString("app_access_key"); | ||
| 61 | + String video_type = params.getString("video_type"); | ||
| 62 | + String user_access_key = params.getString("user_access_key"); | ||
| 63 | + String server_access_key = params.getString("server_access_key"); | ||
| 64 | + String active_id = params.getString("active_id"); | ||
| 65 | + String title = params.getString("title"); | ||
| 66 | + String direct = params.getString("direct"); | ||
| 67 | + String description = params.getString("description"); | ||
| 68 | + String custom_args = params.getString("custom_args"); | ||
| 69 | + String md5 = params.getString("md5"); | ||
| 70 | + String relation_id = params.getString("relation_id"); | ||
| 71 | + String uuid = ""; | ||
| 72 | + if (video_type.equals("2")) { | ||
| 73 | + // 2:sdk上传录播文件 | ||
| 74 | + TVideo tVideo = new TVideo(); | ||
| 75 | + tVideo.setCustom_args(custom_args); | ||
| 76 | + tVideo.setRelation_id(relation_id); | ||
| 77 | + tVideo.setName(params.getString("name")); | ||
| 78 | + tVideo.setVideo_type(params.getString("video_type")); | ||
| 79 | + tVideo.setPlat(params.getString("plat")); | ||
| 80 | + tVideo.setState(207); | ||
| 81 | + tVideo.setMd5(md5); | ||
| 82 | + uuid = CnliveUtil.getUUID(); | ||
| 83 | + tVideo.setVideo_uuid(uuid); | ||
| 84 | + tVideo.setTitle(title); | ||
| 85 | + tVideo.setDescription(description); | ||
| 86 | + tVideoService.saveSdkVideo(tVideo, server_access_key, user_access_key, app_access_key); | ||
| 87 | + } else if (video_type.equals("3")) { | ||
| 88 | + // 3: sdk直播上传文件 | ||
| 89 | + TLive tLive = tLiveService.getTLiveByUUId(active_id); | ||
| 90 | + tLive.setTitle(title); | ||
| 91 | + tLive.setDescription(description); | ||
| 92 | + tLive.setStart_time(new Date()); | ||
| 93 | + tLive.setUser_uuid(params.getString("name")); | ||
| 94 | + tLive.setRelation_id(relation_id); | ||
| 95 | + tLive.setCustom_args(custom_args); | ||
| 96 | + uuid = tLive.getUuid(); | ||
| 97 | + if (StringUtils.isEmpty(direct)) { | ||
| 98 | + tLive.setDirect(0); | ||
| 99 | + } else { | ||
| 100 | + tLive.setDirect(Integer.parseInt(direct)); | ||
| 101 | + } | ||
| 102 | + // tLive.setLive_url("http://cnlive.hlslive.ks-cdn.com/live/" + | ||
| 103 | + // tLive.getT_user_id() + "_" + uuid | ||
| 104 | + // + "/index.m3u8"); | ||
| 105 | + tLive.setLive_url("rtmp://cnlive.rtmplive.ks-cdn.com/live/" + tLive.getT_user_id() + "_" + uuid); | ||
| 106 | + tLiveService.startLive(tLive); | ||
| 107 | + } | ||
| 108 | + data.put("video_uuid", uuid); | ||
| 109 | + ApiBean apiBean = new ApiBean(); | ||
| 110 | + apiBean.setCode(100); | ||
| 111 | + apiBean.setMessage("请求成功"); | ||
| 112 | + apiBean.setData(data); | ||
| 113 | + return apiBean; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + @Request.Post("/api/video/all") | ||
| 117 | + public ApiBean all(Params params) { | ||
| 118 | + String app_access_key = params.getString("app_access_key"); | ||
| 119 | + String relationId = params.getString("relation_id"); | ||
| 120 | + String pageNo = params.getString("page_no"); | ||
| 121 | + String relation_id = params.getString("relation_id"); | ||
| 122 | + String upload_type = params.getString("upload_type"); | ||
| 123 | + // String video_type = params.getString("video_type"); | ||
| 124 | + Pager<TVideo> page = tVideoService.findAll(app_access_key, relationId, pageNo); | ||
| 125 | + ApiBean apiBean = new ApiBean(); | ||
| 126 | + apiBean.setCode(100); | ||
| 127 | + apiBean.setMessage("请求成功"); | ||
| 128 | + apiBean.setData(page); | ||
| 129 | + return apiBean; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + @Request.Get("/video/list/{page_number}") | ||
| 133 | + public View list(int page_number) { | ||
| 134 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | ||
| 135 | + Pager<TVideo> page = tVideoService.list(user_id, page_number, 33); | ||
| 136 | + return new View("live/video_management.jsp").data("videos", page); | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + @Request.Get("/video/check/{page_number}") | ||
| 140 | + public View check(int page_number) { | ||
| 141 | + Pager<TVideo> page = tVideoService.list(page_number, 33); | ||
| 142 | + return new View("live/video_management.jsp").data("videos", page); | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + @Request.Get("/video/pass/{id}") | ||
| 146 | + public Result pass(int id) { | ||
| 147 | + tVideoService.pass(id); | ||
| 148 | + return new Result(true); | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + @Request.Get("/video/view/{id}") | ||
| 152 | + public View view(int id) { | ||
| 153 | + TVideo tVideo = tVideoService.getVideoById(id); | ||
| 154 | + return new View("live/video_view.jsp").data("tVideo", tVideo); | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + @Request.Post("/api/video/one") | ||
| 158 | + public ApiBean one(Params params) { | ||
| 159 | + String app_access_key = params.getString("app_access_key"); | ||
| 160 | + String video_uuid = params.getString("video_uuid"); | ||
| 161 | + TVideo page = tVideoService.getVideoByUuId(video_uuid); | ||
| 162 | + ApiBean apiBean = new ApiBean(); | ||
| 163 | + apiBean.setCode(100); | ||
| 164 | + apiBean.setMessage("请求成功"); | ||
| 165 | + apiBean.setData(page); | ||
| 166 | + return apiBean; | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + @Request.Post("/api/video/uploadNotify") | ||
| 170 | + public ApiBean uploadNotify(Params params) { | ||
| 171 | + String video_uuid = params.getString("video_uuid"); | ||
| 172 | + String upload_type = params.getString("upload_type"); | ||
| 173 | + String video_type = params.getString("video_type"); | ||
| 174 | + String state = params.getString("state"); | ||
| 175 | + if (video_type.equals("2")) { | ||
| 176 | + // 点播通知 | ||
| 177 | + tVideoService.notify(video_uuid); | ||
| 178 | + } else if (video_type.equals("3")) { | ||
| 179 | + // 直播通知 | ||
| 180 | + tLiveService.notify(video_uuid); | ||
| 181 | + } | ||
| 182 | + ApiBean apiBean = new ApiBean(); | ||
| 183 | + apiBean.setCode(100); | ||
| 184 | + apiBean.setMessage("请求成功"); | ||
| 185 | + return apiBean; | ||
| 186 | + } | ||
| 187 | + | ||
| 188 | + @Request.Post("/api/video/delete") | ||
| 189 | + public ApiBean delete(Params params) { | ||
| 190 | + String user_access_key = params.getString("user_access_key"); | ||
| 191 | + String video_uuid = params.getString("video_uuid"); | ||
| 192 | + String app_access_key = params.getString("app_access_key"); | ||
| 193 | + String video_type = params.getString("video_type");// 视频类型 | ||
| 194 | + tVideoService.delete(video_uuid); | ||
| 195 | + ApiBean apiBean = new ApiBean(); | ||
| 196 | + apiBean.setCode(100); | ||
| 197 | + apiBean.setMessage("请求成功"); | ||
| 198 | + return apiBean; | ||
| 199 | + } | ||
| 200 | +} |
src/main/java/com/cnlive/mz/live/action/VideoApiAction.java deleted
100644 → 0
| 1 | -package com.cnlive.mz.live.action; | ||
| 2 | - | ||
| 3 | -import org.smart4j.framework.ioc.annotation.Inject; | ||
| 4 | -import org.smart4j.framework.mvc.annotation.Action; | ||
| 5 | -import org.smart4j.framework.mvc.annotation.Request; | ||
| 6 | -import org.smart4j.framework.mvc.bean.Params; | ||
| 7 | -import org.smart4j.framework.mvc.bean.Result; | ||
| 8 | - | ||
| 9 | -import com.cnlive.mz.live.entity.ResultBean; | ||
| 10 | -import com.cnlive.mz.live.entity.TApp; | ||
| 11 | -import com.cnlive.mz.live.service.AppService; | ||
| 12 | -import com.cnlive.mz.live.service.VideoApiService; | ||
| 13 | - | ||
| 14 | -@Action | ||
| 15 | -public class VideoApiAction { | ||
| 16 | - @Inject | ||
| 17 | - private VideoApiService videoApiService; | ||
| 18 | - @Inject | ||
| 19 | - private AppService appService; | ||
| 20 | - | ||
| 21 | - @Request.Post("com/api/video/redirect") | ||
| 22 | - public Result redirect(Params params) { | ||
| 23 | - String app_access_key = params.getString("app_access_key"); | ||
| 24 | - String video_type = params.getString("video_type"); | ||
| 25 | - TApp app =appService.getAppByAccessKey(app_access_key); | ||
| 26 | - //String ip = getRequest().getRemoteAddr(); | ||
| 27 | - String ip =null; | ||
| 28 | - ResultBean resultBean = new ResultBean(); | ||
| 29 | - resultBean.setCode(100); | ||
| 30 | - resultBean.setMessage("请求成功"); | ||
| 31 | - resultBean.setData(videoApiService.getDispatchServer(app,ip, video_type, app_access_key)); | ||
| 32 | - Result result= new Result(true); | ||
| 33 | - return result.data(resultBean); | ||
| 34 | - } | ||
| 35 | - @Request.Post("com/api/video/all") | ||
| 36 | - public Result all(Params params){ | ||
| 37 | - String app_access_key =params.getString("app_access_key"); | ||
| 38 | - String relationId = params.getString("relation_id"); | ||
| 39 | - String pageNo = params.getString("page_no"); | ||
| 40 | - ResultBean resultBean = new ResultBean(); | ||
| 41 | - resultBean.setCode(100); | ||
| 42 | - resultBean.setMessage("请求成功"); | ||
| 43 | - resultBean.setData(videoApiService.findAll(app_access_key, relationId, pageNo)); | ||
| 44 | - Result result= new Result(true); | ||
| 45 | - return result.data(resultBean); | ||
| 46 | - } | ||
| 47 | - /*@Request.Post("com/api/video/uploadNotify") | ||
| 48 | - public Result uploadNotify(Params params){ | ||
| 49 | - String video_uuid = params.getString("video_uuid"); | ||
| 50 | - System.out.println("video_uuid:" + video_uuid); | ||
| 51 | - String upload_type = params.getString("upload_type"); | ||
| 52 | - int video_type = params.getInt("video_type"); | ||
| 53 | - String state = params.getString("state"); | ||
| 54 | - videoApiService.notify(video_uuid, upload_type, video_type, state); | ||
| 55 | - Result result= new Result(true); | ||
| 56 | - return result.data(new ResultBean(100, "请求成功", null)); | ||
| 57 | - }*/ | ||
| 58 | - public static void main(String[] args) { | ||
| 59 | - | ||
| 60 | - } | ||
| 61 | -} |
src/main/java/com/cnlive/mz/live/rest/BaseUtil.java
| @@ -28,9 +28,14 @@ import sun.misc.BASE64Encoder; | @@ -28,9 +28,14 @@ import sun.misc.BASE64Encoder; | ||
| 28 | public class BaseUtil { | 28 | public class BaseUtil { |
| 29 | 29 | ||
| 30 | private static final String ENCODING = "UTF-8"; | 30 | private static final String ENCODING = "UTF-8"; |
| 31 | +<<<<<<< HEAD | ||
| 31 | // AccessKey、SecretKey | 32 | // AccessKey、SecretKey |
| 32 | private static final String SECRET_KEY = "iqljE4WxQaSMeSd1QP+PPYSpvtK0uWyH0/r6tgi7"; | 33 | private static final String SECRET_KEY = "iqljE4WxQaSMeSd1QP+PPYSpvtK0uWyH0/r6tgi7"; |
| 33 | private static final String ACCESS_KEY = "I3TC8a4xboN9kSJnUIQh"; | 34 | private static final String ACCESS_KEY = "I3TC8a4xboN9kSJnUIQh"; |
| 35 | +======= | ||
| 36 | + private static final String AK_SECRET = "7SxVU5lFpqCEQIqxLprQat9BWoyZNKlKfSScTuIk"; | ||
| 37 | + private static final String AK_ID = "I3TC8a4xboPUMe5xlp22"; | ||
| 38 | +>>>>>>> 180640a4e451ae2b82ae745eb6b1d1651dc5f17f | ||
| 34 | 39 | ||
| 35 | /* | 40 | /* |
| 36 | * 计算MD5+BASE64 | 41 | * 计算MD5+BASE64 |
| @@ -63,7 +68,9 @@ public class BaseUtil { | @@ -63,7 +68,9 @@ public class BaseUtil { | ||
| 63 | Mac mac = Mac.getInstance("HmacSHA1"); | 68 | Mac mac = Mac.getInstance("HmacSHA1"); |
| 64 | mac.init(signingKey); | 69 | mac.init(signingKey); |
| 65 | byte[] rawHmac = mac.doFinal(data.getBytes()); | 70 | byte[] rawHmac = mac.doFinal(data.getBytes()); |
| 66 | - result = new String(Base64.encodeBase64(rawHmac), ENCODING); | 71 | + //result = new String(Base64.encodeBase64(rawHmac, false), ENCODING); |
| 72 | + //result = (new BASE64Encoder()).encode(rawHmac); | ||
| 73 | + result = new String(Base64.encodeBase64(rawHmac),ENCODING); | ||
| 67 | } catch (Exception e) { | 74 | } catch (Exception e) { |
| 68 | throw new Error("Failed to generate HMAC : " + e.getMessage()); | 75 | throw new Error("Failed to generate HMAC : " + e.getMessage()); |
| 69 | } | 76 | } |
| @@ -72,39 +79,48 @@ public class BaseUtil { | @@ -72,39 +79,48 @@ public class BaseUtil { | ||
| 72 | 79 | ||
| 73 | /** | 80 | /** |
| 74 | * 获取当前时间戳 | 81 | * 获取当前时间戳 |
| 75 | - * | ||
| 76 | * @return | 82 | * @return |
| 77 | */ | 83 | */ |
| 78 | - public static String getTimestamp() { | 84 | + public static String getTimestamp(){ |
| 79 | DateFormat df = new SimpleDateFormat("yyyyMMdd"); | 85 | DateFormat df = new SimpleDateFormat("yyyyMMdd"); |
| 80 | Date date = null; | 86 | Date date = null; |
| 81 | try { | 87 | try { |
| 82 | - Calendar calendar = Calendar.getInstance(); | ||
| 83 | - calendar.add(Calendar.DATE, +1); | ||
| 84 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHH"); | ||
| 85 | - String motoday = sdf.format(calendar.getTime()); | ||
| 86 | - date = df.parse(motoday); | 88 | + date = df.parse("20160607"); |
| 87 | } catch (ParseException e) { | 89 | } catch (ParseException e) { |
| 88 | e.printStackTrace(); | 90 | e.printStackTrace(); |
| 89 | } | 91 | } |
| 90 | Calendar cal = Calendar.getInstance(); | 92 | Calendar cal = Calendar.getInstance(); |
| 91 | cal.setTime(date); | 93 | cal.setTime(date); |
| 92 | long timestamp = cal.getTimeInMillis(); | 94 | long timestamp = cal.getTimeInMillis(); |
| 95 | +<<<<<<< HEAD | ||
| 93 | System.out.println("------timestamp-----"+timestamp); | 96 | System.out.println("------timestamp-----"+timestamp); |
| 94 | //return String.valueOf(timestamp).substring(0, 10); | 97 | //return String.valueOf(timestamp).substring(0, 10); |
| 95 | return "1483200000"; | 98 | return "1483200000"; |
| 99 | +======= | ||
| 100 | + Calendar calendar = Calendar.getInstance(); | ||
| 101 | + calendar.add(Calendar.DATE,+1); | ||
| 102 | + SimpleDateFormat sdf = new SimpleDateFormat("MMddHHmmss"); | ||
| 103 | + String motoday = sdf.format(calendar.getTime()); | ||
| 104 | + //Timestamp ts = new Timestamp(System.currentTimeMillis()); | ||
| 105 | + long currentTime=Calendar.getInstance().getTimeInMillis(); | ||
| 106 | + // System.out.println(ts+"---..ts..----"); | ||
| 107 | + // Date date = new Date(); | ||
| 108 | + // SimpleDateFormat sd = new SimpleDateFormat("MMddHHmmss"); | ||
| 109 | + // String ss = sd.format(date); | ||
| 110 | + return String.valueOf(timestamp); | ||
| 111 | + //return motoday; | ||
| 112 | +>>>>>>> 180640a4e451ae2b82ae745eb6b1d1651dc5f17f | ||
| 96 | } | 113 | } |
| 97 | - | ||
| 98 | /** | 114 | /** |
| 99 | - * 签名算法:signature 字符串格式,由三部分组成:GET+”\n”+Expire+”\n”+Resource | 115 | + * 签名算法:signature 字符串格式,由三部分组成:GET+”\n”+Expire+”\n”+Resource |
| 100 | * 2016 0602171212 | 116 | * 2016 0602171212 |
| 101 | - * | ||
| 102 | * @return | 117 | * @return |
| 103 | - * @throws UnsupportedEncodingException | 118 | + * @throws UnsupportedEncodingException |
| 104 | */ | 119 | */ |
| 105 | public static String signature(String streamName) throws UnsupportedEncodingException { | 120 | public static String signature(String streamName) throws UnsupportedEncodingException { |
| 106 | - | 121 | + |
| 107 | String method = "GET"; | 122 | String method = "GET"; |
| 123 | +<<<<<<< HEAD | ||
| 108 | String expire = BaseUtil.getTimestamp(); | 124 | String expire = BaseUtil.getTimestamp(); |
| 109 | String app = "live"; | 125 | String app = "live"; |
| 110 | String methodadd = "add"; | 126 | String methodadd = "add"; |
| @@ -121,10 +137,22 @@ public class BaseUtil { | @@ -121,10 +137,22 @@ public class BaseUtil { | ||
| 121 | String signature = HMACSha1(stringToSign, SECRET_KEY); | 137 | String signature = HMACSha1(stringToSign, SECRET_KEY); |
| 122 | System.out.println( "---signature---"+signature ); | 138 | System.out.println( "---signature---"+signature ); |
| 123 | signature = java.net.URLEncoder.encode(signature, "utf-8"); | 139 | signature = java.net.URLEncoder.encode(signature, "utf-8"); |
| 140 | +======= | ||
| 141 | + String Expire = String.valueOf(BaseUtil.getTimestamp()).substring(0, 10); | ||
| 142 | + System.out.println(Expire+"---expire----"); | ||
| 143 | + String Resource = "app=live&method=add&nonce=cnlive&public=0&vdoid=12345&stream="+streamName; | ||
| 144 | + Resource = java.net.URLEncoder.encode(Resource,"utf-8"); | ||
| 145 | + String stringToSign = method + "\n" + Expire + "\n" + Resource; | ||
| 146 | + // 2.计算 HMAC-SHA1 | ||
| 147 | + String signature = HMACSha1(stringToSign, AK_SECRET); | ||
| 148 | + System.out.println(signature+"------"); | ||
| 149 | + signature =java.net.URLEncoder.encode(signature,"utf-8"); | ||
| 150 | +>>>>>>> 180640a4e451ae2b82ae745eb6b1d1651dc5f17f | ||
| 124 | return signature; | 151 | return signature; |
| 125 | } | 152 | } |
| 126 | public static String signature(String methodNname,String streamName) throws UnsupportedEncodingException { | 153 | public static String signature(String methodNname,String streamName) throws UnsupportedEncodingException { |
| 127 | 154 | ||
| 155 | +<<<<<<< HEAD | ||
| 128 | String method = "GET"; | 156 | String method = "GET"; |
| 129 | String expire = BaseUtil.getTimestamp(); | 157 | String expire = BaseUtil.getTimestamp(); |
| 130 | String app = "live"; | 158 | String app = "live"; |
| @@ -146,6 +174,9 @@ public class BaseUtil { | @@ -146,6 +174,9 @@ public class BaseUtil { | ||
| 146 | } | 174 | } |
| 147 | 175 | ||
| 148 | public static String getUUid() { | 176 | public static String getUUid() { |
| 177 | +======= | ||
| 178 | + public static String UUid() { | ||
| 179 | +>>>>>>> 180640a4e451ae2b82ae745eb6b1d1651dc5f17f | ||
| 149 | String uuid = UUID.randomUUID().toString(); | 180 | String uuid = UUID.randomUUID().toString(); |
| 150 | uuid = uuid.replaceAll("-", ""); | 181 | uuid = uuid.replaceAll("-", ""); |
| 151 | return uuid; | 182 | return uuid; |
| @@ -180,6 +211,7 @@ public class BaseUtil { | @@ -180,6 +211,7 @@ public class BaseUtil { | ||
| 180 | String result = ""; | 211 | String result = ""; |
| 181 | try { | 212 | try { |
| 182 | URL realUrl = new URL(url); | 213 | URL realUrl = new URL(url); |
| 214 | + | ||
| 183 | /* | 215 | /* |
| 184 | * http header 参数 | 216 | * http header 参数 |
| 185 | */ | 217 | */ |
| @@ -315,6 +347,7 @@ public class BaseUtil { | @@ -315,6 +347,7 @@ public class BaseUtil { | ||
| 315 | String hhhh = MD5Base64(hh); | 347 | String hhhh = MD5Base64(hh); |
| 316 | System.out.println(hh); | 348 | System.out.println(hh); |
| 317 | System.out.println(".............."); | 349 | System.out.println(".............."); |
| 350 | +<<<<<<< HEAD | ||
| 318 | // String str = signature(); | 351 | // String str = signature(); |
| 319 | // System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | 352 | // System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= |
| 320 | 353 | ||
| @@ -324,5 +357,16 @@ public class BaseUtil { | @@ -324,5 +357,16 @@ public class BaseUtil { | ||
| 324 | 357 | ||
| 325 | // long d = getTimestamp(); | 358 | // long d = getTimestamp(); |
| 326 | // System.out.println(d); | 359 | // System.out.println(d); |
| 360 | +======= | ||
| 361 | + //String str = signature(); | ||
| 362 | + //System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | ||
| 363 | + /*// 发送GET请求 | ||
| 364 | + String ak_id1 = "fWUN8KDtJZJGo0ArQ4qo"; //用户ak | ||
| 365 | + String ak_secret1 = "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // 用户ak_secret | ||
| 366 | + String url1 = "http://cnlive.uplive.ks-cdn.com?signature=L2muBoImPzyvwyzfBtGXEu+wRNE=&accesskey=fWUN8KDtJZJGo0ArQ4qo&expire=1436976000&method=add&app=live&name=498122_57"; | ||
| 367 | + System.out.println("response body:" +sendGet(url1, ak_id1, ak_secret1));*/ | ||
| 368 | + //long d = getTimestamp(); | ||
| 369 | + //System.out.println(d); | ||
| 370 | +>>>>>>> 180640a4e451ae2b82ae745eb6b1d1651dc5f17f | ||
| 327 | } | 371 | } |
| 328 | } | 372 | } |
src/main/resources/logging.properties
0 → 100644
| 1 | +handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler | ||
| 2 | + | ||
| 3 | +############################################################ | ||
| 4 | +# Handler specific properties. | ||
| 5 | +# Describes specific configuration info for Handlers. | ||
| 6 | +############################################################ | ||
| 7 | + | ||
| 8 | +org.apache.juli.FileHandler.level = FINE | ||
| 9 | +org.apache.juli.FileHandler.directory = ${catalina.base}/logs | ||
| 10 | +org.apache.juli.FileHandler.prefix = error-debug. | ||
| 11 | + | ||
| 12 | +java.util.logging.ConsoleHandler.level = FINE | ||
| 13 | +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter | ||
| 0 | \ No newline at end of file | 14 | \ No newline at end of file |
src/main/webapp/WEB-INF/web.xml
| @@ -3,5 +3,13 @@ | @@ -3,5 +3,13 @@ | ||
| 3 | xmlns="http://java.sun.com/xml/ns/javaee" | 3 | xmlns="http://java.sun.com/xml/ns/javaee" |
| 4 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | 4 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" |
| 5 | version="3.0"> | 5 | version="3.0"> |
| 6 | - | 6 | + <servlet> |
| 7 | + <servlet-name>init_job</servlet-name> | ||
| 8 | + <servlet-class>com.cnlive.mz.live.action.Init</servlet-class> | ||
| 9 | + <init-param> | ||
| 10 | + <param-name>shutdown-on-unload</param-name> | ||
| 11 | + <param-value>true</param-value> | ||
| 12 | + </init-param> | ||
| 13 | + <load-on-startup>2</load-on-startup> | ||
| 14 | + </servlet> | ||
| 7 | </web-app> | 15 | </web-app> |
| 8 | \ No newline at end of file | 16 | \ No newline at end of file |
src/main/webapp/crossdomain.xml
0 → 100644
src/main/webapp/pages/check/check_management.jsp
src/main/webapp/pages/check/ckplayer/ckplayer.swf deleted
100644 → 0
No preview for this file type
src/main/webapp/pages/check/monitor.jsp
0 → 100644
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>监审管理 |<f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<script src="${BASE}/static/assets/cnlive/js/check.js"></script> | ||
| 13 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | ||
| 14 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | ||
| 15 | +<script type="text/javascript">jwplayer.key="MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA==";</script> | ||
| 16 | + | ||
| 17 | +</head> | ||
| 18 | +<body class="skin-blue sidebar-collapse sidebar-mini"> | ||
| 19 | + <div class="wrapper"> | ||
| 20 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 21 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 22 | + <!-- Content Wrapper. Contains page content --> | ||
| 23 | + <div class="content-wrapper"> | ||
| 24 | + <!-- Content Header (Page header) --> | ||
| 25 | + <section class="content-header"> | ||
| 26 | + <h1> | ||
| 27 | + 监审管理 <small>monitor panel</small> | ||
| 28 | + </h1> | ||
| 29 | + <ol class="breadcrumb"> | ||
| 30 | + <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 31 | + <li class="active">监审管理</li> | ||
| 32 | + </ol> | ||
| 33 | + </section> | ||
| 34 | + <section class="content"> | ||
| 35 | + <div class="row"> | ||
| 36 | + <div class="col-md-4"> | ||
| 37 | + <div class="box box-solid"> | ||
| 38 | + <div class="box-header with-border"> | ||
| 39 | + <h3 class="box-title">监控平台</h3> | ||
| 40 | + </div> | ||
| 41 | + <div class="box-body no-padding"> | ||
| 42 | + <div class="col-md-12" id="divShow_${item.id}"> | ||
| 43 | + <div class="box box-success box-solid"> | ||
| 44 | + <div class="box-header with-border"> | ||
| 45 | + <h3 class="box-title">${item.title}</h3> | ||
| 46 | + <div class="box-tools pull-right"> | ||
| 47 | + <button class="btn btn-sm" id="play_button_${item.id}" | ||
| 48 | + onclick="play(${item.id});">重新载入</button> | ||
| 49 | + </div> | ||
| 50 | + </div> | ||
| 51 | + <div class="box-body"> | ||
| 52 | + <input type="hidden" name="play_url_${item.id}" | ||
| 53 | + id="play_url_${item.id}" value="${item.live_url}" /> <span | ||
| 54 | + class="mailbox-attachment-icon has-img" | ||
| 55 | + id="player_span_${item.id}"> <img | ||
| 56 | + src="../../static/assets/dist/img/photo2.png" | ||
| 57 | + alt="Attachment"> | ||
| 58 | + </span> | ||
| 59 | + </div> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + <div class="box-header with-border"> | ||
| 65 | + <h3 class="box-title">直播信息:</h3> | ||
| 66 | + </div> | ||
| 67 | + <div class="box-body no-padding"> | ||
| 68 | + <ul class="nav nav-pills nav-stacked"> | ||
| 69 | + <li><a><i class="fa fa-file-text-o"></i>用户ID:</a></li> | ||
| 70 | + <li><a><i class="fa fa-file-text-o"></i>TITLE: </a></li> | ||
| 71 | + <li><a><i class="fa fa-file-text-o"></i>开播时间: </a></li> | ||
| 72 | + </ul> | ||
| 73 | + </div> | ||
| 74 | + </div> | ||
| 75 | + <div class="col-md-8"> | ||
| 76 | + <div class="box box-primary"> | ||
| 77 | + <div class="box-header with-border"> | ||
| 78 | + <h3 class="box-title">监控</h3> | ||
| 79 | + <tag:pager id="product_pager" pager="${tLive}" /> | ||
| 80 | + </div> | ||
| 81 | + <div class="box-body no-padding"> | ||
| 82 | + <div class="row"> | ||
| 83 | + <c:forEach var="item" items="${tLive.recordList}" | ||
| 84 | + varStatus="stat"> | ||
| 85 | + <div class="col-md-3" id="divShow_${item.id}"> | ||
| 86 | + <div | ||
| 87 | + class="box ${item.check_sort eq null ? 'box-warning':'box-success'} box-solid"> | ||
| 88 | + <div class="box-header with-border"> | ||
| 89 | + <h3 class="box-title">${item.title}</h3> | ||
| 90 | + <div class="box-tools pull-right"> | ||
| 91 | + <button class="btn btn-sm btn-danger" | ||
| 92 | + onclick="to_pass(${item.id});">过</button> | ||
| 93 | + <button class="btn btn-sm btn-danger" | ||
| 94 | + onclick="to_top(${item.id});">顶</button> | ||
| 95 | + <button class="btn btn-sm btn-danger" | ||
| 96 | + onclick="play(${item.id});">断</button> | ||
| 97 | + </div> | ||
| 98 | + </div> | ||
| 99 | + <div class="box-body"> | ||
| 100 | + <input type="hidden" name="play_url_${item.id}" | ||
| 101 | + id="play_url_${item.id}" value="${item.live_url}" /> <span | ||
| 102 | + class="mailbox-attachment-icon has-img" | ||
| 103 | + id="player_span_${item.id}"> <img | ||
| 104 | + src="../../static/assets/dist/img/photo2.png" | ||
| 105 | + alt="Attachment"> | ||
| 106 | + </span> | ||
| 107 | + </div> | ||
| 108 | + </div> | ||
| 109 | + </div> | ||
| 110 | + </c:forEach> | ||
| 111 | + </div> | ||
| 112 | + </div> | ||
| 113 | + </div> | ||
| 114 | + </div> | ||
| 115 | + </div> | ||
| 116 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 117 | + <script src="${BASE}/static/assets/cnlive/js/player_m3u8.js"></script> | ||
| 118 | + </section> | ||
| 119 | + </div> | ||
| 120 | + </div> | ||
| 121 | +</body> | ||
| 122 | +</html> | ||
| 0 | \ No newline at end of file | 123 | \ No newline at end of file |
src/main/webapp/pages/common/left.jsp
| @@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
| 14 | <i class="fa fa-circle text-success"></i> | 14 | <i class="fa fa-circle text-success"></i> |
| 15 | <c:if test="${sessionScope.roleId=='1'}">超级管理员</c:if> | 15 | <c:if test="${sessionScope.roleId=='1'}">超级管理员</c:if> |
| 16 | <c:if test="${sessionScope.roleId=='0'}">普通用户</c:if> | 16 | <c:if test="${sessionScope.roleId=='0'}">普通用户</c:if> |
| 17 | + <c:if test="${sessionScope.roleId=='2'}">总编室用户</c:if> | ||
| 17 | </div> | 18 | </div> |
| 18 | </div> | 19 | </div> |
| 19 | <ul class="sidebar-menu"> | 20 | <ul class="sidebar-menu"> |
| @@ -41,14 +42,22 @@ | @@ -41,14 +42,22 @@ | ||
| 41 | <li> | 42 | <li> |
| 42 | <a href="${BASE}/signal/list/1"><i class="fa fa-circle-o text-red"></i>信源管理</a> | 43 | <a href="${BASE}/signal/list/1"><i class="fa fa-circle-o text-red"></i>信源管理</a> |
| 43 | </li> | 44 | </li> |
| 44 | - | ||
| 45 | - <!-- 主播 --> | ||
| 46 | - <li class="header">系统设置</li> | 45 | + <!-- 主播 --> |
| 46 | + <li class="header">UGC直播</li> | ||
| 47 | <li> | 47 | <li> |
| 48 | <a href="${BASE}/room/list/1"><i class="fa fa-circle-o text-yellow"></i>直播间管理</a> | 48 | <a href="${BASE}/room/list/1"><i class="fa fa-circle-o text-yellow"></i>直播间管理</a> |
| 49 | </li> | 49 | </li> |
| 50 | <li> | 50 | <li> |
| 51 | - <a href="${BASE}/live/list/1"><i class="fa fa-circle-o text-yellow"></i>直播活动</a> | 51 | + <a href="${BASE}/live/list/1"><i class="fa fa-circle-o text-yellow"></i>直播活动管理</a> |
| 52 | + </li> | ||
| 53 | + <li> | ||
| 54 | + <a href="${BASE}/video/list/1"><i class="fa fa-circle-o text-yellow"></i>直播录制管理</a> | ||
| 55 | + </li> | ||
| 56 | + <li> | ||
| 57 | + <a href="${BASE}/check/list/1"><i class="fa fa-circle-o text-yellow"></i>直播审查</a> | ||
| 58 | + </li> | ||
| 59 | + <li> | ||
| 60 | + <a href="${BASE}/video/check/1"><i class="fa fa-circle-o text-yellow"></i>点播审查</a> | ||
| 52 | </li> | 61 | </li> |
| 53 | </c:if> | 62 | </c:if> |
| 54 | <c:if test="${sessionScope.roleId=='0'}"> | 63 | <c:if test="${sessionScope.roleId=='0'}"> |
| @@ -67,6 +76,13 @@ | @@ -67,6 +76,13 @@ | ||
| 67 | <a href="${BASE}/channel/list/1"><i class="fa fa-circle-o text-green"></i>频道管理</a> | 76 | <a href="${BASE}/channel/list/1"><i class="fa fa-circle-o text-green"></i>频道管理</a> |
| 68 | </li> | 77 | </li> |
| 69 | </c:if> | 78 | </c:if> |
| 79 | + <c:if test="${sessionScope.roleId=='2'}"> | ||
| 80 | + <!-- 主播 --> | ||
| 81 | + <li class="header">UGC直播</li> | ||
| 82 | + <li> | ||
| 83 | + <a href="${BASE}/check/list/1"><i class="fa fa-circle-o text-yellow"></i>直播审查</a> | ||
| 84 | + </li> | ||
| 85 | + </c:if> | ||
| 70 | </ul> | 86 | </ul> |
| 71 | </section> | 87 | </section> |
| 72 | <!-- /.sidebar --> | 88 | <!-- /.sidebar --> |
src/main/webapp/pages/live/live_add.jsp
| @@ -42,7 +42,11 @@ | @@ -42,7 +42,11 @@ | ||
| 42 | </section> | 42 | </section> |
| 43 | <!-- Main content --> | 43 | <!-- Main content --> |
| 44 | <section class="content"> | 44 | <section class="content"> |
| 45 | +<<<<<<< .merge_file_a05572 | ||
| 45 | <form id="create_form" enctype="multipart/form-data" method="post" > | 46 | <form id="create_form" enctype="multipart/form-data" method="post" > |
| 47 | +======= | ||
| 48 | + <form id="create_form" enctype="multipart/form-data" method="post"> | ||
| 49 | +>>>>>>> .merge_file_a05280 | ||
| 46 | <div class="row"> | 50 | <div class="row"> |
| 47 | <!-- right column --> | 51 | <!-- right column --> |
| 48 | <div class="col-md-12"> | 52 | <div class="col-md-12"> |
| @@ -82,10 +86,17 @@ | @@ -82,10 +86,17 @@ | ||
| 82 | </div> | 86 | </div> |
| 83 | </div> | 87 | </div> |
| 84 | <div class="form-group"> | 88 | <div class="form-group"> |
| 89 | +<<<<<<< .merge_file_a05572 | ||
| 85 | <label>海报 </label> | 90 | <label>海报 </label> |
| 86 | <div class="input-group"> | 91 | <div class="input-group"> |
| 87 | <span class="input-group-addon"><i | 92 | <span class="input-group-addon"><i |
| 88 | class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" name="input-22" accept="image/*" class="file-loading"> | 93 | class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" name="input-22" accept="image/*" class="file-loading"> |
| 94 | +======= | ||
| 95 | + <label>封面海报 </label> | ||
| 96 | + <div class="input-group"> | ||
| 97 | + <span class="input-group-addon"><i | ||
| 98 | + class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" name="input-22" accept="image/*" class="file-loading"> | ||
| 99 | +>>>>>>> .merge_file_a05280 | ||
| 89 | </div> | 100 | </div> |
| 90 | </div> | 101 | </div> |
| 91 | <div class="form-group"> | 102 | <div class="form-group"> |
| @@ -93,8 +104,13 @@ | @@ -93,8 +104,13 @@ | ||
| 93 | <div class="box box-warning"> | 104 | <div class="box box-warning"> |
| 94 | <div class="box-body"> | 105 | <div class="box-body"> |
| 95 | <div class="form-group"> | 106 | <div class="form-group"> |
| 107 | +<<<<<<< .merge_file_a05572 | ||
| 96 | <select class="form-control" name="live_room_id" | 108 | <select class="form-control" name="live_room_id" |
| 97 | id="live_room_id"> | 109 | id="live_room_id"> |
| 110 | +======= | ||
| 111 | + <select class="form-control" name="t_default_video_id" | ||
| 112 | + id="t_default_video_id"> | ||
| 113 | +>>>>>>> .merge_file_a05280 | ||
| 98 | <c:forEach var="item" items="${tRooms}" | 114 | <c:forEach var="item" items="${tRooms}" |
| 99 | varStatus="stat"> | 115 | varStatus="stat"> |
| 100 | <option id="t_room_id_${item.id}" ${item.id==tLive.t_room_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option> | 116 | <option id="t_room_id_${item.id}" ${item.id==tLive.t_room_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option> |
| @@ -106,7 +122,11 @@ | @@ -106,7 +122,11 @@ | ||
| 106 | </div> | 122 | </div> |
| 107 | 123 | ||
| 108 | <div class="form-group"> | 124 | <div class="form-group"> |
| 125 | +<<<<<<< .merge_file_a05572 | ||
| 109 | <label>活动简述 </label> | 126 | <label>活动简述 </label> |
| 127 | +======= | ||
| 128 | + <label>活动简介 </label> | ||
| 129 | +>>>>>>> .merge_file_a05280 | ||
| 110 | <div class="input-group"> | 130 | <div class="input-group"> |
| 111 | <span class="input-group-addon"><i | 131 | <span class="input-group-addon"><i |
| 112 | class="fa fa-file-word-o"></i> </span> <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script> | 132 | class="fa fa-file-word-o"></i> </span> <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script> |
src/main/webapp/pages/live/video_management.jsp
0 → 100644
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>直播录制管理 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +</head> | ||
| 13 | +<body class="skin-blue fixed "> | ||
| 14 | + <div class="wrapper"> | ||
| 15 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 16 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 17 | + <div class="content-wrapper"> | ||
| 18 | + <!-- Content Header (Page header) --> | ||
| 19 | + <section class="content-header"> | ||
| 20 | + <h1> | ||
| 21 | + 直播录制管理 <small class="label label-warning" style="display: none" | ||
| 22 | + id="info_tab_span"><i class="fa fa-bell-o"></i></small> | ||
| 23 | + </h1> | ||
| 24 | + | ||
| 25 | + <ol class="breadcrumb"> | ||
| 26 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 27 | + <li class="active">活动管理</li> | ||
| 28 | + </ol> | ||
| 29 | + </section> | ||
| 30 | + <!-- Main content --> | ||
| 31 | + <section class="content"> | ||
| 32 | + <div class="row"> | ||
| 33 | + <div class="col-xs-12"> | ||
| 34 | + <div class="box box-warning"> | ||
| 35 | + <div class="box-header with-border"></div> | ||
| 36 | + <div class="box-body"> | ||
| 37 | + <table class="table table-bordered"> | ||
| 38 | + <tr> | ||
| 39 | + <th>名称</th> | ||
| 40 | + <th>状态</th> | ||
| 41 | + <th>修改</th> | ||
| 42 | + <th>删除</th> | ||
| 43 | + </tr> | ||
| 44 | + <c:forEach var="item" items="${videos.recordList}" | ||
| 45 | + varStatus="stat"> | ||
| 46 | + <tr> | ||
| 47 | + <td><a href="${BASE}/video/view/${item.id}">${item.title}</a> | ||
| 48 | + </td> | ||
| 49 | + <td><c:if test="${item.state==0}"> | ||
| 50 | + <span class="badge bg-green">未开始</span> | ||
| 51 | + </c:if> <c:if test="${item.state==1}"> | ||
| 52 | + <span class="badge bg-red">直播中</span> | ||
| 53 | + </c:if> <c:if test="${item.state==2}"> | ||
| 54 | + <span class="badge">直播结束</span> | ||
| 55 | + </c:if> <c:if test="${item.state==3}"> | ||
| 56 | + <span class="badge">回放同步中</span> | ||
| 57 | + </c:if> <c:if test="${item.state==4}"> | ||
| 58 | + <span class="badge">同步完成</span> | ||
| 59 | + </c:if></td> | ||
| 60 | + <td> | ||
| 61 | + <button class="btn btn-default btn-sm" | ||
| 62 | + onclick="t_live_edit(${item.id});"> | ||
| 63 | + <i class="fa fa-edit"></i> | ||
| 64 | + </button> | ||
| 65 | + </td> | ||
| 66 | + <td> | ||
| 67 | + <button class="btn btn-danger btn-sm" | ||
| 68 | + onclick="t_live_delete(${item.id});"> | ||
| 69 | + <i class="fa fa-close"></i> | ||
| 70 | + </button> | ||
| 71 | + </td> | ||
| 72 | + </tr> | ||
| 73 | + </c:forEach> | ||
| 74 | + </table> | ||
| 75 | + </div> | ||
| 76 | + <!-- /.box-body --> | ||
| 77 | + <div class="box-footer clearfix"> | ||
| 78 | + <center> | ||
| 79 | + <tag:pager id="product_pager" pager="${tLive}" /> | ||
| 80 | + </center> | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + </div> | ||
| 84 | + </div> | ||
| 85 | + </div> | ||
| 86 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 87 | + </div> | ||
| 88 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 89 | +</body> | ||
| 90 | +</html> |
src/main/webapp/pages/live/video_view.jsp
0 → 100644
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | ||
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | ||
| 3 | +<!DOCTYPE html> | ||
| 4 | +<html> | ||
| 5 | +<head> | ||
| 6 | +<meta charset="UTF-8"> | ||
| 7 | +<title>点播详情 | <f:message key="common.title" /></title> | ||
| 8 | +<meta | ||
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | ||
| 10 | + name='viewport'> | ||
| 11 | +<%@ include file="/pages/common/css.jsp"%> | ||
| 12 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | ||
| 13 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | ||
| 14 | +<script type="text/javascript"> | ||
| 15 | + jwplayer.key = "MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA=="; | ||
| 16 | +</script> | ||
| 17 | +</head> | ||
| 18 | +<body class="skin-blue fixed "> | ||
| 19 | + <div class="wrapper"> | ||
| 20 | + <%@ include file="/pages/common/top.jsp"%> | ||
| 21 | + <%@ include file="/pages/common/left.jsp"%> | ||
| 22 | + <div class="content-wrapper"> | ||
| 23 | + <!-- Content Header (Page header) --> | ||
| 24 | + <section class="content-header"> | ||
| 25 | + <h1> | ||
| 26 | + 点播详情 <small>${tVideo.title}</small> | ||
| 27 | + </h1> | ||
| 28 | + <ol class="breadcrumb"> | ||
| 29 | + <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li> | ||
| 30 | + <li><a href="#">点播详情</a></li> | ||
| 31 | + </ol> | ||
| 32 | + </section> | ||
| 33 | + <section class="content"> | ||
| 34 | + <div class="row"> | ||
| 35 | + <div class="col-md-12"> | ||
| 36 | + <div class="timeline-item"> | ||
| 37 | + <div class="timeline-body"> | ||
| 38 | + <div class="row"> | ||
| 39 | + <div class="col-md-12"> | ||
| 40 | + <div class="box box-danger"> | ||
| 41 | + <div class="box-body"> | ||
| 42 | + <table class="table table-bordered"> | ||
| 43 | + <tr> | ||
| 44 | + <td colspan="3" align='center'><h2>${tVideo.title}</h2></td> | ||
| 45 | + </tr> | ||
| 46 | + <tr> | ||
| 47 | + <td>Name:</td> | ||
| 48 | + <td colspan="3">${tVideo.name}</td> | ||
| 49 | + </tr> | ||
| 50 | + <tr> | ||
| 51 | + <td>地点:</td> | ||
| 52 | + <td colspan="3">${tActivity.place}</td> | ||
| 53 | + </tr> | ||
| 54 | + <tr> | ||
| 55 | + <td>简介:</td> | ||
| 56 | + <td colspan="3">${tActivity.description}</td> | ||
| 57 | + </tr> | ||
| 58 | + </table> | ||
| 59 | + </div> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + </div> | ||
| 65 | + <%@ include file="/pages/common/bottom.jsp"%> | ||
| 66 | + </div> | ||
| 67 | + <%@ include file="/pages/common/js.jsp"%> | ||
| 68 | + <script src="${BASE}/static/assets/cnlive/js/player_6.js"></script> | ||
| 69 | + </div> | ||
| 70 | + </section> | ||
| 71 | + </div> | ||
| 72 | + </div> | ||
| 73 | +</body> | ||
| 74 | +</html> |
src/main/webapp/pages/check/ckplayer/ckplayer.js renamed to src/main/webapp/static/assets/ckplayer/ckplayer.js
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | ------------------------------------------------------------------------- | 2 | ------------------------------------------------------------------------- |
| 3 | 说明: | 3 | 说明: |
| 4 | 正式使用时可以把该文件的注释全部去掉,节省加载时间 | 4 | 正式使用时可以把该文件的注释全部去掉,节省加载时间 |
| 5 | - ckplayer6.7,有问题请访问http://www.ckplayer.com | 5 | + ckplayer6.8,有问题请访问http://www.ckplayer.com |
| 6 | 请注意,该文件为UTF-8编码,不需要改变编码即可使用于各种编码形式的网站内 | 6 | 请注意,该文件为UTF-8编码,不需要改变编码即可使用于各种编码形式的网站内 |
| 7 | ------------------------------------------------------------------------- | 7 | ------------------------------------------------------------------------- |
| 8 | 第一部分,加载插件 | 8 | 第一部分,加载插件 |
| @@ -20,9 +20,6 @@ | @@ -20,9 +20,6 @@ | ||
| 20 | */ | 20 | */ |
| 21 | function ckcpt() { | 21 | function ckcpt() { |
| 22 | var cpt = ''; | 22 | var cpt = ''; |
| 23 | - cpt += 'right.swf,2,1,0,0,2,0|'; //右边开关灯,调整,分享按钮的插件 | ||
| 24 | - cpt += 'share.swf,1,1,-180,-100,3,0|'; //分享插件 | ||
| 25 | - cpt += 'adjustment.swf,1,1,-180,-100,3,0|'; //调整大小和颜色的插件 | ||
| 26 | return cpt; | 23 | return cpt; |
| 27 | } | 24 | } |
| 28 | /* | 25 | /* |
| @@ -44,7 +41,7 @@ function ckstyle() { //定义总的风格 | @@ -44,7 +41,7 @@ function ckstyle() { //定义总的风格 | ||
| 44 | 这里是用来做为对flashvars值的补充,除了c和x二个参数以外的设置都可以在这里进行配置 | 41 | 这里是用来做为对flashvars值的补充,除了c和x二个参数以外的设置都可以在这里进行配置 |
| 45 | 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 | 42 | 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 |
| 46 | 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3*/ | 43 | 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3*/ |
| 47 | - setup: '1,1,1,1,1,2,0,1,2,0,0,1,200,0,2,1,0,1,1,1,2,10,3,0,1,2,3000,0,0,0,0,1,1,1,1,1,1,250,0,90,0,0,0', | 44 | + setup: '1,1,1,1,1,2,0,1,2,0,0,1,200,0,2,1,0,1,1,1,1,10,3,0,1,2,3000,0,0,0,0,1,1,1,1,1,1,250,0,90,0,0,0', |
| 48 | /* | 45 | /* |
| 49 | 这是配置文件里比较重要的一个参数,共有N个功能控制参数,并且以后会继续的增加,各控制参数以英文逗号(,)隔开。下面列出各参数的说明: | 46 | 这是配置文件里比较重要的一个参数,共有N个功能控制参数,并且以后会继续的增加,各控制参数以英文逗号(,)隔开。下面列出各参数的说明: |
| 50 | 1、鼠标经过按钮是否使用手型,0普通鼠标,1手型鼠标,2是只有按钮手型,3是控制栏手型 | 47 | 1、鼠标经过按钮是否使用手型,0普通鼠标,1手型鼠标,2是只有按钮手型,3是控制栏手型 |
| @@ -53,48 +50,48 @@ function ckstyle() { //定义总的风格 | @@ -53,48 +50,48 @@ function ckstyle() { //定义总的风格 | ||
| 53 | 4、在播放前置广告时是否同时加载视频,0不加载,1加载 | 50 | 4、在播放前置广告时是否同时加载视频,0不加载,1加载 |
| 54 | 5、广告显示的参考对象,0是参考视频区域,1是参考播放器区域 | 51 | 5、广告显示的参考对象,0是参考视频区域,1是参考播放器区域 |
| 55 | 6、广告大小的调整方式,只针对swf和图片有效,视频是自动缩放的 | 52 | 6、广告大小的调整方式,只针对swf和图片有效,视频是自动缩放的 |
| 56 | - =0是自动调整大小,意思是说大的话就变小,小的话就变大 | ||
| 57 | - =1是大的化变小,小的话不变 | ||
| 58 | - =2是什么也不变,就这么大 | ||
| 59 | - =3是跟参考对像(第5个控制)参数设置的一样宽高 | 53 | + 0=自动调整大小,意思是说大的话就变小,小的话就变大 |
| 54 | + 1=是大的化变小,小的话不变 | ||
| 55 | + 2=是什么也不变,就这么大 | ||
| 56 | + 3=是跟参考对像(第5个控制)参数设置的一样宽高 | ||
| 60 | 7、前置广告播放顺序,0是顺序播放,1是随机播放,>1则随机取所有广告中的(N-1)个进行播放 | 57 | 7、前置广告播放顺序,0是顺序播放,1是随机播放,>1则随机取所有广告中的(N-1)个进行播放 |
| 61 | 8、对于视频广告是否采用修正,0是不使用,1是使用,如果是1,则用户在网速慢的情况下会按设定的倒计时进行播放广告,计时结束则放正片(比较人性化),设置成0的话,则强制播放完广告才能播放正片 | 58 | 8、对于视频广告是否采用修正,0是不使用,1是使用,如果是1,则用户在网速慢的情况下会按设定的倒计时进行播放广告,计时结束则放正片(比较人性化),设置成0的话,则强制播放完广告才能播放正片 |
| 62 | 9、是否开启滚动文字广告,0是不开启,1是开启且不使用关闭按钮,2是开启并且使用关闭按钮,开启后将在加载视频的时候加载滚动文字广告 | 59 | 9、是否开启滚动文字广告,0是不开启,1是开启且不使用关闭按钮,2是开启并且使用关闭按钮,开启后将在加载视频的时候加载滚动文字广告 |
| 63 | 10、视频的调整方式 | 60 | 10、视频的调整方式 |
| 64 | - =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | ||
| 65 | - =1是大的化变小,小的话不变 | ||
| 66 | - =2是什么也不变,就这么大 | ||
| 67 | - =3是跟参考对像(pm_video的设置)参数设置的一样宽高 | 61 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 |
| 62 | + 1=是大的化变小,小的话不变 | ||
| 63 | + 2=是什么也不变,就这么大 | ||
| 64 | + 3=是跟参考对像(pm_video的设置)参数设置的一样宽高 | ||
| 68 | 11、是否在多视频时分段加载,0不是,1是 | 65 | 11、是否在多视频时分段加载,0不是,1是 |
| 69 | 12、缩放视频时是否进行平滑处理,0不是,1是 | 66 | 12、缩放视频时是否进行平滑处理,0不是,1是 |
| 70 | 13、视频缓冲时间,单位:毫秒,建议不超过300 | 67 | 13、视频缓冲时间,单位:毫秒,建议不超过300 |
| 71 | 14、初始图片调整方式( | 68 | 14、初始图片调整方式( |
| 72 | - =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | ||
| 73 | - =1是大的化变小,小的话不变 | ||
| 74 | - =2是什么也不变,就这么大 | ||
| 75 | - =3是跟pm_video参数设置的一样宽高 | 69 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 |
| 70 | + 1=是大的化变小,小的话不变 | ||
| 71 | + 2=是什么也不变,就这么大 | ||
| 72 | + 3=是跟pm_video参数设置的一样宽高 | ||
| 76 | 15、暂停广告调整方式( | 73 | 15、暂停广告调整方式( |
| 77 | - =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | ||
| 78 | - =1是大的化变小,小的话不变 | ||
| 79 | - =2是什么也不变,就这么大 | ||
| 80 | - =3是跟pm_video参数设置的一样宽 | 74 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 |
| 75 | + 1=是大的化变小,小的话不变 | ||
| 76 | + 2=是什么也不变,就这么大 | ||
| 77 | + 3=是跟pm_video参数设置的一样宽 | ||
| 81 | 16、暂停广告是否使用关闭广告设置,0不使用,1使用 | 78 | 16、暂停广告是否使用关闭广告设置,0不使用,1使用 |
| 82 | 17、缓冲时是否播放广告,0是不显示,1是显示并同时隐藏掉缓冲图标和进度,2是显示并不隐藏缓冲图标 | 79 | 17、缓冲时是否播放广告,0是不显示,1是显示并同时隐藏掉缓冲图标和进度,2是显示并不隐藏缓冲图标 |
| 83 | 18、是否支持键盘空格键控制播放和暂停0不支持,1支持 | 80 | 18、是否支持键盘空格键控制播放和暂停0不支持,1支持 |
| 84 | 19、是否支持键盘左右方向键控制快进快退0不支持,1支持 | 81 | 19、是否支持键盘左右方向键控制快进快退0不支持,1支持 |
| 85 | 20、是否支持键盘上下方向键控制音量0不支持,1支持 | 82 | 20、是否支持键盘上下方向键控制音量0不支持,1支持 |
| 86 | - 21、播放器返回js交互函数的等级,0-2,等级越高,返回的参数越多 | ||
| 87 | - 0是返回少量常用交互 | ||
| 88 | - 1返回播放器在播放的时候的参数,不返回广告之类的参数 | ||
| 89 | - 2返回全部参数 | ||
| 90 | - 3返回全部参数,并且在参数前加上"播放器ID->",用于多播放器的监听 | 83 | + 21、播放器返回js全部监听函数的等级,0-2,等级越高,返回的参数越多 |
| 84 | + 0=不返回全部监听事件 | ||
| 85 | + 1=返回监听,但不在控制台输出 | ||
| 86 | + 2=返回监听,并且在控制台同步输出 | ||
| 87 | + 3=返回全部监听事件,并且在参数前加上"播放器ID->",用于多播放器的监听 | ||
| 91 | 22、快进和快退的秒数 | 88 | 22、快进和快退的秒数 |
| 92 | 23、界面上图片元素加载失败重新加载次数 | 89 | 23、界面上图片元素加载失败重新加载次数 |
| 93 | 24、开启加载皮肤压缩文件包的加载进度提示 | 90 | 24、开启加载皮肤压缩文件包的加载进度提示 |
| 94 | 25、使用隐藏控制栏时显示简单进度条的功能,0是不使用,1是使用,2是只在普通状态下使用 | 91 | 25、使用隐藏控制栏时显示简单进度条的功能,0是不使用,1是使用,2是只在普通状态下使用 |
| 95 | 26、控制栏隐藏设置(0不隐藏,1全屏时隐藏,2都隐藏 | 92 | 26、控制栏隐藏设置(0不隐藏,1全屏时隐藏,2都隐藏 |
| 96 | 27、控制栏隐藏延时时间,即在鼠标离开控制栏后多少毫秒后隐藏控制栏 | 93 | 27、控制栏隐藏延时时间,即在鼠标离开控制栏后多少毫秒后隐藏控制栏 |
| 97 | - 28、左右滚动时是否采用无缝,默认0采用,1是不采用 | 94 | + 28、滚动文字广告左右滚动时是否采用无缝,默认0采用,1是不采用 |
| 98 | 29、0是正常状态,1是控制栏默认隐藏,播放状态下鼠标经过播放器显示控制栏,2是一直隐藏控制栏 | 95 | 29、0是正常状态,1是控制栏默认隐藏,播放状态下鼠标经过播放器显示控制栏,2是一直隐藏控制栏 |
| 99 | 30、在播放rtmp视频时暂停后点击播放是否采用重新链接的方式,这里一共分0-2三个等级 | 96 | 30、在播放rtmp视频时暂停后点击播放是否采用重新链接的方式,这里一共分0-2三个等级 |
| 100 | 31、当采用网址形式(flashvars里s=1/2时)读取视频地址时是采用默认0=get方法,1=post方式 | 97 | 31、当采用网址形式(flashvars里s=1/2时)读取视频地址时是采用默认0=get方法,1=post方式 |
| @@ -119,7 +116,7 @@ function ckstyle() { //定义总的风格 | @@ -119,7 +116,7 @@ function ckstyle() { //定义总的风格 | ||
| 119 | 4、播放器最小高度 | 116 | 4、播放器最小高度 |
| 120 | 这里只是初始化时的设置,最终加载完播放器后显示的效果需要在style.swf/style.xml里设置该参数 | 117 | 这里只是初始化时的设置,最终加载完播放器后显示的效果需要在style.swf/style.xml里设置该参数 |
| 121 | */ | 118 | */ |
| 122 | - mylogo: 'null', | 119 | + mylogo: 'logo.swf', |
| 123 | /* | 120 | /* |
| 124 | 视频加载前显示的logo文件,不使用设置成null,即mylogo='null'; | 121 | 视频加载前显示的logo文件,不使用设置成null,即mylogo='null'; |
| 125 | */ | 122 | */ |
| @@ -132,7 +129,7 @@ function ckstyle() { //定义总的风格 | @@ -132,7 +129,7 @@ function ckstyle() { //定义总的风格 | ||
| 132 | 3、水平偏移量,举例说明,如果第1个参数设置成0左对齐,第3个偏移量设置成10,就是离左边10个像素,第一个参数设置成2,偏移量如果设置的是正值就会移到播放器外面,只有设置成负值才行,设置成-1,按钮就会跑到播放器外面 | 129 | 3、水平偏移量,举例说明,如果第1个参数设置成0左对齐,第3个偏移量设置成10,就是离左边10个像素,第一个参数设置成2,偏移量如果设置的是正值就会移到播放器外面,只有设置成负值才行,设置成-1,按钮就会跑到播放器外面 |
| 133 | 4、垂直偏移量 | 130 | 4、垂直偏移量 |
| 134 | */ | 131 | */ |
| 135 | - logo: 'null', | 132 | + logo: 'cklogo.png', |
| 136 | /* | 133 | /* |
| 137 | 默认右上角一直显示的logo,不使用设置成null,即logo='null'; | 134 | 默认右上角一直显示的logo,不使用设置成null,即logo='null'; |
| 138 | */ | 135 | */ |
| @@ -202,7 +199,7 @@ function ckstyle() { //定义总的风格 | @@ -202,7 +199,7 @@ function ckstyle() { //定义总的风格 | ||
| 202 | 5、水平偏移量 | 199 | 5、水平偏移量 |
| 203 | 6、垂直偏移量 | 200 | 6、垂直偏移量 |
| 204 | */ | 201 | */ |
| 205 | - pm_padvc: '2,0,-10,-10', | 202 | + pm_padvc: '2,0,-13,-13', |
| 206 | /* | 203 | /* |
| 207 | 暂停广告的关闭按钮的位置 | 204 | 暂停广告的关闭按钮的位置 |
| 208 | 1、水平对齐方式 | 205 | 1、水平对齐方式 |
| @@ -210,7 +207,7 @@ function ckstyle() { //定义总的风格 | @@ -210,7 +207,7 @@ function ckstyle() { //定义总的风格 | ||
| 210 | 3、水平偏移量 | 207 | 3、水平偏移量 |
| 211 | 4、垂直偏移量 | 208 | 4、垂直偏移量 |
| 212 | */ | 209 | */ |
| 213 | - pm_advms: '2,2,-46,-56', | 210 | + pm_advms: '2,2,-46,-67', |
| 214 | /* | 211 | /* |
| 215 | 滚动广告关闭按钮位置 | 212 | 滚动广告关闭按钮位置 |
| 216 | 1、水平对齐方式 | 213 | 1、水平对齐方式 |
| @@ -230,7 +227,7 @@ function ckstyle() { //定义总的风格 | @@ -230,7 +227,7 @@ function ckstyle() { //定义总的风格 | ||
| 230 | 7、文本框高度 | 227 | 7、文本框高度 |
| 231 | */ | 228 | */ |
| 232 | //pm_advmarquee: '1,2,50,-60,50,18,0,0x000000,50,0,20,1,15,2000', | 229 | //pm_advmarquee: '1,2,50,-60,50,18,0,0x000000,50,0,20,1,15,2000', |
| 233 | - pm_advmarquee: '1,2,50,-60,50,20,0,0x000000,50,0,20,1,30,2000', | 230 | + pm_advmarquee: '1,2,50,-70,50,20,0,0x000000,50,0,20,1,30,2000', |
| 234 | /* | 231 | /* |
| 235 | 滚动广告的控制,要使用的话需要在setup里的第9个参数设置成1 | 232 | 滚动广告的控制,要使用的话需要在setup里的第9个参数设置成1 |
| 236 | 这里分二种情况,前六个参数是定位控制,第7个参数是设置定位方式(0:相对定位,1:绝对定位) | 233 | 这里分二种情况,前六个参数是定位控制,第7个参数是设置定位方式(0:相对定位,1:绝对定位) |
| @@ -260,18 +257,19 @@ function ckstyle() { //定义总的风格 | @@ -260,18 +257,19 @@ function ckstyle() { //定义总的风格 | ||
| 260 | 14、控制向上或向下滚动时每次停止的时间 | 257 | 14、控制向上或向下滚动时每次停止的时间 |
| 261 | */ | 258 | */ |
| 262 | pm_glowfilter:'1,0x01485d, 100, 6, 3, 10, 1, 0, 0', | 259 | pm_glowfilter:'1,0x01485d, 100, 6, 3, 10, 1, 0, 0', |
| 263 | - /*滚动文字广告是否采用发光滤镜 | 260 | + /* |
| 261 | + 滚动文字广告是否采用发光滤镜 | ||
| 264 | 1、是否使用发光滤镜,0是不采用,1是使用 | 262 | 1、是否使用发光滤镜,0是不采用,1是使用 |
| 265 | 2、(default = 0xFF0000) — 光晕颜色,采用十六进制格式 0xRRGGBB。 默认值为 0xFF0000 | 263 | 2、(default = 0xFF0000) — 光晕颜色,采用十六进制格式 0xRRGGBB。 默认值为 0xFF0000 |
| 266 | 3、(default = 100) — 颜色的 Alpha 透明度值。 有效值为 0 到 100。 例如,25 设置透明度为 25% | 264 | 3、(default = 100) — 颜色的 Alpha 透明度值。 有效值为 0 到 100。 例如,25 设置透明度为 25% |
| 267 | 4、(default = 6.0) — 水平模糊量。 有效值为 0 到 255(浮点)。 2 的乘方值(如 2、4、8、16 和 32)经过优化,呈现速度比其它值更快 | 265 | 4、(default = 6.0) — 水平模糊量。 有效值为 0 到 255(浮点)。 2 的乘方值(如 2、4、8、16 和 32)经过优化,呈现速度比其它值更快 |
| 268 | 5、(default = 6.0) — 垂直模糊量。 有效值为 0 到 255(浮点)。 2 的乘方值(如 2、4、8、16 和 32)经过优化,呈现速度比其它值更快 | 266 | 5、(default = 6.0) — 垂直模糊量。 有效值为 0 到 255(浮点)。 2 的乘方值(如 2、4、8、16 和 32)经过优化,呈现速度比其它值更快 |
| 269 | - 6、(default = 2) — 印记或跨页的强度。 该值越高,压印的颜色越深,而且发光与背景之间的对比度也越强。 有效值为 0 到 255 | 267 | + 6、(default = 2) —光晕的强度。 该值越高,光晕的颜色越深,而且发光与背景之间的对比度也越强。 有效值为 0 到 255 |
| 270 | 7、(default = 1) — 应用滤镜的次数 | 268 | 7、(default = 1) — 应用滤镜的次数 |
| 271 | 8、(default = 0) — 指定发光是否为内侧发光。 值 1 指定发光是内侧发光。 值 0 指定发光是外侧发光(对象外缘周围的发光) | 269 | 8、(default = 0) — 指定发光是否为内侧发光。 值 1 指定发光是内侧发光。 值 0 指定发光是外侧发光(对象外缘周围的发光) |
| 272 | 9、(default = 0) — 指定对象是否具有挖空效果。 值为 1 将使对象的填充变为透明,并显示文档的背景颜色 | 270 | 9、(default = 0) — 指定对象是否具有挖空效果。 值为 1 将使对象的填充变为透明,并显示文档的背景颜色 |
| 273 | */ | 271 | */ |
| 274 | - advmarquee: escape('{a href="http://www.ckplayer.com"}{font color="#FFFFFF" size="12"}这里可以放文字广告,播放器默认使用这里设置的广告内容,如果不想在这里使用可以清空这里的内容,如果想在页面中实时定义滚动文字广告内容,可以清空这里的内容,然后在页面中设置广告函数。{/font}{/a}'), | 272 | + advmarquee: escape('{a href="http://www.ckplayer.com"}{font color="#FFFFFF" size="12" face="Microsoft YaHei"}这里可以放文字广告,播放器默认使用这里设置的广告内容,如果不想在这里使用可以清空这里的内容,如果想在页面中实时定义滚动文字广告内容,可以清空这里的内容,然后在页面中设置广告函数。{/font}{/a}'), |
| 275 | /* | 273 | /* |
| 276 | 该处是滚动文字广告的内容,如果不想在这里设置,就把这里清空并且在页面中使用js的函数定义function ckmarqueeadv(){return '广告内容'} | 274 | 该处是滚动文字广告的内容,如果不想在这里设置,就把这里清空并且在页面中使用js的函数定义function ckmarqueeadv(){return '广告内容'} |
| 277 | */ | 275 | */ |
| @@ -285,7 +283,10 @@ function ckstyle() { //定义总的风格 | @@ -285,7 +283,10 @@ function ckstyle() { //定义总的风格 | ||
| 285 | */ | 283 | */ |
| 286 | calljs:'ckplayer_status,ckadjump,playerstop,ckmarqueeadv', | 284 | calljs:'ckplayer_status,ckadjump,playerstop,ckmarqueeadv', |
| 287 | /* | 285 | /* |
| 288 | - 跳过广告和播放结束时调用的js函数 | 286 | + 1、全局监听返回结果的函数 |
| 287 | + 2、跳过广告的函数 | ||
| 288 | + 3、播放结束时调用的js函数 | ||
| 289 | + 4、加载滚动文字广告的函 | ||
| 289 | */ | 290 | */ |
| 290 | myweb: escape(''), | 291 | myweb: escape(''), |
| 291 | /* | 292 | /* |
| @@ -297,11 +298,11 @@ function ckstyle() { //定义总的风格 | @@ -297,11 +298,11 @@ function ckstyle() { //定义总的风格 | ||
| 297 | */ | 298 | */ |
| 298 | cpt_lights: '1', | 299 | cpt_lights: '1', |
| 299 | /* | 300 | /* |
| 300 | - 该处定义是否使用开关灯,和right.swf插件配合作用,使用开灯效果时调用页面的js函数function closelights(){}; | 301 | + 该处定义是否使用开关灯,使用开灯效果时调用页面的js函数function closelights(){},关灯调用 function closelights(){}; |
| 301 | */ | 302 | */ |
| 302 | cpt_share: 'ckplayer/share.xml', | 303 | cpt_share: 'ckplayer/share.xml', |
| 303 | /* | 304 | /* |
| 304 | - 分享插件调用的配置文件地址 | 305 | + 分享插件调用的配置文件地址,此设设置成空,则不启用分享按钮 |
| 305 | 调用插件开始 | 306 | 调用插件开始 |
| 306 | */ | 307 | */ |
| 307 | cpt_list: ckcpt() | 308 | cpt_list: ckcpt() |
| @@ -577,6 +578,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -577,6 +578,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 577 | } | 578 | } |
| 578 | }, | 579 | }, |
| 579 | getUrl: function(L, B) { | 580 | getUrl: function(L, B) { |
| 581 | + var C = this; | ||
| 580 | var b = ['get', 'utf-8']; | 582 | var b = ['get', 'utf-8']; |
| 581 | if (L && L.length == 2) { | 583 | if (L && L.length == 2) { |
| 582 | var a = L[0]; | 584 | var a = L[0]; |
| @@ -589,7 +591,6 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -589,7 +591,6 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 589 | } | 591 | } |
| 590 | this.ajax(b[0], b[1], a, | 592 | this.ajax(b[0], b[1], a, |
| 591 | function(s) { | 593 | function(s) { |
| 592 | - var C = CKobject; | ||
| 593 | if (s && s != 'error') { | 594 | if (s && s != 'error') { |
| 594 | var d = '', | 595 | var d = '', |
| 595 | e = s; | 596 | e = s; |
| @@ -663,11 +664,13 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -663,11 +664,13 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 663 | }; | 664 | }; |
| 664 | }, | 665 | }, |
| 665 | getObjectById: function(s) { | 666 | getObjectById: function(s) { |
| 666 | - if (this._T_) { | ||
| 667 | - return this; | 667 | + var C = this; |
| 668 | + if (C._T_) { | ||
| 669 | + C._V_=C._K_(s) | ||
| 670 | + return C ; | ||
| 668 | } | 671 | } |
| 669 | var x = null, | 672 | var x = null, |
| 670 | - y = this._K_(s), | 673 | + y = C._K_(s), |
| 671 | r = 'embed'; | 674 | r = 'embed'; |
| 672 | if (y && y.nodeName == 'OBJECT') { | 675 | if (y && y.nodeName == 'OBJECT') { |
| 673 | if (typeof y.SetVariable != 'undefined') { | 676 | if (typeof y.SetVariable != 'undefined') { |
| @@ -717,7 +720,24 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -717,7 +720,24 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 717 | } | 720 | } |
| 718 | }, | 721 | }, |
| 719 | addListener: function(e, f) { | 722 | addListener: function(e, f) { |
| 720 | - var o=CKobject._V_; | 723 | + var o=this._V_; |
| 724 | + switch(e){ | ||
| 725 | + case 'time': | ||
| 726 | + e='timeupdate'; | ||
| 727 | + this.AT=f; | ||
| 728 | + f=this.addListenerTime; | ||
| 729 | + break; | ||
| 730 | + case 'totaltime': | ||
| 731 | + this.ATAll=f; | ||
| 732 | + return; | ||
| 733 | + break; | ||
| 734 | + default: | ||
| 735 | + break; | ||
| 736 | + } | ||
| 737 | + //console.log(typeof(f)); | ||
| 738 | + if(typeof(f)=='string'){ | ||
| 739 | + f=eval(f); | ||
| 740 | + } | ||
| 721 | if (o.addEventListener) { | 741 | if (o.addEventListener) { |
| 722 | try{ | 742 | try{ |
| 723 | o.addEventListener(e, f, false); | 743 | o.addEventListener(e, f, false); |
| @@ -739,7 +759,22 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -739,7 +759,22 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 739 | } | 759 | } |
| 740 | }, | 760 | }, |
| 741 | removeListener: function( e, f) { | 761 | removeListener: function( e, f) { |
| 742 | - var o=CKobject._V_; | 762 | + var o=this._V_; |
| 763 | + switch(e){ | ||
| 764 | + case 'time': | ||
| 765 | + e='timeupdate'; | ||
| 766 | + this.AT=null; | ||
| 767 | + break; | ||
| 768 | + case 'totaltime': | ||
| 769 | + this.ATAll=null; | ||
| 770 | + return; | ||
| 771 | + break; | ||
| 772 | + default: | ||
| 773 | + break; | ||
| 774 | + } | ||
| 775 | + if(typeof(f)=='string'){ | ||
| 776 | + f=eval(f); | ||
| 777 | + } | ||
| 743 | if (o.removeEventListener) { | 778 | if (o.removeEventListener) { |
| 744 | try{ | 779 | try{ |
| 745 | o.removeEventListener(e, f, false); | 780 | o.removeEventListener(e, f, false); |
| @@ -973,7 +1008,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -973,7 +1008,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 973 | return false; | 1008 | return false; |
| 974 | }, | 1009 | }, |
| 975 | showHtml5: function() { | 1010 | showHtml5: function() { |
| 976 | - var C = CKobject; | 1011 | + var C = this; |
| 977 | var p = C._E_['p'], | 1012 | var p = C._E_['p'], |
| 978 | a = C._E_['v'], | 1013 | a = C._E_['v'], |
| 979 | c = C._E_['c'], | 1014 | c = C._E_['c'], |
| @@ -998,9 +1033,9 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -998,9 +1033,9 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 998 | h='100%'; | 1033 | h='100%'; |
| 999 | } | 1034 | } |
| 1000 | if(C._E_['j']){ | 1035 | if(C._E_['j']){ |
| 1001 | - j='controls="controls"'; | 1036 | + j=' controls="controls"'; |
| 1002 | } | 1037 | } |
| 1003 | - var v = '<video '+j+r+' id="' + p + '" width="' + w + '" height="' + h + '"' + C.getParams() + '>' + C.getVideo() + '</video>'; | 1038 | + var v = '<video'+j+r+' id="' + p + '" width="' + w + '" height="' + h + '"' + C.getParams() + ' webkit-playsinline>' + C.getVideo() + '</video>'; |
| 1004 | C._K_(c).innerHTML = v; | 1039 | C._K_(c).innerHTML = v; |
| 1005 | C._K_(c).style.backgroundColor = '#000'; | 1040 | C._K_(c).style.backgroundColor = '#000'; |
| 1006 | C._V_ = C._K_(p); | 1041 | C._V_ = C._K_(p); |
| @@ -1040,6 +1075,12 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -1040,6 +1075,12 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 1040 | C.addListener('click', C.html5Click); | 1075 | C.addListener('click', C.html5Click); |
| 1041 | } | 1076 | } |
| 1042 | }, | 1077 | }, |
| 1078 | + addListenerTime:function(){ | ||
| 1079 | + var C = CKobject; | ||
| 1080 | + if(C.AT){ | ||
| 1081 | + C.AT(C._V_['currentTime']); | ||
| 1082 | + } | ||
| 1083 | + }, | ||
| 1043 | videoPlay: function() { | 1084 | videoPlay: function() { |
| 1044 | if (this._T_) { | 1085 | if (this._T_) { |
| 1045 | this._V_.play(); | 1086 | this._V_.play(); |
| @@ -1070,6 +1111,9 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -1070,6 +1111,9 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 1070 | } | 1111 | } |
| 1071 | }, | 1112 | }, |
| 1072 | changeVolume: function(n) { | 1113 | changeVolume: function(n) { |
| 1114 | + if(n<0 || n>100){ | ||
| 1115 | + return; | ||
| 1116 | + } | ||
| 1073 | if (this._T_) { | 1117 | if (this._T_) { |
| 1074 | this._V_['volume'] = n * 0.01; | 1118 | this._V_['volume'] = n * 0.01; |
| 1075 | } | 1119 | } |
| @@ -1239,6 +1283,57 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -1239,6 +1283,57 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 1239 | marqueeClose: function(s) { | 1283 | marqueeClose: function(s) { |
| 1240 | this.getNot(); | 1284 | this.getNot(); |
| 1241 | }, | 1285 | }, |
| 1286 | + videoError: function(s) { | ||
| 1287 | + this.getNot(); | ||
| 1288 | + }, | ||
| 1289 | + formatUrl: function(s) { | ||
| 1290 | + this.getNot(); | ||
| 1291 | + }, | ||
| 1292 | + sendJS: function(s) { | ||
| 1293 | + this.getNot(); | ||
| 1294 | + }, | ||
| 1295 | + plugAttribute: function(s) { | ||
| 1296 | + this.getNot(); | ||
| 1297 | + }, | ||
| 1298 | + errorTextShow: function(s) { | ||
| 1299 | + this.getNot(); | ||
| 1300 | + }, | ||
| 1301 | + openUrl: function(s) { | ||
| 1302 | + window.open(s); | ||
| 1303 | + }, | ||
| 1304 | + jsonParse: function(s) { | ||
| 1305 | + this.getNot(); | ||
| 1306 | + }, | ||
| 1307 | + promptShow: function(s,x,y) { | ||
| 1308 | + this.getNot(); | ||
| 1309 | + }, | ||
| 1310 | + screenShot: function(s,x,y,x2,y2) { | ||
| 1311 | + this.getNot(); | ||
| 1312 | + }, | ||
| 1313 | + fullScreen: function() { | ||
| 1314 | + this.getNot(); | ||
| 1315 | + }, | ||
| 1316 | + allowFull: function() { | ||
| 1317 | + this.getNot(); | ||
| 1318 | + }, | ||
| 1319 | + loadButton: function() { | ||
| 1320 | + this.getNot(); | ||
| 1321 | + }, | ||
| 1322 | + getFile: function() { | ||
| 1323 | + this.getNot(); | ||
| 1324 | + }, | ||
| 1325 | + textBoxShow:function() { | ||
| 1326 | + this.getNot(); | ||
| 1327 | + }, | ||
| 1328 | + loadElement: function() { | ||
| 1329 | + this.getNot(); | ||
| 1330 | + }, | ||
| 1331 | + textBoxClose: function() { | ||
| 1332 | + this.getNot(); | ||
| 1333 | + }, | ||
| 1334 | + textBoxTween: function() { | ||
| 1335 | + this.getNot(); | ||
| 1336 | + }, | ||
| 1242 | getNot: function() { | 1337 | getNot: function() { |
| 1243 | var s='The ckplayer\'s API for HTML5 does not exist'; | 1338 | var s='The ckplayer\'s API for HTML5 does not exist'; |
| 1244 | return s; | 1339 | return s; |
| @@ -1292,7 +1387,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -1292,7 +1387,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 1292 | loadedMetadataHandler: function() { | 1387 | loadedMetadataHandler: function() { |
| 1293 | var C = CKobject; | 1388 | var C = CKobject; |
| 1294 | C.returnStatus('loadedmetadata', 1); | 1389 | C.returnStatus('loadedmetadata', 1); |
| 1295 | - C._O_['totaltime'] = C._V_['duration']; | 1390 | + C._O_['totalTime'] = C._V_['duration']; |
| 1296 | C._O_['width'] = C._V_['width']; | 1391 | C._O_['width'] = C._V_['width']; |
| 1297 | C._O_['height'] = C._V_['height']; | 1392 | C._O_['height'] = C._V_['height']; |
| 1298 | C._O_['awidth'] = C._V_['videoWidth']; | 1393 | C._O_['awidth'] = C._V_['videoWidth']; |
| @@ -1309,6 +1404,9 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -1309,6 +1404,9 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 1309 | if (parseInt(C.getVars('p')) == 1) { | 1404 | if (parseInt(C.getVars('p')) == 1) { |
| 1310 | C.playHandler(); | 1405 | C.playHandler(); |
| 1311 | } | 1406 | } |
| 1407 | + if(C.ATAll){ | ||
| 1408 | + C.ATAll(C._V_['duration']); | ||
| 1409 | + } | ||
| 1312 | }, | 1410 | }, |
| 1313 | errorHandler: function() { | 1411 | errorHandler: function() { |
| 1314 | CKobject.returnStatus('error', 1); | 1412 | CKobject.returnStatus('error', 1); |
| @@ -1348,7 +1446,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -1348,7 +1446,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 1348 | C._J_=j; | 1446 | C._J_=j; |
| 1349 | } | 1447 | } |
| 1350 | else{ | 1448 | else{ |
| 1351 | - C._J_=parseInt(C._O_['totaltime'])+j; | 1449 | + C._J_=parseInt(C._O_['totalTime'])+j; |
| 1352 | } | 1450 | } |
| 1353 | } | 1451 | } |
| 1354 | } | 1452 | } |
| @@ -1356,6 +1454,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | @@ -1356,6 +1454,7 @@ html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛 | ||
| 1356 | } | 1454 | } |
| 1357 | }, | 1455 | }, |
| 1358 | html5Click: function(){ | 1456 | html5Click: function(){ |
| 1457 | + //console.log(this); | ||
| 1359 | var C = CKobject; | 1458 | var C = CKobject; |
| 1360 | if(C.getVars('m')!='' && C.getVars('m')!=null){ | 1459 | if(C.getVars('m')!='' && C.getVars('m')!=null){ |
| 1361 | window.open(C.getVars('m')); | 1460 | window.open(C.getVars('m')); |
src/main/webapp/static/assets/ckplayer/ckplayer.swf
0 → 100644
No preview for this file type
src/main/webapp/pages/check/ckplayer/ckplayer.xml renamed to src/main/webapp/static/assets/ckplayer/ckplayer.xml
| @@ -26,50 +26,50 @@ | @@ -26,50 +26,50 @@ | ||
| 26 | 4、在播放前置广告时是否同时加载视频,0不加载,1加载 | 26 | 4、在播放前置广告时是否同时加载视频,0不加载,1加载 |
| 27 | 5、广告显示的参考对象,0是参考视频区域,1是参考播放器区域 | 27 | 5、广告显示的参考对象,0是参考视频区域,1是参考播放器区域 |
| 28 | 6、广告大小的调整方式,只针对swf和图片有效,视频是自动缩放的 | 28 | 6、广告大小的调整方式,只针对swf和图片有效,视频是自动缩放的 |
| 29 | - =0是自动调整大小,意思是说大的话就变小,小的话就变大 | ||
| 30 | - =1是大的化变小,小的话不变 | ||
| 31 | - =2是什么也不变,就这么大 | ||
| 32 | - =3是跟参考对像(第5个控制)参数设置的一样宽高 | 29 | + 0=自动调整大小,意思是说大的话就变小,小的话就变大 |
| 30 | + 1=是大的化变小,小的话不变 | ||
| 31 | + 2=是什么也不变,就这么大 | ||
| 32 | + 3=是跟参考对像(第5个控制)参数设置的一样宽高 | ||
| 33 | 7、前置广告播放顺序,0是顺序播放,1是随机播放,>1则随机取所有广告中的(N-1)个进行播放 | 33 | 7、前置广告播放顺序,0是顺序播放,1是随机播放,>1则随机取所有广告中的(N-1)个进行播放 |
| 34 | 8、对于视频广告是否采用修正,0是不使用,1是使用,如果是1,则用户在网速慢的情况下会按设定的倒计时进行播放广告,计时结束则放正片(比较人性化),设置成0的话,则强制播放完广告才能播放正片 | 34 | 8、对于视频广告是否采用修正,0是不使用,1是使用,如果是1,则用户在网速慢的情况下会按设定的倒计时进行播放广告,计时结束则放正片(比较人性化),设置成0的话,则强制播放完广告才能播放正片 |
| 35 | 9、是否开启滚动文字广告,0是不开启,1是开启且不使用关闭按钮,2是开启并且使用关闭按钮,开启后将在加载视频的时候加载滚动文字广告 | 35 | 9、是否开启滚动文字广告,0是不开启,1是开启且不使用关闭按钮,2是开启并且使用关闭按钮,开启后将在加载视频的时候加载滚动文字广告 |
| 36 | 10、视频的调整方式 | 36 | 10、视频的调整方式 |
| 37 | - =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | ||
| 38 | - =1是大的化变小,小的话不变 | ||
| 39 | - =2是什么也不变,就这么大 | ||
| 40 | - =3是跟参考对像(pm_video的设置)参数设置的一样宽高 | 37 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 |
| 38 | + 1=是大的化变小,小的话不变 | ||
| 39 | + 2=是什么也不变,就这么大 | ||
| 40 | + 3=是跟参考对像(pm_video的设置)参数设置的一样宽高 | ||
| 41 | 11、是否在多视频时分段加载,0不是,1是 | 41 | 11、是否在多视频时分段加载,0不是,1是 |
| 42 | 12、缩放视频时是否进行平滑处理,0不是,1是 | 42 | 12、缩放视频时是否进行平滑处理,0不是,1是 |
| 43 | 13、视频缓冲时间,单位:毫秒,建议不超过300 | 43 | 13、视频缓冲时间,单位:毫秒,建议不超过300 |
| 44 | 14、初始图片调整方式( | 44 | 14、初始图片调整方式( |
| 45 | - =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | ||
| 46 | - =1是大的化变小,小的话不变 | ||
| 47 | - =2是什么也不变,就这么大 | ||
| 48 | - =3是跟pm_video参数设置的一样宽高 | 45 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 |
| 46 | + 1=是大的化变小,小的话不变 | ||
| 47 | + 2=是什么也不变,就这么大 | ||
| 48 | + 3=是跟pm_video参数设置的一样宽高 | ||
| 49 | 15、暂停广告调整方式( | 49 | 15、暂停广告调整方式( |
| 50 | - =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | ||
| 51 | - =1是大的化变小,小的话不变 | ||
| 52 | - =2是什么也不变,就这么大 | ||
| 53 | - =3是跟pm_video参数设置的一样宽 | 50 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 |
| 51 | + 1=是大的化变小,小的话不变 | ||
| 52 | + 2=是什么也不变,就这么大 | ||
| 53 | + 3=是跟pm_video参数设置的一样宽 | ||
| 54 | 16、暂停广告是否使用关闭广告设置,0不使用,1使用 | 54 | 16、暂停广告是否使用关闭广告设置,0不使用,1使用 |
| 55 | 17、缓冲时是否播放广告,0是不显示,1是显示并同时隐藏掉缓冲图标和进度,2是显示并不隐藏缓冲图标 | 55 | 17、缓冲时是否播放广告,0是不显示,1是显示并同时隐藏掉缓冲图标和进度,2是显示并不隐藏缓冲图标 |
| 56 | 18、是否支持键盘空格键控制播放和暂停0不支持,1支持 | 56 | 18、是否支持键盘空格键控制播放和暂停0不支持,1支持 |
| 57 | 19、是否支持键盘左右方向键控制快进快退0不支持,1支持 | 57 | 19、是否支持键盘左右方向键控制快进快退0不支持,1支持 |
| 58 | 20、是否支持键盘上下方向键控制音量0不支持,1支持 | 58 | 20、是否支持键盘上下方向键控制音量0不支持,1支持 |
| 59 | - 21、播放器返回js交互函数的等级,0-2,等级越高,返回的参数越多 | ||
| 60 | - 0是返回少量常用交互 | ||
| 61 | - 1返回播放器在播放的时候的参数,不返回广告之类的参数 | ||
| 62 | - 2返回全部参数 | ||
| 63 | - 3返回全部参数,并且在参数前加上"播放器ID->",用于多播放器的监听 | 59 | + 21、播放器返回js全部监听函数的等级,0-2,等级越高,返回的参数越多 |
| 60 | + 0=不返回全部监听事件 | ||
| 61 | + 1=返回监听,但不在控制台输出 | ||
| 62 | + 2=返回监听,并且在控制台同步输出 | ||
| 63 | + 3=返回全部监听事件,并且在参数前加上"播放器ID->",用于多播放器的监听 | ||
| 64 | 22、快进和快退的秒数 | 64 | 22、快进和快退的秒数 |
| 65 | 23、界面上图片元素加载失败重新加载次数 | 65 | 23、界面上图片元素加载失败重新加载次数 |
| 66 | 24、开启加载皮肤压缩文件包的加载进度提示 | 66 | 24、开启加载皮肤压缩文件包的加载进度提示 |
| 67 | 25、使用隐藏控制栏时显示简单进度条的功能,0是不使用,1是使用,2是只在普通状态下使用 | 67 | 25、使用隐藏控制栏时显示简单进度条的功能,0是不使用,1是使用,2是只在普通状态下使用 |
| 68 | 26、控制栏隐藏设置(0不隐藏,1全屏时隐藏,2都隐藏 | 68 | 26、控制栏隐藏设置(0不隐藏,1全屏时隐藏,2都隐藏 |
| 69 | 27、控制栏隐藏延时时间,即在鼠标离开控制栏后多少毫秒后隐藏控制栏 | 69 | 27、控制栏隐藏延时时间,即在鼠标离开控制栏后多少毫秒后隐藏控制栏 |
| 70 | - 28、左右滚动时是否采用无缝,默认0采用,1是不采用 | 70 | + 28、滚动文字广告左右滚动时是否采用无缝,默认0采用,1是不采用 |
| 71 | 29、0是正常状态,1是控制栏默认隐藏,播放状态下鼠标经过播放器显示控制栏,2是一直隐藏控制栏 | 71 | 29、0是正常状态,1是控制栏默认隐藏,播放状态下鼠标经过播放器显示控制栏,2是一直隐藏控制栏 |
| 72 | - 30、在播放rtmp视频时暂停后点击播放是否采用重新链接的方式,这里一共分0-3四个等级 | 72 | + 30、在播放rtmp视频时暂停后点击播放是否采用重新链接的方式,这里一共分0-2三个等级 |
| 73 | 31、当采用网址形式(flashvars里s=1/2时)读取视频地址时是采用默认0=get方法,1=post方式 | 73 | 31、当采用网址形式(flashvars里s=1/2时)读取视频地址时是采用默认0=get方法,1=post方式 |
| 74 | 32、是否启用播放按钮和暂停按钮 | 74 | 32、是否启用播放按钮和暂停按钮 |
| 75 | 33、是否启用中间暂停按钮 | 75 | 33、是否启用中间暂停按钮 |
| @@ -81,7 +81,7 @@ | @@ -81,7 +81,7 @@ | ||
| 81 | 39、前置logo至少显示的时间,单位:毫秒 | 81 | 39、前置logo至少显示的时间,单位:毫秒 |
| 82 | 40、前置视频广告的默认音量 | 82 | 40、前置视频广告的默认音量 |
| 83 | 41、当s=3/4时加载插件是否从压缩包里加载,0不是,1是 | 83 | 41、当s=3/4时加载插件是否从压缩包里加载,0不是,1是 |
| 84 | - 42、加载风格是否采用加密方式传送,该功能普通用户不能使用 | 84 | + 42、加载风格是否采用加密方式传送,该功能普通用户不能使用,并且需要下载ckplayer-SN版 |
| 85 | 43、在s=1/2时,调用地址里的地址是否是相对地址(相对于调用文件),0不是,1是 | 85 | 43、在s=1/2时,调用地址里的地址是否是相对地址(相对于调用文件),0不是,1是 |
| 86 | --> | 86 | --> |
| 87 | <pm_bg>0x000000,100,230,180</pm_bg> | 87 | <pm_bg>0x000000,100,230,180</pm_bg> |
| @@ -174,7 +174,7 @@ | @@ -174,7 +174,7 @@ | ||
| 174 | 5、水平偏移量 | 174 | 5、水平偏移量 |
| 175 | 6、垂直偏移量 | 175 | 6、垂直偏移量 |
| 176 | --> | 176 | --> |
| 177 | - <pm_padvc>2,0,-10,-10</pm_padvc> | 177 | + <pm_padvc>2,0,-13,-13</pm_padvc> |
| 178 | <!-- | 178 | <!-- |
| 179 | 暂停广告的关闭按钮的位置 | 179 | 暂停广告的关闭按钮的位置 |
| 180 | 1、水平对齐方式 | 180 | 1、水平对齐方式 |
| @@ -182,7 +182,7 @@ | @@ -182,7 +182,7 @@ | ||
| 182 | 3、水平偏移量 | 182 | 3、水平偏移量 |
| 183 | 4、垂直偏移量 | 183 | 4、垂直偏移量 |
| 184 | --> | 184 | --> |
| 185 | - <pm_advms>2,2,-46,-56</pm_advms> | 185 | + <pm_advms>2,2,-46,-67</pm_advms> |
| 186 | <!-- | 186 | <!-- |
| 187 | 滚动广告关闭按钮位置 | 187 | 滚动广告关闭按钮位置 |
| 188 | 1、水平对齐方式 | 188 | 1、水平对齐方式 |
| @@ -201,7 +201,7 @@ | @@ -201,7 +201,7 @@ | ||
| 201 | 6、文本框宽席 | 201 | 6、文本框宽席 |
| 202 | 7、文本框高度 | 202 | 7、文本框高度 |
| 203 | --> | 203 | --> |
| 204 | - <pm_advmarquee>1,2,50,-60,50,18,0,0x000000,50,0,20,1,30,2000</pm_advmarquee> | 204 | + <pm_advmarquee>1,2,50,-70,50,18,0,0x000000,50,0,20,1,30,2000</pm_advmarquee> |
| 205 | <!-- | 205 | <!-- |
| 206 | 滚动广告的控制,要使用的话需要在setup里的第9个参数设置成1 | 206 | 滚动广告的控制,要使用的话需要在setup里的第9个参数设置成1 |
| 207 | 这里分二种情况,前六个参数是定位控制,第7个参数是设置定位方式(0:相对定位,1:绝对定位) | 207 | 这里分二种情况,前六个参数是定位控制,第7个参数是设置定位方式(0:相对定位,1:绝对定位) |
| @@ -256,7 +256,10 @@ | @@ -256,7 +256,10 @@ | ||
| 256 | --> | 256 | --> |
| 257 | <calljs>ckplayer_status,ckadjump,playerstop,ckmarqueeadv</calljs> | 257 | <calljs>ckplayer_status,ckadjump,playerstop,ckmarqueeadv</calljs> |
| 258 | <!-- | 258 | <!-- |
| 259 | - 跳过广告和播放结束时调用的js函数 | 259 | + 1、全局监听返回结果的函数 |
| 260 | + 2、跳过广告的函数 | ||
| 261 | + 3、播放结束时调用的js函数 | ||
| 262 | + 4、加载滚动文字广告的函数 | ||
| 260 | --> | 263 | --> |
| 261 | <myweb></myweb> | 264 | <myweb></myweb> |
| 262 | 265 | ||
| @@ -266,15 +269,12 @@ | @@ -266,15 +269,12 @@ | ||
| 266 | --> | 269 | --> |
| 267 | <cpt_lights>0</cpt_lights> | 270 | <cpt_lights>0</cpt_lights> |
| 268 | <!-- | 271 | <!-- |
| 269 | - 该处定义是否使用开关灯,和right.swf插件配合作用,使用开灯效果时调用页面的js函数function closelights(){}; | 272 | + 该处定义是否使用开关灯,使用开灯效果时调用页面的js函数function closelights(){},关灯调用 function closelights(){}; |
| 270 | --> | 273 | --> |
| 271 | <cpt_share>/ckplayer/share.xml</cpt_share> | 274 | <cpt_share>/ckplayer/share.xml</cpt_share> |
| 272 | <!-- | 275 | <!-- |
| 273 | - 分享插件调用的配置文件地址 | 276 | + 分享插件调用的配置文件地址,此设设置成空,则不启用分享按钮 |
| 274 | 调用插件开始 | 277 | 调用插件开始 |
| 275 | --> | 278 | --> |
| 276 | - <cpt>right.swf,2,1,0,0,2,0</cpt><!--右边开关灯,调整,分享按钮的插件--> | ||
| 277 | - <cpt>share.swf,1,1,-180,-100,3,0</cpt><!--分享插件--> | ||
| 278 | - <cpt>adjustment.swf,1,1,-180,-100,3,0</cpt><!--调整大小和颜色的插件--> | ||
| 279 | </style> | 279 | </style> |
| 280 | </ckplayer> | 280 | </ckplayer> |
| 281 | \ No newline at end of file | 281 | \ No newline at end of file |
src/main/webapp/static/assets/ckplayer/language.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | + <ckplayer> | ||
| 3 | + <style> | ||
| 4 | + <pr_zip>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}已加载[$prtage]%{/font}</pr_zip> | ||
| 5 | + <!-- | ||
| 6 | + 加载皮肤包进度提示的文字,[$prtage]会被替换成加载百分比 | ||
| 7 | + --> | ||
| 8 | + <pr_load>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}已加载[$prtage]%{/font}</pr_load> | ||
| 9 | + <!-- | ||
| 10 | + 当调用多段视频时,并且没有配置好各段视频的时间和字节数的情况下,播放器需要先读取各段视频的元数据进行计算,此时需要显示一个加载进度告诉用户已计算的情况。 | ||
| 11 | + --> | ||
| 12 | + <pr_noload>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}加载失败{/font}</pr_noload> | ||
| 13 | + <!-- | ||
| 14 | + 加载视频失败时显示的内容 | ||
| 15 | + --> | ||
| 16 | + <pr_buffer>{font color='#FFFFFF' face='Arial' size='12'}[$buffer]%{/font}</pr_buffer> | ||
| 17 | + <!-- | ||
| 18 | + 视频缓冲时显示的提示,[$buffer]会被替换成缓冲的百分比数字部份 | ||
| 19 | + --> | ||
| 20 | + <pr_play>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}点击播放{/font}</pr_play> | ||
| 21 | + <!-- | ||
| 22 | + 鼠标经过播放按钮时的提示,支持html | ||
| 23 | + --> | ||
| 24 | + <pr_pause>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}点击暂停{/font}</pr_pause> | ||
| 25 | + <!-- | ||
| 26 | + 鼠标经过暂停按钮时的提示,支持html | ||
| 27 | + --> | ||
| 28 | + <pr_mute>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}点击静音{/font}</pr_mute> | ||
| 29 | + <!-- | ||
| 30 | + 鼠标经过静音按钮时的提示,支持html | ||
| 31 | + --> | ||
| 32 | + <pr_nomute>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}取消静音{/font}</pr_nomute> | ||
| 33 | + <!-- | ||
| 34 | + 鼠标经过取消静音按钮时的提示,支持html | ||
| 35 | + --> | ||
| 36 | + <pr_full>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}点击全屏{/font}</pr_full> | ||
| 37 | + <!-- | ||
| 38 | + 鼠标经过全屏按钮时的提示,支持html | ||
| 39 | + --> | ||
| 40 | + <pr_nofull>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}退出全屏{/font}</pr_nofull> | ||
| 41 | + <!-- | ||
| 42 | + 鼠标经过退出全屏按钮时的提示,支持html | ||
| 43 | + --> | ||
| 44 | + <pr_fastf>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}快进{/font}</pr_fastf> | ||
| 45 | + <!-- | ||
| 46 | + 鼠标经过快进按钮时的提示,支持html | ||
| 47 | + --> | ||
| 48 | + <pr_fastr>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}快退{/font}</pr_fastr> | ||
| 49 | + <!-- | ||
| 50 | + 鼠标经过快退按钮时的提示,支持html | ||
| 51 | + --> | ||
| 52 | + <pr_time>{font color='#FFFFFF' face='Arial' size='16'}[$Time]{/font}</pr_time> | ||
| 53 | + <!-- | ||
| 54 | + 鼠标经过进度栏时提示当前点上时间的,[$Time]会被替换成时间,支持html | ||
| 55 | + --> | ||
| 56 | + <pr_volume>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}音量:[$Volume]%{/font}</pr_volume> | ||
| 57 | + <!-- | ||
| 58 | + 鼠标经过音量调节框或调整音量时提示,[$Volume]会自动替换音量值(0-100) | ||
| 59 | + --> | ||
| 60 | + <pr_clockwait>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}00:00 / 00:00{/font}</pr_clockwait> | ||
| 61 | + <!-- | ||
| 62 | + 在默认不加载视频,即m=1的时候,同时并没有设置视频的时间和字节,即o和w值的时候,pr_clock和pr_clock2里的所有内容被替换成这里设置的值 | ||
| 63 | + --> | ||
| 64 | + <pr_live>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}视频直播中{/font}</pr_live> | ||
| 65 | + <!-- | ||
| 66 | + 在直播的情况下显示的文字 | ||
| 67 | + --> | ||
| 68 | + <pr_adv>{font color='#FFFFFF' size='12' face='Microsoft YaHei,微软雅黑'}广告剩余:{font color='#FF0000' size='15' face='Arial'}{b}[$Second]{/b}{/font} 秒{/font}</pr_adv> | ||
| 69 | + <!-- | ||
| 70 | + 广告倒计时显示的内容,[$Second]将会显示倒计时的秒数 | ||
| 71 | + --> | ||
| 72 | + <pr_prompt>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}[$prompt]{/font}</pr_prompt> | ||
| 73 | + <!-- | ||
| 74 | + 提示点文字 | ||
| 75 | + --> | ||
| 76 | + <pr_cksetup>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}设置{/font}</pr_cksetup> | ||
| 77 | + <!-- | ||
| 78 | + 鼠标经过设置提示的文字(该定义为插件所用) | ||
| 79 | + --> | ||
| 80 | + </style> | ||
| 81 | + </ckplayer> | ||
| 0 | \ No newline at end of file | 82 | \ No newline at end of file |
src/main/webapp/static/assets/ckplayer/related.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<ckplayer> | ||
| 3 | +<title>{font color="#FFDD00" face="Microsoft YaHei,微软雅黑" size="14"}精彩视频推荐{/font}</title> | ||
| 4 | + <!--左上角的标题说明文字,支持html--> | ||
| 5 | + <area>600,400,0xFFDD00,20</area> | ||
| 6 | + <!-- | ||
| 7 | + 该插件在播放中的区域控制 | ||
| 8 | + 固定尺寸,精彩视频区域会固定大小并且保持剧中 | ||
| 9 | + 1:宽 | ||
| 10 | + 2:高 | ||
| 11 | + 3:边框色 | ||
| 12 | + 4:边框透明度 | ||
| 13 | + --> | ||
| 14 | + <image>120,90</image> | ||
| 15 | + <!--图片的宽,高--> | ||
| 16 | + <distance>150,175,100</distance> | ||
| 17 | + <!-- | ||
| 18 | + 1:横排图片之间的距离,前一个图片的左边到后一个图片的左边的距离 | ||
| 19 | + 2:竖排图片之间距离,上一个图片的上边到下一个图片的上边距离,这里需要特别注意,因为图片显示区域是总区域-40的高度,默认的即<area>的高400-40=360,所以比如你的图片想一列显示二个,则该参数需要设置成360/2=180 | ||
| 20 | + 3:文字距离图片上方的距离 | ||
| 21 | + 只要设置好这三个参数,图片的位置就可以固定住了 | ||
| 22 | + --> | ||
| 23 | + <rep_title>{a href="[url]" target="_blank"}{font color="#FFFFFF" face="新宋体"}[title]{/font}{/a}</rep_title> | ||
| 24 | + <!--标题替换规则--> | ||
| 25 | + <style>a{color:#FFFFFF;}a:hover{color:#FF0000;}</style> | ||
| 26 | + <!--文本样式--> | ||
| 27 | + <size>120,42,3</size> | ||
| 28 | + <!--文本的宽度,高度,行和行之间距离--> | ||
| 29 | + <relatedlist> | ||
| 30 | + <related> | ||
| 31 | + <img>temp/1.jpg</img> | ||
| 32 | + <url>http://www.ckplayer.com/</url> | ||
| 33 | + <title>1:这里调用的文件配置在ckplayer/related.xml里</title> | ||
| 34 | + </related> | ||
| 35 | + <related> | ||
| 36 | + <img>temp/2.jpg</img> | ||
| 37 | + <url>http://www.ckplayer.com/</url> | ||
| 38 | + <title>2:支持多页调用</title> | ||
| 39 | + </related> | ||
| 40 | + <related> | ||
| 41 | + <img>temp/3.jpg</img> | ||
| 42 | + <url>http://www.ckplayer.com/</url> | ||
| 43 | + <title>3:文本请保持在二行,不能多于三行,多于三行将不显示</title> | ||
| 44 | + </related> | ||
| 45 | + <related> | ||
| 46 | + <img>temp/4.jpg</img> | ||
| 47 | + <url>http://www.ckplayer.com/</url> | ||
| 48 | + <title>4:支持多行调用,多页调用</title> | ||
| 49 | + </related> | ||
| 50 | + <related> | ||
| 51 | + <img>temp/5.jpg</img> | ||
| 52 | + <url>http://www.ckplayer.com/</url> | ||
| 53 | + <title>5:感谢对ckplayer的支持</title> | ||
| 54 | + </related> | ||
| 55 | + <related> | ||
| 56 | + <img>temp/6.jpg</img> | ||
| 57 | + <url>http://www.ckplayer.com/</url> | ||
| 58 | + <title>6:最多两行,请不要超过二行</title> | ||
| 59 | + </related> | ||
| 60 | + <related> | ||
| 61 | + <img>temp/3.jpg</img> | ||
| 62 | + <url>http://www.ckplayer.com/</url> | ||
| 63 | + <title>7:这里调用的文件配置在ckplayer/related.xml里</title> | ||
| 64 | + </related> | ||
| 65 | + <related> | ||
| 66 | + <img>temp/5.jpg</img> | ||
| 67 | + <url>http://www.ckplayer.com/</url> | ||
| 68 | + <title>8:支持多页调用</title> | ||
| 69 | + </related> | ||
| 70 | + <related> | ||
| 71 | + <img>temp/4.jpg</img> | ||
| 72 | + <url>http://www.ckplayer.com/</url> | ||
| 73 | + <title>9:文本请保持在二行,不能多于三行,多于三行将不显示</title> | ||
| 74 | + </related> | ||
| 75 | + <related> | ||
| 76 | + <img>temp/1.jpg</img> | ||
| 77 | + <url>http://www.ckplayer.com/</url> | ||
| 78 | + <title>10:支持多行调用,多页调用</title> | ||
| 79 | + </related> | ||
| 80 | + <related> | ||
| 81 | + <img>temp/2.jpg</img> | ||
| 82 | + <url>http://www.ckplayer.com/</url> | ||
| 83 | + <title>11:感谢对ckplayer的支持</title> | ||
| 84 | + </related> | ||
| 85 | + <related> | ||
| 86 | + <img>temp/6.jpg</img> | ||
| 87 | + <url>http://www.ckplayer.com/</url> | ||
| 88 | + <title>12:最多两行,请不要超过二行</title> | ||
| 89 | + </related> | ||
| 90 | + <related> | ||
| 91 | + <img>temp/5.jpg</img> | ||
| 92 | + <url>http://www.ckplayer.com/</url> | ||
| 93 | + <title>13:这里调用的文件配置在ckplayer/related.xml里</title> | ||
| 94 | + </related> | ||
| 95 | + <related> | ||
| 96 | + <img>temp/4.jpg</img> | ||
| 97 | + <url>http://www.ckplayer.com/</url> | ||
| 98 | + <title>14:支持多页调用</title> | ||
| 99 | + </related> | ||
| 100 | + <related> | ||
| 101 | + <img>temp/6.jpg</img> | ||
| 102 | + <url>http://www.ckplayer.com/</url> | ||
| 103 | + <title>15:文本请保持在二行,不能多于三行,多于三行将不显示</title> | ||
| 104 | + </related> | ||
| 105 | + <related> | ||
| 106 | + <img>temp/3.jpg</img> | ||
| 107 | + <url>http://www.ckplayer.com/</url> | ||
| 108 | + <title>16:支持多行调用,多页调用</title> | ||
| 109 | + </related> | ||
| 110 | + <related> | ||
| 111 | + <img>temp/1.jpg</img> | ||
| 112 | + <url>http://www.ckplayer.com/</url> | ||
| 113 | + <title>17:感谢对ckplayer的支持</title> | ||
| 114 | + </related> | ||
| 115 | + <related> | ||
| 116 | + <img>temp/2.jpg</img> | ||
| 117 | + <url>http://www.ckplayer.com/</url> | ||
| 118 | + <title>18:最多两行,请不要超过二行</title> | ||
| 119 | + </related> | ||
| 120 | + </relatedlist> | ||
| 121 | +</ckplayer> | ||
| 0 | \ No newline at end of file | 122 | \ No newline at end of file |
src/main/webapp/static/assets/ckplayer/share.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<ckplayer> | ||
| 3 | + <share_html> | ||
| 4 | + {embed src="贵站网址,在ckplayer/share.xml里修改/ckplayer/ckplayer.swf" flashvars="[$share]" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" allowFullscreen="true" type="application/x-shockwave-flash"}{/embed} | ||
| 5 | + </share_html> | ||
| 6 | + <share_flash> | ||
| 7 | + 贵站网址/ckplayer/ckplayer.swf?[$share] | ||
| 8 | + </share_flash> | ||
| 9 | + <share_flashvars> | ||
| 10 | + f,my_url,my_pic,a | ||
| 11 | + </share_flashvars> | ||
| 12 | + <share_path>ckplayer/share/</share_path><!--分享图片的文件夹地址--> | ||
| 13 | + <share_replace> | ||
| 14 | + </share_replace> | ||
| 15 | + <share_permit>0</share_permit><!--是否有视听许可证,默认0没有,1是有--> | ||
| 16 | + <share_uuid> | ||
| 17 | + c25cf02c-1705-412d-bd4b-77a10b380f08 | ||
| 18 | + </share_uuid> | ||
| 19 | + <share_button> | ||
| 20 | + <share> | ||
| 21 | + <id>qqmb</id> | ||
| 22 | + <img>qq.png</img> | ||
| 23 | + <coordinate>20,50</coordinate> | ||
| 24 | + </share> | ||
| 25 | + <share> | ||
| 26 | + <id>sinaminiblog</id> | ||
| 27 | + <img>sina.png</img> | ||
| 28 | + <coordinate>101,50</coordinate> | ||
| 29 | + </share> | ||
| 30 | + <share> | ||
| 31 | + <id>qzone</id> | ||
| 32 | + <img>qzone.png</img> | ||
| 33 | + <coordinate>182,50</coordinate> | ||
| 34 | + </share> | ||
| 35 | + <share> | ||
| 36 | + <id>renren</id> | ||
| 37 | + <img>rr.png</img> | ||
| 38 | + <coordinate>263,50</coordinate> | ||
| 39 | + </share> | ||
| 40 | + <share> | ||
| 41 | + <id>kaixin001</id> | ||
| 42 | + <img>kaixin001.png</img> | ||
| 43 | + <coordinate>20,85</coordinate> | ||
| 44 | + </share> | ||
| 45 | + <share> | ||
| 46 | + <id>tianya</id> | ||
| 47 | + <img>tianya.png</img> | ||
| 48 | + <coordinate>101,85</coordinate> | ||
| 49 | + </share> | ||
| 50 | + <share> | ||
| 51 | + <id>feixin</id> | ||
| 52 | + <img>feixin.png</img> | ||
| 53 | + <coordinate>182,85</coordinate> | ||
| 54 | + </share> | ||
| 55 | + <share> | ||
| 56 | + <id>msn</id> | ||
| 57 | + <img>msn.png</img> | ||
| 58 | + <coordinate>263,85</coordinate> | ||
| 59 | + </share> | ||
| 60 | + </share_button> | ||
| 61 | +</ckplayer> | ||
| 0 | \ No newline at end of file | 62 | \ No newline at end of file |
src/main/webapp/static/assets/ckplayer/share/feixin.png
0 → 100644
2.16 KB
src/main/webapp/static/assets/ckplayer/share/google.png
0 → 100644
1.78 KB
src/main/webapp/static/assets/ckplayer/share/kaixin001.png
0 → 100644
2.55 KB
src/main/webapp/static/assets/ckplayer/share/msn.png
0 → 100644
1.91 KB
src/main/webapp/static/assets/ckplayer/share/qq.png
0 → 100644
1.83 KB
src/main/webapp/static/assets/ckplayer/share/qq2.png
0 → 100644
2.08 KB
src/main/webapp/static/assets/ckplayer/share/qzone.png
0 → 100644
2.08 KB
src/main/webapp/static/assets/ckplayer/share/rr.png
0 → 100644
3 KB
src/main/webapp/static/assets/ckplayer/share/sina.png
0 → 100644
2.59 KB
src/main/webapp/static/assets/ckplayer/share/sohu.png
0 → 100644
1.38 KB
src/main/webapp/static/assets/ckplayer/share/tianya.png
0 → 100644
2.32 KB
src/main/webapp/static/assets/ckplayer/style.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/cnlive/336x220.jpg
0 → 100644
9.06 KB
src/main/webapp/static/assets/cnlive/js/check.js
0 → 100644
| 1 | +function to_top(id) { | ||
| 2 | + $.ajax({ | ||
| 3 | + url : BASE+'/check/top/'+id, | ||
| 4 | + type : 'get', | ||
| 5 | + async : true, | ||
| 6 | + error : function() { | ||
| 7 | + alert('获取错误!'); | ||
| 8 | + }, | ||
| 9 | + success : function(data) { | ||
| 10 | + window.location.href="../list/1"; | ||
| 11 | + } | ||
| 12 | + }); | ||
| 13 | +} | ||
| 14 | + | ||
| 15 | +function to_pass(id) { | ||
| 16 | + $.ajax({ | ||
| 17 | + url : BASE+'/check/pass/'+id, | ||
| 18 | + type : 'get', | ||
| 19 | + async : true, | ||
| 20 | + error : function() { | ||
| 21 | + alert('获取错误!'); | ||
| 22 | + }, | ||
| 23 | + success : function(data) { | ||
| 24 | + window.location.href="../list/1"; | ||
| 25 | + } | ||
| 26 | + }); | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + | ||
| 0 | \ No newline at end of file | 31 | \ No newline at end of file |
src/main/webapp/static/assets/cnlive/js/player_m3u8.js
0 → 100644
| 1 | +var map = {}; | ||
| 2 | +//获取所有播放器span | ||
| 3 | +var foo= $("span[class='mailbox-attachment-icon has-img']"); | ||
| 4 | + $(foo).each(function() { | ||
| 5 | + var channel_id=this.id.split("_")[2]; | ||
| 6 | + var play_url= $("#play_url_"+channel_id).val(); | ||
| 7 | + var player_name=this.id; | ||
| 8 | + //初始化播放器对象 | ||
| 9 | + var player_handel="player_"+channel_id; | ||
| 10 | + | ||
| 11 | + player_handel=jwplayer(player_name).setup({ | ||
| 12 | + flashplayer:BASE+"/static/assets/jwplayer/jwplayer.flash.swf", | ||
| 13 | + file: play_url, | ||
| 14 | + image: BASE+"/static/assets/jwplayer/player.jpg", | ||
| 15 | + width: '155', | ||
| 16 | + height: '105', | ||
| 17 | + mute:true, | ||
| 18 | + autostart: true | ||
| 19 | + }); | ||
| 20 | + | ||
| 21 | + map["player_"+channel_id] = player_handel; | ||
| 22 | +}) | ||
| 23 | + | ||
| 24 | +function play(id){ | ||
| 25 | + var player=map["player_"+id]; | ||
| 26 | + if(player.getState() != 'PLAYING'){ | ||
| 27 | + player.play(true); | ||
| 28 | + $("#play_button_"+id).html("断开"); | ||
| 29 | + }else { | ||
| 30 | + player.play(false); | ||
| 31 | + player.stop(); | ||
| 32 | + $("#play_button_"+id).html("载入"); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | + | ||
| 0 | \ No newline at end of file | 38 | \ No newline at end of file |
target/classes/com/cnlive/mz/live/LiveUtils.class deleted
100644 → 0
No preview for this file type
target/classes/com/cnlive/mz/live/action/ActivityAction.class
No preview for this file type
target/classes/com/cnlive/mz/live/action/ChannelAction.class
No preview for this file type
target/classes/com/cnlive/mz/live/action/IndexAction.class
No preview for this file type
target/classes/com/cnlive/mz/live/aspect/ActionAspect.class
No preview for this file type
target/classes/com/cnlive/mz/live/aspect/AuthFilter.class
No preview for this file type
target/m2e-wtp/web-resources/META-INF/MANIFEST.MF
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 | -#Tue May 17 10:41:12 CST 2016 | 2 | +#Sun Jun 12 10:48:48 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 |
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.xml
| @@ -53,11 +53,6 @@ | @@ -53,11 +53,6 @@ | ||
| 53 | <artifactId>cnlive_live_model</artifactId> | 53 | <artifactId>cnlive_live_model</artifactId> |
| 54 | <version>0.0.1-SNAPSHOT</version> | 54 | <version>0.0.1-SNAPSHOT</version> |
| 55 | </dependency> | 55 | </dependency> |
| 56 | - <dependency> | ||
| 57 | - <groupId>com.cnlive</groupId> | ||
| 58 | - <artifactId>cnlive_media_tools</artifactId> | ||
| 59 | - <version>1.0.0</version> | ||
| 60 | - </dependency> | ||
| 61 | </dependencies> | 56 | </dependencies> |
| 62 | <packaging>war</packaging> | 57 | <packaging>war</packaging> |
| 63 | </project> | 58 | </project> |
target/test-classes/com/cnlive/live/web/AppTest.class deleted
100644 → 0
No preview for this file type