Commit 3167dc80d2994a93b546fedeeafa183f4dbc8aa7
1 parent
6d2d8bdf
ck
Showing
81 changed files
with
3682 additions
and
214 deletions
src/main/java/com/cnlive/mz/live/action/LiveAction.java
| ... | ... | @@ -119,6 +119,7 @@ public class LiveAction { |
| 119 | 119 | @Request.Post("/check/cut/{id}") |
| 120 | 120 | public Result cut(int id,Params params) throws UnsupportedEncodingException { |
| 121 | 121 | String live_url = params.getString("live_url"); |
| 122 | + String video_uuid = params.getString("uuid"); | |
| 122 | 123 | if(live_url.isEmpty()){ |
| 123 | 124 | return null; |
| 124 | 125 | }else{ |
| ... | ... | @@ -127,7 +128,8 @@ public class LiveAction { |
| 127 | 128 | System.out.println("streamName==="+streamName); |
| 128 | 129 | String accesskey = BaseUtil.getAccessKey(); |
| 129 | 130 | accesskey = java.net.URLEncoder.encode(accesskey,"utf-8"); |
| 130 | - String signature = BaseUtil.signature(streamName); | |
| 131 | + String add = "add"; | |
| 132 | + String signature = BaseUtil.signature(add,streamName); | |
| 131 | 133 | String del = "del"; |
| 132 | 134 | String delsignature = BaseUtil.signature(del,streamName); |
| 133 | 135 | String expire = BaseUtil.getTimestamp(); |
| ... | ... | @@ -139,6 +141,8 @@ public class LiveAction { |
| 139 | 141 | } catch (UnsupportedEncodingException e) { |
| 140 | 142 | e.printStackTrace(); |
| 141 | 143 | } |
| 144 | + // 直播通知 | |
| 145 | + //tLiveService.notify(video_uuid, "-1"); | |
| 142 | 146 | boolean flag = tCheckService.closeLive(id); |
| 143 | 147 | return new Result(flag); |
| 144 | 148 | } |
| ... | ... | @@ -207,4 +211,22 @@ public class LiveAction { |
| 207 | 211 | return jsonArrStr; |
| 208 | 212 | |
| 209 | 213 | } |
| 214 | + @Request.Get("/live/alllive/{page_number}") | |
| 215 | + public View liveList(int page_number) { | |
| 216 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | |
| 217 | + System.out.println(user_id); | |
| 218 | + Pager<TLive> tLive = tLiveService.getTLivePager(page_number, Constants.PAGE_SIZE); | |
| 219 | + return new View("live/all_live_management.jsp").data("tLive", tLive); | |
| 220 | + } | |
| 221 | + @Request.Post("/live/search/{page_number}") | |
| 222 | + public View search(int page_number,Params params) { | |
| 223 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | |
| 224 | + System.out.println(user_id); | |
| 225 | + System.out.println("...parmas..."+params); | |
| 226 | + String t_user_id = params.getString("search_user_id"); | |
| 227 | + String title = params.getString("search_title"); | |
| 228 | + Pager<TLive> tLive = tLiveService.getTLiveAllPager(page_number, Constants.PAGE_SIZE,t_user_id,title); | |
| 229 | + System.out.println(tLive); | |
| 230 | + return new View("live/all_live_management.jsp").data("tLive", tLive); | |
| 231 | + } | |
| 210 | 232 | } |
| 211 | 233 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/mz/live/action/VideoAction.java
| ... | ... | @@ -151,9 +151,10 @@ public class VideoAction { |
| 151 | 151 | @Request.Get("/video/view/{id}") |
| 152 | 152 | public View view(int id) { |
| 153 | 153 | TVideo tVideo = tVideoService.getVideoById(id); |
| 154 | + System.out.println("------"+tVideo); | |
| 154 | 155 | return new View("live/video_view.jsp").data("tVideo", tVideo); |
| 155 | 156 | } |
| 156 | - | |
| 157 | + | |
| 157 | 158 | @Request.Post("/api/video/one") |
| 158 | 159 | public ApiBean one(Params params) { |
| 159 | 160 | String app_access_key = params.getString("app_access_key"); | ... | ... |
src/main/java/com/cnlive/mz/live/rest/BaseUtil.java
| ... | ... | @@ -33,7 +33,6 @@ public class BaseUtil { |
| 33 | 33 | private static final String SECRET_KEY = "iqljE4WxQaSMeSd1QP+PPYSpvtK0uWyH0/r6tgi7"; |
| 34 | 34 | private static final String ACCESS_KEY = "I3TC8a4xboN9kSJnUIQh"; |
| 35 | 35 | |
| 36 | - | |
| 37 | 36 | /* |
| 38 | 37 | * 计算MD5+BASE64 |
| 39 | 38 | */ |
| ... | ... | @@ -65,9 +64,9 @@ public class BaseUtil { |
| 65 | 64 | Mac mac = Mac.getInstance("HmacSHA1"); |
| 66 | 65 | mac.init(signingKey); |
| 67 | 66 | byte[] rawHmac = mac.doFinal(data.getBytes()); |
| 68 | - //result = new String(Base64.encodeBase64(rawHmac, false), ENCODING); | |
| 69 | - //result = (new BASE64Encoder()).encode(rawHmac); | |
| 70 | - result = new String(Base64.encodeBase64(rawHmac),ENCODING); | |
| 67 | + // result = new String(Base64.encodeBase64(rawHmac, false), ENCODING); | |
| 68 | + // result = (new BASE64Encoder()).encode(rawHmac); | |
| 69 | + result = new String(Base64.encodeBase64(rawHmac), ENCODING); | |
| 71 | 70 | } catch (Exception e) { |
| 72 | 71 | throw new Error("Failed to generate HMAC : " + e.getMessage()); |
| 73 | 72 | } |
| ... | ... | @@ -76,43 +75,37 @@ public class BaseUtil { |
| 76 | 75 | |
| 77 | 76 | /** |
| 78 | 77 | * 获取当前时间戳 |
| 78 | + * | |
| 79 | 79 | * @return |
| 80 | 80 | */ |
| 81 | - public static String getTimestamp(){ | |
| 81 | + public static String getTimestamp() { | |
| 82 | 82 | DateFormat df = new SimpleDateFormat("yyyyMMdd"); |
| 83 | 83 | Date date = null; |
| 84 | 84 | try { |
| 85 | - date = df.parse("20160607"); | |
| 85 | + Calendar calendar = Calendar.getInstance(); | |
| 86 | + calendar.add(Calendar.DATE, +1); | |
| 87 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); | |
| 88 | + String motoday = sdf.format(calendar.getTime()); | |
| 89 | + date = df.parse(motoday); | |
| 86 | 90 | } catch (ParseException e) { |
| 87 | 91 | e.printStackTrace(); |
| 88 | 92 | } |
| 89 | 93 | Calendar cal = Calendar.getInstance(); |
| 90 | 94 | cal.setTime(date); |
| 91 | 95 | long timestamp = cal.getTimeInMillis(); |
| 92 | - System.out.println("------timestamp-----"+timestamp); | |
| 93 | - //return String.valueOf(timestamp).substring(0, 10); | |
| 94 | - Calendar calendar = Calendar.getInstance(); | |
| 95 | - calendar.add(Calendar.DATE,+1); | |
| 96 | - SimpleDateFormat sdf = new SimpleDateFormat("MMddHHmmss"); | |
| 97 | - String motoday = sdf.format(calendar.getTime()); | |
| 98 | - //Timestamp ts = new Timestamp(System.currentTimeMillis()); | |
| 99 | - long currentTime=Calendar.getInstance().getTimeInMillis(); | |
| 100 | - // System.out.println(ts+"---..ts..----"); | |
| 101 | - // Date date = new Date(); | |
| 102 | - // SimpleDateFormat sd = new SimpleDateFormat("MMddHHmmss"); | |
| 103 | - // String ss = sd.format(date); | |
| 104 | - return String.valueOf(timestamp); | |
| 105 | - //return motoday; | |
| 96 | + System.out.println("------timestamp-----" + timestamp); | |
| 97 | + return String.valueOf(timestamp); | |
| 106 | 98 | |
| 107 | 99 | } |
| 100 | + | |
| 108 | 101 | /** |
| 109 | - * 签名算法:signature 字符串格式,由三部分组成:GET+”\n”+Expire+”\n”+Resource | |
| 110 | - * 2016 0602171212 | |
| 102 | + * 签名算法:signature 字符串格式,由三部分组成:GET+”\n”+Expire+”\n”+Resource 2016 0602171212 | |
| 103 | + * | |
| 111 | 104 | * @return |
| 112 | - * @throws UnsupportedEncodingException | |
| 105 | + * @throws UnsupportedEncodingException | |
| 113 | 106 | */ |
| 114 | 107 | public static String signature(String streamName) throws UnsupportedEncodingException { |
| 115 | - | |
| 108 | + | |
| 116 | 109 | String method = "GET"; |
| 117 | 110 | String expire = BaseUtil.getTimestamp(); |
| 118 | 111 | String app = "live"; |
| ... | ... | @@ -122,34 +115,35 @@ public class BaseUtil { |
| 122 | 115 | methodadd = java.net.URLEncoder.encode(methodadd, "utf-8"); |
| 123 | 116 | name = java.net.URLEncoder.encode(name, "utf-8"); |
| 124 | 117 | System.out.println(expire + "---expire----"); |
| 125 | - String Resource = "app="+app+"&method="+methodadd+"&name=" + name; | |
| 126 | - //Resource = java.net.URLEncoder.encode(Resource, "utf-8"); | |
| 118 | + String Resource = "app=" + app + "&method=" + methodadd + "&name=" + name; | |
| 119 | + // Resource = java.net.URLEncoder.encode(Resource, "utf-8"); | |
| 127 | 120 | String stringToSign = method + "\n" + expire + "\n" + Resource; |
| 128 | - System.out.println("--stringToSign--"+stringToSign); | |
| 121 | + System.out.println("--stringToSign--" + stringToSign); | |
| 129 | 122 | // 2.计算 HMAC-SHA1 |
| 130 | 123 | String signature = HMACSha1(stringToSign, SECRET_KEY); |
| 131 | - System.out.println( "---signature---"+signature ); | |
| 124 | + System.out.println("---signature---" + signature); | |
| 132 | 125 | signature = java.net.URLEncoder.encode(signature, "utf-8"); |
| 133 | 126 | return signature; |
| 134 | 127 | } |
| 135 | - public static String signature(String methodNname,String streamName) throws UnsupportedEncodingException { | |
| 128 | + | |
| 129 | + public static String signature(String methodName, String streamName) throws UnsupportedEncodingException { | |
| 136 | 130 | |
| 137 | 131 | String method = "GET"; |
| 138 | 132 | String expire = BaseUtil.getTimestamp(); |
| 139 | 133 | String app = "live"; |
| 140 | - //String methodadd = methodNname; | |
| 141 | - //String name = streamName; | |
| 134 | + // String methodadd = methodNname; | |
| 135 | + // String name = streamName; | |
| 142 | 136 | app = java.net.URLEncoder.encode(app, "utf-8"); |
| 143 | - methodNname = java.net.URLEncoder.encode(methodNname, "utf-8"); | |
| 137 | + methodName = java.net.URLEncoder.encode(methodName, "utf-8"); | |
| 144 | 138 | streamName = java.net.URLEncoder.encode(streamName, "utf-8"); |
| 145 | 139 | System.out.println(expire + "---expire----"); |
| 146 | - String Resource = "app="+app+"&method="+methodNname+"&name=" + streamName; | |
| 147 | - //Resource = java.net.URLEncoder.encode(Resource, "utf-8"); | |
| 140 | + String Resource = "app=" + app + "&method=" + methodName + "&name=" + streamName; | |
| 141 | + // Resource = java.net.URLEncoder.encode(Resource, "utf-8"); | |
| 148 | 142 | String stringToSign = method + "\n" + expire + "\n" + Resource; |
| 149 | - System.out.println("--stringToSign--"+stringToSign); | |
| 143 | + System.out.println("--stringToSign--" + stringToSign); | |
| 150 | 144 | // 2.计算 HMAC-SHA1 |
| 151 | 145 | String signature = HMACSha1(stringToSign, SECRET_KEY); |
| 152 | - System.out.println( "---signature---"+signature ); | |
| 146 | + System.out.println("---signature---" + signature); | |
| 153 | 147 | signature = java.net.URLEncoder.encode(signature, "utf-8"); |
| 154 | 148 | return signature; |
| 155 | 149 | } |
| ... | ... | @@ -160,6 +154,7 @@ public class BaseUtil { |
| 160 | 154 | uuid = uuid.replaceAll("-", ""); |
| 161 | 155 | return uuid; |
| 162 | 156 | } |
| 157 | + | |
| 163 | 158 | public static String getAccessKey() { |
| 164 | 159 | return ACCESS_KEY; |
| 165 | 160 | } |
| ... | ... | @@ -263,26 +258,27 @@ public class BaseUtil { |
| 263 | 258 | /* |
| 264 | 259 | * http header 参数 |
| 265 | 260 | */ |
| 266 | -// String method = "GET"; | |
| 267 | -// String Expire = "1436976000"; | |
| 268 | -// String Resource = "nonce=4e1f2519c626cbfbab1520c255830c26&public=0&vdoid=12345"; | |
| 269 | -// String content_type = "application/json"; | |
| 270 | -// String path = realUrl.getFile(); | |
| 271 | -// String date = toGMTString(new Date()); | |
| 272 | -// // 1.对body做MD5+BASE64加密 | |
| 273 | -// // String bodyMd5 = MD5Base64(body); | |
| 274 | -// String stringToSign = method + "\n" + Expire + "\n" + Resource; | |
| 275 | -// // 2.计算 HMAC-SHA1 | |
| 276 | -// String signature = HMACSha1(stringToSign, ak_secret); | |
| 277 | -// // 3.得到 authorization header | |
| 278 | -// String authHeader = "Dataplus " + ak_id + ":" + signature; | |
| 261 | + // String method = "GET"; | |
| 262 | + // String Expire = "1436976000"; | |
| 263 | + // String Resource = | |
| 264 | + // "nonce=4e1f2519c626cbfbab1520c255830c26&public=0&vdoid=12345"; | |
| 265 | + // String content_type = "application/json"; | |
| 266 | + // String path = realUrl.getFile(); | |
| 267 | + // String date = toGMTString(new Date()); | |
| 268 | + // // 1.对body做MD5+BASE64加密 | |
| 269 | + // // String bodyMd5 = MD5Base64(body); | |
| 270 | + // String stringToSign = method + "\n" + Expire + "\n" + Resource; | |
| 271 | + // // 2.计算 HMAC-SHA1 | |
| 272 | + // String signature = HMACSha1(stringToSign, ak_secret); | |
| 273 | + // // 3.得到 authorization header | |
| 274 | + // String authHeader = "Dataplus " + ak_id + ":" + signature; | |
| 279 | 275 | // 打开和URL之间的连接 |
| 280 | 276 | URLConnection connection = realUrl.openConnection(); |
| 281 | 277 | // 设置通用的请求属性 |
| 282 | -// connection.setRequestProperty("accept", "json"); | |
| 283 | -// connection.setRequestProperty("content-type", content_type); | |
| 284 | -// connection.setRequestProperty("date", date); | |
| 285 | -// connection.setRequestProperty("Authorization", authHeader); | |
| 278 | + // connection.setRequestProperty("accept", "json"); | |
| 279 | + // connection.setRequestProperty("content-type", content_type); | |
| 280 | + // connection.setRequestProperty("date", date); | |
| 281 | + // connection.setRequestProperty("Authorization", authHeader); | |
| 286 | 282 | // 建立实际的连接 |
| 287 | 283 | connection.connect(); |
| 288 | 284 | // 定义 BufferedReader输入流来读取URL的响应 |
| ... | ... | @@ -329,23 +325,26 @@ public class BaseUtil { |
| 329 | 325 | |
| 330 | 326 | // String str = signature(); |
| 331 | 327 | // System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= |
| 332 | - | |
| 333 | - // 发送GET请求 | |
| 334 | - String url1 = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=iDPKaesXXW3A26CScNyjpNkzxZs%3D&accesskey=I3TC8a4xboPUMe5xlp22&expire=1483200000&app=live&method=add&stream=310166_863"; | |
| 335 | - System.out.println("response body:" +sendGet(url1, ACCESS_KEY, SECRET_KEY)); | |
| 336 | - | |
| 328 | + | |
| 329 | + // 发送GET请求 | |
| 330 | + String url1 = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=iDPKaesXXW3A26CScNyjpNkzxZs%3D&accesskey=I3TC8a4xboPUMe5xlp22&expire=1483200000&app=live&method=add&stream=310166_863"; | |
| 331 | + System.out.println("response body:" + sendGet(url1, ACCESS_KEY, SECRET_KEY)); | |
| 332 | + | |
| 337 | 333 | // long d = getTimestamp(); |
| 338 | 334 | // System.out.println(d); |
| 339 | 335 | |
| 340 | - //String str = signature(); | |
| 341 | - //System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | |
| 342 | - /*// 发送GET请求 | |
| 343 | - String ak_id1 = "fWUN8KDtJZJGo0ArQ4qo"; //用户ak | |
| 344 | - String ak_secret1 = "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // 用户ak_secret | |
| 345 | - String url1 = "http://cnlive.uplive.ks-cdn.com?signature=L2muBoImPzyvwyzfBtGXEu+wRNE=&accesskey=fWUN8KDtJZJGo0ArQ4qo&expire=1436976000&method=add&app=live&name=498122_57"; | |
| 346 | - System.out.println("response body:" +sendGet(url1, ak_id1, ak_secret1));*/ | |
| 347 | - //long d = getTimestamp(); | |
| 348 | - //System.out.println(d); | |
| 336 | + // String str = signature(); | |
| 337 | + // System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | |
| 338 | + /* | |
| 339 | + * // 发送GET请求 String ak_id1 = "fWUN8KDtJZJGo0ArQ4qo"; //用户ak String | |
| 340 | + * ak_secret1 = "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // | |
| 341 | + * 用户ak_secret String url1 = | |
| 342 | + * "http://cnlive.uplive.ks-cdn.com?signature=L2muBoImPzyvwyzfBtGXEu+wRNE=&accesskey=fWUN8KDtJZJGo0ArQ4qo&expire=1436976000&method=add&app=live&name=498122_57"; | |
| 343 | + * System.out.println("response body:" +sendGet(url1, ak_id1, | |
| 344 | + * ak_secret1)); | |
| 345 | + */ | |
| 346 | + // long d = getTimestamp(); | |
| 347 | + // System.out.println(d); | |
| 349 | 348 | |
| 350 | 349 | } |
| 351 | 350 | } | ... | ... |
src/main/webapp/pages/check/monitor.jsp
| ... | ... | @@ -4,14 +4,15 @@ |
| 4 | 4 | <html> |
| 5 | 5 | <head> |
| 6 | 6 | <style type="text/css"> |
| 7 | -.text-overflow{ | |
| 8 | -display:block;/*内联对象需加*/ | |
| 9 | -width:31em; | |
| 10 | -word-break:keep-all;/* 不换行 */ | |
| 11 | -white-space:nowrap;/* 不换行 */ | |
| 12 | -overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */ | |
| 13 | -text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/ | |
| 14 | -} | |
| 7 | +.text-overflow { | |
| 8 | + display: block; /*内联对象需加*/ | |
| 9 | + width: 31em; | |
| 10 | + word-break: keep-all; /* 不换行 */ | |
| 11 | + white-space: nowrap; /* 不换行 */ | |
| 12 | + overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */ | |
| 13 | + text-overflow: ellipsis; | |
| 14 | + /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/ | |
| 15 | +} | |
| 15 | 16 | </style> |
| 16 | 17 | <meta charset="UTF-8"> |
| 17 | 18 | <title>监审管理 |<f:message key="common.title" /></title> |
| ... | ... | @@ -52,21 +53,22 @@ text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ; |
| 52 | 53 | <div class="col-md-12" id="divShow_${item.id}"> |
| 53 | 54 | <div class="box box-success box-solid"> |
| 54 | 55 | <div class="box-header with-border"> |
| 55 | - <div class="text-overflow"> | |
| 56 | - <h3 class="box-title" id="hidId">${item.title}</h3></div> | |
| 56 | + <div class="text-overflow"> | |
| 57 | + <h3 class="box-title" id="hidId">${item.title}</h3> | |
| 58 | + </div> | |
| 57 | 59 | <div class="box-tools pull-right"> |
| 58 | 60 | <button class="btn btn-sm" id="play_button_${item.id}" |
| 59 | 61 | onclick="play(${item.id});">重新载入</button> |
| 60 | 62 | </div> |
| 61 | 63 | </div> |
| 62 | - <div id = "playId" class="box-body"> | |
| 63 | - <input type="hidden" name="play_url_${item.id}" | |
| 64 | + <div id="playId" class="box-body"> | |
| 65 | + <%-- <input type="hidden" name="play_url_${item.id}" | |
| 64 | 66 | id="play_url_${item.id}" value="${item.live_url}" /> <span |
| 65 | 67 | class="mailbox-attachment-icon has-img" |
| 66 | 68 | id="player_span_${item.id}"> <img |
| 67 | 69 | src="../../static/assets/dist/img/photo2.png" |
| 68 | 70 | alt="Attachment"> |
| 69 | - </span> | |
| 71 | + </span> --%> | |
| 70 | 72 | </div> |
| 71 | 73 | </div> |
| 72 | 74 | </div> |
| ... | ... | @@ -78,8 +80,10 @@ text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ; |
| 78 | 80 | <div class="box-body no-padding"> |
| 79 | 81 | <ul class="nav nav-pills nav-stacked"> |
| 80 | 82 | <li id="userId"><a><i class="fa fa-file-text-o"></i>用户ID:</a></li> |
| 81 | - <li id="title"><a><i class="fa fa-file-text-o"></i>TITLE: </a></li> | |
| 82 | - <li id="startTime"><a><i class="fa fa-file-text-o"></i>开播时间: </a></li> | |
| 83 | + <li id="title"><a><i class="fa fa-file-text-o"></i>TITLE: | |
| 84 | + </a></li> | |
| 85 | + <li id="startTime"><a><i class="fa fa-file-text-o"></i>开播时间: | |
| 86 | + </a></li> | |
| 83 | 87 | </ul> |
| 84 | 88 | </div> |
| 85 | 89 | </div> |
| ... | ... | @@ -98,22 +102,23 @@ text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ; |
| 98 | 102 | class="box ${item.check_sort eq null ? 'box-warning':'box-success'} box-solid"> |
| 99 | 103 | <div class="box-header with-border"> |
| 100 | 104 | <div class="text-overflow"> |
| 101 | - <h3 class="box-title">${item.title}</h3></div> | |
| 105 | + <h3 class="box-title">${item.title}</h3> | |
| 106 | + </div> | |
| 102 | 107 | <div class="box-tools pull-right"> |
| 103 | - <button class="btn btn-sm btn-danger" | |
| 108 | + <button class="btn btn-sm btn-danger" | |
| 104 | 109 | onclick="changePlay('${item.id}','${item.live_url}','${item.t_user_id}','${item.title}','${item.start_time}');">左</button> |
| 105 | 110 | <button class="btn btn-sm btn-danger" |
| 106 | 111 | onclick="to_pass(${item.id});">过</button> |
| 107 | 112 | <button class="btn btn-sm btn-danger" |
| 108 | 113 | onclick="to_top(${item.id});">顶</button> |
| 109 | 114 | <button class="btn btn-sm btn-danger" |
| 110 | - onclick="play_close('${item.id}','${item.live_url}');">断</button> | |
| 115 | + onclick="play_close('${item.id}','${item.live_url}','${item.uuid}');">断</button> | |
| 111 | 116 | </div> |
| 112 | 117 | </div> |
| 113 | - <div class="box-body" > | |
| 118 | + <div class="box-body"> | |
| 114 | 119 | <input type="hidden" name="play_url_${item.id}" |
| 115 | - id="play_url_${item.id}" value="${item.live_url}" /> <span | |
| 116 | - class="mailbox-attachment-icon has-img" | |
| 120 | + id="play_url_${item.id}" value="${item.live_url}" /> <span | |
| 121 | + class="mailbox-attachment-icon has-img" | |
| 117 | 122 | id="player_span_${item.id}"> <img |
| 118 | 123 | src="../../static/assets/dist/img/photo2.png" |
| 119 | 124 | alt="Attachment"> |
| ... | ... | @@ -133,4 +138,16 @@ text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ; |
| 133 | 138 | </div> |
| 134 | 139 | </div> |
| 135 | 140 | </body> |
| 141 | +<script type="text/javascript"> | |
| 142 | +jwplayer("playId").setup({ | |
| 143 | + file: "", | |
| 144 | + height: 260, | |
| 145 | + image: "/assets/myVideo.jpg", | |
| 146 | + autostart:true, | |
| 147 | + rtmp: { | |
| 148 | + bufferlength: 0.1 | |
| 149 | + }, | |
| 150 | + width: 370 | |
| 151 | +}); | |
| 152 | +</script> | |
| 136 | 153 | </html> |
| 137 | 154 | \ No newline at end of file | ... | ... |
src/main/webapp/pages/common/js.jsp
| ... | ... | @@ -32,6 +32,7 @@ |
| 32 | 32 | <script src="${BASE}/static/assets/plugins/fileinput/fileinput_locale_zh.js"></script> |
| 33 | 33 | |
| 34 | 34 | <!-------直播系统所需 js 文件--> |
| 35 | +<script src="${BASE}/static/assets/cnlive/js/all_live.js" type="text/javascript"></script> | |
| 35 | 36 | <script src="${BASE}/static/assets/cnlive/js/live.js" type="text/javascript"></script> |
| 36 | 37 | <script src="${BASE}/static/assets/cnlive/js/room.js" type="text/javascript"></script> |
| 37 | 38 | <script src="${BASE}/static/assets/cnlive/js/channel.js" type="text/javascript"></script> | ... | ... |
src/main/webapp/pages/live/all_live_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>直播活动管理<small class="label label-warning" style="display: none" | |
| 21 | + id="info_tab_span"><i class="fa fa-bell-o"></i></small> | |
| 22 | + </h1> | |
| 23 | + | |
| 24 | + <ol class="breadcrumb"> | |
| 25 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 26 | + <li class="active">活动管理</li> | |
| 27 | + </ol> | |
| 28 | + </section> | |
| 29 | + <!-- Main content --> | |
| 30 | + <section class="content"> | |
| 31 | + <div class="row"> | |
| 32 | + <div class="col-xs-12"> | |
| 33 | + <div class="box box-warning"> | |
| 34 | + <div class="box-header with-border"> | |
| 35 | + <h3 class="box-title"></h3> | |
| 36 | + <div class="box-tools"> | |
| 37 | + <div class="input-group"> | |
| 38 | + <form action="../search/1" method="post"> | |
| 39 | + <div class="input-group"> | |
| 40 | + <input type="text" name="search_user_id" id="search_user_id" | |
| 41 | + class="form-control input-sm" style="width: 150px;" | |
| 42 | + placeholder="用户id" /> | |
| 43 | + <input type="text" name="search_title" id="search_title" | |
| 44 | + class="form-control input-sm" style="width: 150px;" | |
| 45 | + placeholder="活动名称" /> | |
| 46 | + <button id="t_activity_search_btn" type="submit" | |
| 47 | + class="btn btn-sm btn-default"> | |
| 48 | + <i class="fa fa-search"></i>搜索 | |
| 49 | + </button> | |
| 50 | + </div> | |
| 51 | + </form> | |
| 52 | + </div> | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + <!-- /.box-header --> | |
| 56 | + <div class="box-body"> | |
| 57 | + <table class="table table-bordered"> | |
| 58 | + <tr> | |
| 59 | + <th>活动ID</th> | |
| 60 | + <th>用户ID</th> | |
| 61 | + <th>活动名称</th> | |
| 62 | + <th>开始时间</th> | |
| 63 | + <th>结束时间</th> | |
| 64 | + <th>状态</th> | |
| 65 | + <th>下线</th> | |
| 66 | + </tr> | |
| 67 | + <c:forEach var="item" items="${tLive.recordList}" | |
| 68 | + varStatus="stat"> | |
| 69 | + <tr> | |
| 70 | + <td>${item.id}</td> | |
| 71 | + <td>${item.t_user_id}</td> | |
| 72 | + <td>${item.title}</td> | |
| 73 | + <td><fmt:formatDate value="${item.start_time}" | |
| 74 | + pattern="yyyy-MM-dd HH:mm" /></td> | |
| 75 | + <td>${item.end_time}</td> | |
| 76 | + <td> | |
| 77 | + <c:if test="${item.t_status_id==0}"> | |
| 78 | + <span class="badge bg-green">未开始</span> | |
| 79 | + </c:if> <c:if test="${item.t_status_id==2}"> | |
| 80 | + <span class="badge bg-red">直播中</span> | |
| 81 | + </c:if> <c:if test="${item.t_status_id==1}"> | |
| 82 | + <span class="badge">直播结束</span> | |
| 83 | + </c:if> <c:if test="${item.t_status_id==-2}"> | |
| 84 | + <span class="badge">回放同步中</span> | |
| 85 | + </c:if> | |
| 86 | + </td> | |
| 87 | + | |
| 88 | + <td> | |
| 89 | + <button class="btn btn-danger btn-sm" | |
| 90 | + onclick="t_live_close('${item.id}','${item.live_url}');"> | |
| 91 | + <i class="fa fa-close"></i> | |
| 92 | + </button> | |
| 93 | + </td> | |
| 94 | + </tr> | |
| 95 | + </c:forEach> | |
| 96 | + </table> | |
| 97 | + </div> | |
| 98 | + <!-- /.box-body --> | |
| 99 | + <div class="box-footer clearfix"> | |
| 100 | + <center> | |
| 101 | + <tag:pager id="product_pager" pager="${tLive}" /> | |
| 102 | + </center> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + <%@ include file="/pages/common/bottom.jsp"%> | |
| 109 | + </div> | |
| 110 | + <%@ include file="/pages/common/js.jsp"%> | |
| 111 | +</body> | |
| 112 | +</html> | ... | ... |
src/main/webapp/pages/live/live_add.jsp
| ... | ... | @@ -42,11 +42,9 @@ |
| 42 | 42 | </section> |
| 43 | 43 | <!-- Main content --> |
| 44 | 44 | <section class="content"> |
| 45 | -<<<<<<< .merge_file_a05572 | |
| 45 | + | |
| 46 | 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 | |
| 47 | + | |
| 50 | 48 | <div class="row"> |
| 51 | 49 | <!-- right column --> |
| 52 | 50 | <div class="col-md-12"> |
| ... | ... | @@ -86,17 +84,12 @@ |
| 86 | 84 | </div> |
| 87 | 85 | </div> |
| 88 | 86 | <div class="form-group"> |
| 89 | -<<<<<<< .merge_file_a05572 | |
| 90 | - <label>海报 </label> | |
| 91 | - <div class="input-group"> | |
| 92 | - <span class="input-group-addon"><i | |
| 93 | - class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" name="input-22" accept="image/*" class="file-loading"> | |
| 94 | -======= | |
| 87 | + | |
| 95 | 88 | <label>封面海报 </label> |
| 96 | 89 | <div class="input-group"> |
| 97 | 90 | <span class="input-group-addon"><i |
| 98 | 91 | 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 | |
| 92 | + | |
| 100 | 93 | </div> |
| 101 | 94 | </div> |
| 102 | 95 | <div class="form-group"> |
| ... | ... | @@ -104,13 +97,10 @@ |
| 104 | 97 | <div class="box box-warning"> |
| 105 | 98 | <div class="box-body"> |
| 106 | 99 | <div class="form-group"> |
| 107 | -<<<<<<< .merge_file_a05572 | |
| 108 | - <select class="form-control" name="live_room_id" | |
| 109 | - id="live_room_id"> | |
| 110 | -======= | |
| 100 | + | |
| 111 | 101 | <select class="form-control" name="t_default_video_id" |
| 112 | 102 | id="t_default_video_id"> |
| 113 | ->>>>>>> .merge_file_a05280 | |
| 103 | + | |
| 114 | 104 | <c:forEach var="item" items="${tRooms}" |
| 115 | 105 | varStatus="stat"> |
| 116 | 106 | <option id="t_room_id_${item.id}" ${item.id==tLive.t_room_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option> |
| ... | ... | @@ -118,15 +108,13 @@ |
| 118 | 108 | </select> |
| 119 | 109 | </div> |
| 120 | 110 | </div> |
| 121 | - </div>> | |
| 111 | + </div> | |
| 122 | 112 | </div> |
| 123 | 113 | |
| 124 | 114 | <div class="form-group"> |
| 125 | -<<<<<<< .merge_file_a05572 | |
| 115 | + | |
| 126 | 116 | <label>活动简述 </label> |
| 127 | -======= | |
| 128 | - <label>活动简介 </label> | |
| 129 | ->>>>>>> .merge_file_a05280 | |
| 117 | + | |
| 130 | 118 | <div class="input-group"> |
| 131 | 119 | <span class="input-group-addon"><i |
| 132 | 120 | 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
| ... | ... | @@ -38,37 +38,31 @@ |
| 38 | 38 | <tr> |
| 39 | 39 | <th>名称</th> |
| 40 | 40 | <th>状态</th> |
| 41 | - <th>修改</th> | |
| 42 | - <th>删除</th> | |
| 41 | + <th>描述</th> | |
| 42 | + <th>详情</th> | |
| 43 | 43 | </tr> |
| 44 | 44 | <c:forEach var="item" items="${videos.recordList}" |
| 45 | 45 | varStatus="stat"> |
| 46 | 46 | <tr> |
| 47 | 47 | <td><a href="${BASE}/video/view/${item.id}">${item.title}</a> |
| 48 | 48 | </td> |
| 49 | - <td><c:if test="${item.state==0}"> | |
| 49 | + <td><c:if test="${item.state==205}"> | |
| 50 | 50 | <span class="badge bg-green">未开始</span> |
| 51 | - </c:if> <c:if test="${item.state==1}"> | |
| 51 | + </c:if> <c:if test="${item.state==207}"> | |
| 52 | 52 | <span class="badge bg-red">直播中</span> |
| 53 | - </c:if> <c:if test="${item.state==2}"> | |
| 53 | + </c:if> <c:if test="${item.state==302}"> | |
| 54 | 54 | <span class="badge">直播结束</span> |
| 55 | - </c:if> <c:if test="${item.state==3}"> | |
| 55 | + </c:if> <c:if test="${item.state==600}"> | |
| 56 | 56 | <span class="badge">回放同步中</span> |
| 57 | - </c:if> <c:if test="${item.state==4}"> | |
| 58 | - <span class="badge">同步完成</span> | |
| 59 | 57 | </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> | |
| 58 | + <td>${item.description} | |
| 65 | 59 | </td> |
| 66 | 60 | <td> |
| 67 | - <button class="btn btn-danger btn-sm" | |
| 68 | - onclick="t_live_delete(${item.id});"> | |
| 69 | - <i class="fa fa-close"></i> | |
| 61 | + <button class="btn btn-minier label-success" | |
| 62 | + onclick="t_live_xq(${item.id});">详情 | |
| 70 | 63 | </button> |
| 71 | 64 | </td> |
| 65 | + | |
| 72 | 66 | </tr> |
| 73 | 67 | </c:forEach> |
| 74 | 68 | </table> |
| ... | ... | @@ -76,7 +70,7 @@ |
| 76 | 70 | <!-- /.box-body --> |
| 77 | 71 | <div class="box-footer clearfix"> |
| 78 | 72 | <center> |
| 79 | - <tag:pager id="product_pager" pager="${tLive}" /> | |
| 73 | + <tag:pager id="product_pager" pager="${videos}" /> | |
| 80 | 74 | </center> |
| 81 | 75 | </div> |
| 82 | 76 | </div> | ... | ... |
src/main/webapp/pages/live/video_view.jsp
| 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> | |
| 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 | + | |
| 46 | + </tr> | |
| 47 | + <tr> | |
| 48 | + <td><b>id:</b></td> | |
| 49 | + <td>${tVideo.id}</td> | |
| 50 | + <td rowspan="6" align='center'><div id="player"></div></td> | |
| 51 | + </tr> | |
| 52 | + <tr> | |
| 53 | + <td><b>Name:</b></td> | |
| 54 | + <td colspan="1">${tVideo.name}</td> | |
| 55 | + </tr> | |
| 56 | + <tr> | |
| 57 | + <td><b>relation_id:</b></td> | |
| 58 | + <td colspan="1">${tVideo.relation_id}</td> | |
| 59 | + </tr> | |
| 60 | + | |
| 61 | + <tr> | |
| 62 | + <td><b>t_user_id:</b></td> | |
| 63 | + <td colspan="1">${tVideo.t_user_id}</td> | |
| 64 | + </tr> | |
| 65 | + <tr> | |
| 66 | + <td><b>t_app_id:</b></td> | |
| 67 | + <td colspan="1">${tVideo.name}</td> | |
| 68 | + </tr> | |
| 69 | + <tr> | |
| 70 | + <td><b>state:</b></td> | |
| 71 | + <td colspan="1">${tVideo.state}</td> | |
| 72 | + </tr> | |
| 73 | + <tr> | |
| 74 | + <td><b>custom_args:</b></td> | |
| 75 | + <td colspan="2">${tVideo.custom_args}</td> | |
| 76 | + </tr> | |
| 77 | + <tr> | |
| 78 | + <td><b>video_uuid:</b></td> | |
| 79 | + <td colspan="2">${tVideo.video_uuid}</td> | |
| 80 | + </tr> | |
| 81 | + <tr> | |
| 82 | + <td><b>create_time:</b></td> | |
| 83 | + <td colspan="2">${tVideo.create_time}</td> | |
| 84 | + </tr> | |
| 85 | + <tr> | |
| 86 | + <td><b>description:</b></td> | |
| 87 | + <td colspan="2">${tVideo.description}</td> | |
| 88 | + </tr> | |
| 89 | + <tr> | |
| 90 | + <td><b>play_url:</b></td> | |
| 91 | + <td colspan="2">${tVideo.play_url}</td> | |
| 92 | + </tr> | |
| 93 | + <tr> | |
| 94 | + <td><b>preview_image:</b></td> | |
| 95 | + <td colspan="2">${tVideo.preview_image}</td> | |
| 96 | + </tr> | |
| 97 | + <tr> | |
| 98 | + <td><b>direct:</b></td> | |
| 99 | + <td colspan="2">${tVideo.direct}</td> | |
| 100 | + </tr> | |
| 101 | + </table> | |
| 102 | + </div> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + <%@ include file="/pages/common/bottom.jsp"%> | |
| 109 | + </div> | |
| 110 | + <%@ include file="/pages/common/js.jsp"%> | |
| 111 | + <script src="${BASE}/static/assets/cnlive/js/player_6.js"></script> | |
| 112 | + </div> | |
| 113 | + </section> | |
| 114 | + </div> | |
| 115 | + </div> | |
| 116 | + <script type="text/javascript" src="../../pages/check/js/ckplayer.js" charset="utf-8"></script> | |
| 117 | + <!-- <script type="text/javascript" src="../../pages/check/js/offlights.js" charset="utf-8"></script> --> | |
| 118 | +<script type="text/javascript"> | |
| 119 | +/* jwplayer("player").setup({ | |
| 120 | + file: '${tVideo.play_url}', | |
| 121 | + height: 260, | |
| 122 | + image: "/assets/myVideo.jpg", | |
| 123 | + autostart:true, | |
| 124 | + rtmp: { | |
| 125 | + bufferlength: 0.1 | |
| 126 | + }, | |
| 127 | + width: 370 | |
| 128 | +}); */ | |
| 129 | + | |
| 130 | + var BASE_URL = "http://localhost:8080/cnlive_live_web/static/assets/ck/", | |
| 131 | + prefix = "http", | |
| 132 | + isHLS = true, | |
| 133 | + url = '${tVideo.play_url}'; | |
| 134 | + var isMobile = function () { | |
| 135 | + var check = false; | |
| 136 | + (function (a) { | |
| 137 | + if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) | |
| 138 | + check = true | |
| 139 | + })(navigator.userAgent || navigator.vendor || window.opera); | |
| 140 | + return check; | |
| 141 | + } | |
| 142 | + if (isMobile()){ | |
| 143 | + new ksVideo({ | |
| 144 | + container:"player", | |
| 145 | + url: url, | |
| 146 | + width:600, | |
| 147 | + height:200, | |
| 148 | + face:"mp4.png" | |
| 149 | + }); | |
| 150 | + } else { | |
| 151 | + var flashvars; | |
| 152 | + // 播放器参数说明地址:http://www.ckplayer.com/tool/help/29.htm | |
| 153 | + if (prefix == "http" && isHLS){ | |
| 154 | + flashvars = { | |
| 155 | + f : BASE_URL + 'ckplayer/m3u8.swf', | |
| 156 | + a : url || 'http://kssws.ks-cdn.com/20121218/abc.mp4-640x480-b211ebb6.mp4', | |
| 157 | + c : 0, | |
| 158 | + s : 4, | |
| 159 | + lv: 0//注意,是否锁定进度栏 0:不锁定,1:锁定。如果是直播,需设置lv:1 | |
| 160 | + } | |
| 161 | + } else if (prefix == "rtmp" || !isHLS){ | |
| 162 | + flashvars = { | |
| 163 | + f : url || 'http://kssws.ks-cdn.com/20121218/abc.mp4-640x480-b211ebb6.mp4', | |
| 164 | + p : 1, | |
| 165 | + c : 0, //调用配置方式 =0:调用ckplayer.js | |
| 166 | + lv: 0 | |
| 167 | + } | |
| 168 | + } | |
| 169 | + var params = { | |
| 170 | + bgcolor:'#FFF', | |
| 171 | + allowFullScreen:true, | |
| 172 | + allowScriptAccess:'always', | |
| 173 | + wmode:'transparent' | |
| 174 | + }; | |
| 175 | + CKobject.embed('http://localhost:8080/cnlive_live_web/static/assets/ck/ckplayer/ckplayer.swf','player','ckplayer_a1','400', '400', false, flashvars) | |
| 176 | + } | |
| 177 | +</script> | |
| 178 | +</body> | |
| 179 | + | |
| 180 | +</html> | ... | ... |
src/main/webapp/static/assets/ck/ckplayer/ckplayer.js
0 → 100644
| 1 | +/* | |
| 2 | +------------------------------------------------------------------------- | |
| 3 | + 说明: | |
| 4 | + 正式使用时可以把该文件的注释全部去掉,节省加载时间 | |
| 5 | + ckplayer6.7,有问题请访问http://www.ckplayer.com | |
| 6 | + 请注意,该文件为UTF-8编码,不需要改变编码即可使用于各种编码形式的网站内 | |
| 7 | +------------------------------------------------------------------------- | |
| 8 | +第一部分,加载插件 | |
| 9 | +以下为加载的插件部份 | |
| 10 | +插件的设置参数说明: | |
| 11 | + 1、插件名称 | |
| 12 | + 2、水平对齐方式(0左,1中,2右) | |
| 13 | + 3、垂直对齐方式(0上,1中,2下) | |
| 14 | + 4、水平方向位置偏移量 | |
| 15 | + 5、垂直方向位置偏移量 | |
| 16 | + 6、插件的等级,0=普通图片插件且跟随控制栏隐藏而隐藏,显示而显示,1=普通图片插件且永久显示,2=swf插件,默认显示,3=swf插件,默认隐藏,swf插件都可以交互 | |
| 17 | + 7、插件是否绑定在控制栏上,0不绑定,1绑定,当值是1的时候该插件将会随着控制栏一起隐藏或缓动 | |
| 18 | + 8、插件为swf并且可交互时,默认调用的类所在的包名称,详细说明可以到帮助手册里查看,默认无 | |
| 19 | + 插件名称不能相同,对此的详细说明请到网站查看 | |
| 20 | +*/ | |
| 21 | +function ckcpt() { | |
| 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; | |
| 27 | +} | |
| 28 | +/* | |
| 29 | +插件的定义结束 | |
| 30 | +以下是对播放器功能进行配置 | |
| 31 | +*/ | |
| 32 | +function ckstyle() { //定义总的风格 | |
| 33 | + var ck = { | |
| 34 | + cpath: '', | |
| 35 | + /* | |
| 36 | + 播放器风格压缩包文件的路径,默认的是style.swf | |
| 37 | + 如果调用不出来可以试着设置成绝对路径试试 | |
| 38 | + 如果不知道路径并且使用的是默认配置,可以直接留空,播放器会 | |
| 39 | + */ | |
| 40 | + language: '', | |
| 41 | + /*播放器所使用的语言配置文件,需要和播放器在同目录下,默认是language.xml*/ | |
| 42 | + flashvars: '', | |
| 43 | + /* | |
| 44 | + 这里是用来做为对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 | |
| 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*/ | |
| 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', | |
| 48 | + /* | |
| 49 | + 这是配置文件里比较重要的一个参数,共有N个功能控制参数,并且以后会继续的增加,各控制参数以英文逗号(,)隔开。下面列出各参数的说明: | |
| 50 | + 1、鼠标经过按钮是否使用手型,0普通鼠标,1手型鼠标,2是只有按钮手型,3是控制栏手型 | |
| 51 | + 2、是否支持单击暂停,0不支持,1是支持 | |
| 52 | + 3、是否支持双击全屏,0不支持,1是支持 | |
| 53 | + 4、在播放前置广告时是否同时加载视频,0不加载,1加载 | |
| 54 | + 5、广告显示的参考对象,0是参考视频区域,1是参考播放器区域 | |
| 55 | + 6、广告大小的调整方式,只针对swf和图片有效,视频是自动缩放的 | |
| 56 | + =0是自动调整大小,意思是说大的话就变小,小的话就变大 | |
| 57 | + =1是大的化变小,小的话不变 | |
| 58 | + =2是什么也不变,就这么大 | |
| 59 | + =3是跟参考对像(第5个控制)参数设置的一样宽高 | |
| 60 | + 7、前置广告播放顺序,0是顺序播放,1是随机播放,>1则随机取所有广告中的(N-1)个进行播放 | |
| 61 | + 8、对于视频广告是否采用修正,0是不使用,1是使用,如果是1,则用户在网速慢的情况下会按设定的倒计时进行播放广告,计时结束则放正片(比较人性化),设置成0的话,则强制播放完广告才能播放正片 | |
| 62 | + 9、是否开启滚动文字广告,0是不开启,1是开启且不使用关闭按钮,2是开启并且使用关闭按钮,开启后将在加载视频的时候加载滚动文字广告 | |
| 63 | + 10、视频的调整方式 | |
| 64 | + =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 65 | + =1是大的化变小,小的话不变 | |
| 66 | + =2是什么也不变,就这么大 | |
| 67 | + =3是跟参考对像(pm_video的设置)参数设置的一样宽高 | |
| 68 | + 11、是否在多视频时分段加载,0不是,1是 | |
| 69 | + 12、缩放视频时是否进行平滑处理,0不是,1是 | |
| 70 | + 13、视频缓冲时间,单位:毫秒,建议不超过300 | |
| 71 | + 14、初始图片调整方式( | |
| 72 | + =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 73 | + =1是大的化变小,小的话不变 | |
| 74 | + =2是什么也不变,就这么大 | |
| 75 | + =3是跟pm_video参数设置的一样宽高 | |
| 76 | + 15、暂停广告调整方式( | |
| 77 | + =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 78 | + =1是大的化变小,小的话不变 | |
| 79 | + =2是什么也不变,就这么大 | |
| 80 | + =3是跟pm_video参数设置的一样宽 | |
| 81 | + 16、暂停广告是否使用关闭广告设置,0不使用,1使用 | |
| 82 | + 17、缓冲时是否播放广告,0是不显示,1是显示并同时隐藏掉缓冲图标和进度,2是显示并不隐藏缓冲图标 | |
| 83 | + 18、是否支持键盘空格键控制播放和暂停0不支持,1支持 | |
| 84 | + 19、是否支持键盘左右方向键控制快进快退0不支持,1支持 | |
| 85 | + 20、是否支持键盘上下方向键控制音量0不支持,1支持 | |
| 86 | + 21、播放器返回js交互函数的等级,0-2,等级越高,返回的参数越多 | |
| 87 | + 0是返回少量常用交互 | |
| 88 | + 1返回播放器在播放的时候的参数,不返回广告之类的参数 | |
| 89 | + 2返回全部参数 | |
| 90 | + 3返回全部参数,并且在参数前加上"播放器ID->",用于多播放器的监听 | |
| 91 | + 22、快进和快退的秒数 | |
| 92 | + 23、界面上图片元素加载失败重新加载次数 | |
| 93 | + 24、开启加载皮肤压缩文件包的加载进度提示 | |
| 94 | + 25、使用隐藏控制栏时显示简单进度条的功能,0是不使用,1是使用,2是只在普通状态下使用 | |
| 95 | + 26、控制栏隐藏设置(0不隐藏,1全屏时隐藏,2都隐藏 | |
| 96 | + 27、控制栏隐藏延时时间,即在鼠标离开控制栏后多少毫秒后隐藏控制栏 | |
| 97 | + 28、左右滚动时是否采用无缝,默认0采用,1是不采用 | |
| 98 | + 29、0是正常状态,1是控制栏默认隐藏,播放状态下鼠标经过播放器显示控制栏,2是一直隐藏控制栏 | |
| 99 | + 30、在播放rtmp视频时暂停后点击播放是否采用重新链接的方式,这里一共分0-2三个等级 | |
| 100 | + 31、当采用网址形式(flashvars里s=1/2时)读取视频地址时是采用默认0=get方法,1=post方式 | |
| 101 | + 32、是否启用播放按钮和暂停按钮 | |
| 102 | + 33、是否启用中间暂停按钮 | |
| 103 | + 34、是否启用静音按钮 | |
| 104 | + 35、是否启用全屏按钮 | |
| 105 | + 36、是否启用进度调节栏,0不启用,1是启用,2是只能前进(向右拖动),3是只能后退,4是只能前进但能回到第一次拖动时的位置,5是看过的地方可以随意拖动, | |
| 106 | + 37、是否启用调节音量 | |
| 107 | + 38、计算时间的间隔,毫秒 | |
| 108 | + 39、前置logo至少显示的时间,单位:毫秒 | |
| 109 | + 40、前置视频广告的默认音量 | |
| 110 | + 41、当s=3/4时加载插件是否从压缩包里加载,0不是,1是 | |
| 111 | + 42、加载风格是否采用加密方式传送,该功能普通用户不能使用 | |
| 112 | + 43、在s=1/2时,调用地址里的地址是否是相对地址(相对于调用文件),0不是,1是 | |
| 113 | + */ | |
| 114 | + pm_bg: '0x000000,100,230,180', | |
| 115 | + /*播放器整体的背景配置,请注意,这里只是一个初始化的设置,如果需要真正的改动播放器的背景和最小宽高,需要在风格文件里找到相同的参数进行更改。 | |
| 116 | + 1、整体背景颜色 | |
| 117 | + 2、背景透明度 | |
| 118 | + 3、播放器最小宽度 | |
| 119 | + 4、播放器最小高度 | |
| 120 | + 这里只是初始化时的设置,最终加载完播放器后显示的效果需要在style.swf/style.xml里设置该参数 | |
| 121 | + */ | |
| 122 | + mylogo: null, | |
| 123 | + /* | |
| 124 | + 视频加载前显示的logo文件,不使用设置成null,即mylogo='null'; | |
| 125 | + */ | |
| 126 | + pm_mylogo: '1,1,-100,-55', | |
| 127 | + /* | |
| 128 | + 视频加载前显示的logo文件(mylogo参数的)的位置 | |
| 129 | + 本软件所有的四个参数控制位置的方式全部都是统一的意思,如下 | |
| 130 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 131 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 132 | + 3、水平偏移量,举例说明,如果第1个参数设置成0左对齐,第3个偏移量设置成10,就是离左边10个像素,第一个参数设置成2,偏移量如果设置的是正值就会移到播放器外面,只有设置成负值才行,设置成-1,按钮就会跑到播放器外面 | |
| 133 | + 4、垂直偏移量 | |
| 134 | + */ | |
| 135 | + logo: null, | |
| 136 | + /* | |
| 137 | + 默认右上角一直显示的logo,不使用设置成null,即logo='null'; | |
| 138 | + */ | |
| 139 | + pm_logo: '2,0,-100,20', | |
| 140 | + /* | |
| 141 | + 播放器右上角的logo的位置 | |
| 142 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 143 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 144 | + 3、水平偏移量 | |
| 145 | + 4、垂直偏移量 | |
| 146 | + 以下是播放器自带的二个插件 | |
| 147 | + */ | |
| 148 | + control_rel: 'related.swf,ckplayer/related.xml,0', | |
| 149 | + /* | |
| 150 | + 视频结束显示精彩视频的插件 | |
| 151 | + 1、视频播放结束后显示相关精彩视频的插件文件(注意,视频结束动作设置成3时(即var flashvars={e:3})有效), | |
| 152 | + 2、xml文件是调用精彩视频的示例文件,可以自定义文件类型(比如asp,php,jsp,.net只要输出的是xml格式就行),实际使用中一定要注意第二个参数的路径要正确 | |
| 153 | + 3、第三个参数是设置配置文件的编码,0是默认的utf-8,1是gbk2312 | |
| 154 | + */ | |
| 155 | + control_pv: 'Preview.swf,105,2000', | |
| 156 | + /* | |
| 157 | + 视频预览插件 | |
| 158 | + 1、插件文件名称(该插件和上面的精彩视频的插件都是放在风格压缩包里的) | |
| 159 | + 2、离进度栏的高(指的是插件的顶部离进度栏的位置) | |
| 160 | + 3、延迟时间(该处设置鼠标经过进度栏停顿多少毫秒后才显示插件) | |
| 161 | + 建议一定要设置延时时间,不然当鼠标在进度栏上划过的时候就会读取视频地址进行预览,很占资源 | |
| 162 | + */ | |
| 163 | + pm_repc: '', | |
| 164 | + /* | |
| 165 | + 视频地址替换符,该功能主要是用来做简单加密的功能,使用方法很简单,请注意,只针对f值是视频地址的时候有效,其它地方不能使用。具体的请查看http://www.ckplayer.com/manual.php?id=4#title_25 | |
| 166 | + */ | |
| 167 | + pm_spac: '|', | |
| 168 | + /* | |
| 169 | + 视频地址间隔符,这里主要是播放多段视频时使用普通调用方式或网址调用方式时使用的。默认使用|,如果视频地址里本身存在|的话需要另外设置一个间隔符,注意,即使只有一个视频也需要设置。另外在使用rtmp协议播放视频的时候,如果视频存在多级目录的话,这里要改成其它的符号,因为rtmp协议的视频地址多级的话也需要用到|隔开流地址和实例地址 | |
| 170 | + */ | |
| 171 | + pm_fpac: 'file->f', | |
| 172 | + /* | |
| 173 | + 该参数的功能是把自定义的flashvars里的变量替换成ckplayer里对应的变量,默认的参数的意思是把flashvars里的file值替换成f值,因为ckplayer里只认f值,多个替换之间用竖线隔开 | |
| 174 | + */ | |
| 175 | + pm_advtime: '2,0,-110,10,0,300,0', | |
| 176 | + /* | |
| 177 | + 前置广告倒计时文本位置,播放前置 广告时有个倒计时的显示文本框,这里是设置该文本框的位置和宽高,对齐方式的。一共7个参数,分别表示: | |
| 178 | + 1、水平对齐方式,0是左对齐,1是中间对齐,2是右对齐 | |
| 179 | + 2、垂直对齐方式,0是上对齐,1是中间对齐,2是低部对齐 | |
| 180 | + 3、水平位置偏移量 | |
| 181 | + 4、垂直位置偏移量 | |
| 182 | + 5、文字对齐方式,0是左对齐,1是中间对齐,2是右对齐,3是默认对齐 | |
| 183 | + 6、文本框宽席 | |
| 184 | + 7、文本框高度 | |
| 185 | + */ | |
| 186 | + pm_advstatus: '1,2,2,-200,-40', | |
| 187 | + /* | |
| 188 | + 前置广告静音按钮,静音按钮只在是视频广告时显示,当然也可以控制不显示 | |
| 189 | + 1、是否显示0不显示,1显示 | |
| 190 | + 2、水平对齐方式 | |
| 191 | + 3、垂直对齐方式 | |
| 192 | + 4、水平偏移量 | |
| 193 | + 5、垂直偏移量 | |
| 194 | + */ | |
| 195 | + pm_advjp: '1,1,2,2,-100,-40', | |
| 196 | + /* | |
| 197 | + 前置广告跳过广告按钮的位置 | |
| 198 | + 1、是否显示0不显示,1是显示 | |
| 199 | + 2、跳过按钮触发对象(值0/1,0是直接跳转,1是触发js:function ckadjump(){}) | |
| 200 | + 3、水平对齐方式 | |
| 201 | + 4、垂直对齐方式 | |
| 202 | + 5、水平偏移量 | |
| 203 | + 6、垂直偏移量 | |
| 204 | + */ | |
| 205 | + pm_padvc: '2,0,-10,-10', | |
| 206 | + /* | |
| 207 | + 暂停广告的关闭按钮的位置 | |
| 208 | + 1、水平对齐方式 | |
| 209 | + 2、垂直对齐方式 | |
| 210 | + 3、水平偏移量 | |
| 211 | + 4、垂直偏移量 | |
| 212 | + */ | |
| 213 | + pm_advms: '2,2,-46,-56', | |
| 214 | + /* | |
| 215 | + 滚动广告关闭按钮位置 | |
| 216 | + 1、水平对齐方式 | |
| 217 | + 2、垂直对齐方式 | |
| 218 | + 3、水平偏移量 | |
| 219 | + 4、垂直偏移量 | |
| 220 | + */ | |
| 221 | + pm_zip: '1,1,-20,-8,1,0,0', | |
| 222 | + /* | |
| 223 | + 加载皮肤压缩包时提示文字的位置 | |
| 224 | + 1、水平对齐方式,0是左对齐,1是中间对齐,2是右对齐 | |
| 225 | + 2、垂直对齐方式,0是上对齐,1是中间对齐,2是低部对齐 | |
| 226 | + 3、水平位置偏移量 | |
| 227 | + 4、垂直位置偏移量 | |
| 228 | + 5、文字对齐方式,0是左对齐,1是中间对齐,2是右对齐,3是默认对齐 | |
| 229 | + 6、文本框宽席 | |
| 230 | + 7、文本框高度 | |
| 231 | + */ | |
| 232 | + //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', | |
| 234 | + /* | |
| 235 | + 滚动广告的控制,要使用的话需要在setup里的第9个参数设置成1 | |
| 236 | + 这里分二种情况,前六个参数是定位控制,第7个参数是设置定位方式(0:相对定位,1:绝对定位) | |
| 237 | + 第一种情况:第7个参数是0的时候,相对定位,就是播放器长宽变化的时候,控制栏也跟着变 | |
| 238 | + 1、默认1:中间对齐 | |
| 239 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 240 | + 3、离左边的距离 | |
| 241 | + 4、Y轴偏移量 | |
| 242 | + 5、离右边的距离 | |
| 243 | + 6、高度 | |
| 244 | + 7、定位方式 | |
| 245 | + 第二种情况:第7个参数是1的时候,绝对定位,就是播放器长宽变化的时候,控制栏不跟着变,这种方式一般使用在控制栏大小不变的时候 | |
| 246 | + 1、左中右对齐方式(0是左,1是中间,2是右) | |
| 247 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 248 | + 3、x偏移量 | |
| 249 | + 4、y偏移量 | |
| 250 | + 5、宽度 | |
| 251 | + 6、高度 | |
| 252 | + 7、定位方式 | |
| 253 | + 以上是前7个参数的作用 | |
| 254 | + 8、是文字广告的背景色 | |
| 255 | + 9、置背景色的透明度 | |
| 256 | + 10、控制滚动方向,0是水平滚动(包括左右),1是上下滚动(包括向上和向下) | |
| 257 | + 11、移动的单位时长,即移动单位像素所需要的时长,毫秒 | |
| 258 | + 12、移动的单位像素,正数同左/上,负数向右/下 | |
| 259 | + 13、是行高,这个在设置向上或向下滚动的时候有用处 | |
| 260 | + 14、控制向上或向下滚动时每次停止的时间 | |
| 261 | + */ | |
| 262 | + pm_glowfilter:'1,0x01485d, 100, 6, 3, 10, 1, 0, 0', | |
| 263 | + /*滚动文字广告是否采用发光滤镜 | |
| 264 | + 1、是否使用发光滤镜,0是不采用,1是使用 | |
| 265 | + 2、(default = 0xFF0000) — 光晕颜色,采用十六进制格式 0xRRGGBB。 默认值为 0xFF0000 | |
| 266 | + 3、(default = 100) — 颜色的 Alpha 透明度值。 有效值为 0 到 100。 例如,25 设置透明度为 25% | |
| 267 | + 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)经过优化,呈现速度比其它值更快 | |
| 269 | + 6、(default = 2) — 印记或跨页的强度。 该值越高,压印的颜色越深,而且发光与背景之间的对比度也越强。 有效值为 0 到 255 | |
| 270 | + 7、(default = 1) — 应用滤镜的次数 | |
| 271 | + 8、(default = 0) — 指定发光是否为内侧发光。 值 1 指定发光是内侧发光。 值 0 指定发光是外侧发光(对象外缘周围的发光) | |
| 272 | + 9、(default = 0) — 指定对象是否具有挖空效果。 值为 1 将使对象的填充变为透明,并显示文档的背景颜色 | |
| 273 | + */ | |
| 274 | + advmarquee: escape('{a href="http://www.ckplayer.com"}{font color="#FFFFFF" size="12"}这里可以放文字广告,播放器默认使用这里设置的广告内容,如果不想在这里使用可以清空这里的内容,如果想在页面中实时定义滚动文字广告内容,可以清空这里的内容,然后在页面中设置广告函数。{/font}{/a}'), | |
| 275 | + /* | |
| 276 | + 该处是滚动文字广告的内容,如果不想在这里设置,就把这里清空并且在页面中使用js的函数定义function ckmarqueeadv(){return '广告内容'} | |
| 277 | + */ | |
| 278 | + mainfuntion:'', | |
| 279 | + /* | |
| 280 | + 当flashvars里s=3/4时,调用的函数包名称,默认为空,调用时间轴上的函数setAppObj | |
| 281 | + */ | |
| 282 | + flashplayer:'', | |
| 283 | + /* | |
| 284 | + 当flashvars里的s=3/4时,也可以把swf文件放在这里 | |
| 285 | + */ | |
| 286 | + calljs:'ckplayer_status,ckadjump,playerstop,ckmarqueeadv', | |
| 287 | + /* | |
| 288 | + 跳过广告和播放结束时调用的js函数 | |
| 289 | + */ | |
| 290 | + myweb: escape(''), | |
| 291 | + /* | |
| 292 | + ------------------------------------------------------------------------------------------------------------------ | |
| 293 | + 以下内容部份是和插件相关的配置,请注意,自定义插件以及其配置的命名方式要注意,不要和系统的相重复,不然就会替换掉系统的相关设置,删除相关插件的话也可以同时删除相关的配置 | |
| 294 | + ------------------------------------------------------------------------------------------------------------------ | |
| 295 | + 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 | |
| 296 | + ------------------------------------------------------------------------------------------------------------------ | |
| 297 | + */ | |
| 298 | + cpt_lights: '1', | |
| 299 | + /* | |
| 300 | + 该处定义是否使用开关灯,和right.swf插件配合作用,使用开灯效果时调用页面的js函数function closelights(){}; | |
| 301 | + */ | |
| 302 | + cpt_share: 'ckplayer/share.xml', | |
| 303 | + /* | |
| 304 | + 分享插件调用的配置文件地址 | |
| 305 | + 调用插件开始 | |
| 306 | + */ | |
| 307 | + cpt_list: ckcpt() | |
| 308 | + /* | |
| 309 | + ckcpt()是本文件最上方的定义插件的函数 | |
| 310 | + */ | |
| 311 | + } | |
| 312 | + return ck; | |
| 313 | +} | |
| 314 | +/* | |
| 315 | +html5部分开始 | |
| 316 | +以下代码是支持html5的,如果你不需要,可以删除。 | |
| 317 | +html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛交流更改心得 | |
| 318 | +*/ | |
| 319 | +(function() { | |
| 320 | + var CKobject = { | |
| 321 | + _K_: function(d){return document.getElementById(d);}, | |
| 322 | + _T_: false, | |
| 323 | + _M_: false, | |
| 324 | + _G_: false, | |
| 325 | + _Y_: false, | |
| 326 | + _I_: null, | |
| 327 | + _J_: 0, | |
| 328 | + _O_: {}, | |
| 329 | + uaMatch:function(u,rMsie,rFirefox,rOpera,rChrome,rSafari,rSafari2,mozilla,mobile){ | |
| 330 | + var match = rMsie.exec(u); | |
| 331 | + if (match != null) { | |
| 332 | + return { | |
| 333 | + b: 'IE', | |
| 334 | + v: match[2] || '0' | |
| 335 | + } | |
| 336 | + } | |
| 337 | + match = rFirefox.exec(u); | |
| 338 | + if (match != null) { | |
| 339 | + return { | |
| 340 | + b: match[1] || '', | |
| 341 | + v: match[2] || '0' | |
| 342 | + } | |
| 343 | + } | |
| 344 | + match = rOpera.exec(u); | |
| 345 | + if (match != null) { | |
| 346 | + return { | |
| 347 | + b: match[1] || '', | |
| 348 | + v: match[2] || '0' | |
| 349 | + } | |
| 350 | + } | |
| 351 | + match = rChrome.exec(u); | |
| 352 | + if (match != null) { | |
| 353 | + return { | |
| 354 | + b: match[1] || '', | |
| 355 | + v: match[2] || '0' | |
| 356 | + } | |
| 357 | + } | |
| 358 | + match = rSafari.exec(u); | |
| 359 | + if (match != null) { | |
| 360 | + return { | |
| 361 | + b: match[2] || '', | |
| 362 | + v: match[1] || '0' | |
| 363 | + } | |
| 364 | + } | |
| 365 | + match = rSafari2.exec(u); | |
| 366 | + if (match != null) { | |
| 367 | + return { | |
| 368 | + b: match[1] || '', | |
| 369 | + v: match[2] || '0' | |
| 370 | + } | |
| 371 | + } | |
| 372 | + match = mozilla.exec(u); | |
| 373 | + if (match != null) { | |
| 374 | + return { | |
| 375 | + b: match[1] || '', | |
| 376 | + v: match[2] || '0' | |
| 377 | + } | |
| 378 | + } | |
| 379 | + match = mobile.exec(u); | |
| 380 | + if (match != null) { | |
| 381 | + return { | |
| 382 | + b: match[1] || '', | |
| 383 | + v: match[2] || '0' | |
| 384 | + } | |
| 385 | + } | |
| 386 | + else { | |
| 387 | + return { | |
| 388 | + b: 'unknown', | |
| 389 | + v: '0' | |
| 390 | + } | |
| 391 | + } | |
| 392 | + }, | |
| 393 | + browser: function() { | |
| 394 | + var u = navigator.userAgent, | |
| 395 | + rMsie = /(msie\s|trident.*rv:)([\w.]+)/, | |
| 396 | + rFirefox = /(firefox)\/([\w.]+)/, | |
| 397 | + rOpera = /(opera).+version\/([\w.]+)/, | |
| 398 | + rChrome = /(chrome)\/([\w.]+)/, | |
| 399 | + rSafari = /version\/([\w.]+).*(safari)/, | |
| 400 | + rSafari2 = /(safari)\/([\w.]+)/, | |
| 401 | + mozilla = /(mozilla)\/([\w.]+)/, | |
| 402 | + mobile = /(mobile)\/([\w.]+)/; | |
| 403 | + var c = u.toLowerCase(); | |
| 404 | + var d = this.uaMatch(c,rMsie,rFirefox,rOpera,rChrome,rSafari,rSafari2,mozilla,mobile); | |
| 405 | + if (d.b) { | |
| 406 | + b = d.b; | |
| 407 | + v = d.v; | |
| 408 | + } | |
| 409 | + return {B: b, V: v}; | |
| 410 | + }, | |
| 411 | + Platform: function() { | |
| 412 | + var w = ''; | |
| 413 | + var u = navigator.userAgent, | |
| 414 | + app = navigator.appVersion; | |
| 415 | + var b = { | |
| 416 | + iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, | |
| 417 | + iPad: u.indexOf('iPad') > -1, | |
| 418 | + ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), | |
| 419 | + android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, | |
| 420 | + webKit: u.indexOf('AppleWebKit') > -1, | |
| 421 | + trident: u.indexOf('Trident') > -1, | |
| 422 | + gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, | |
| 423 | + presto: u.indexOf('Presto') > -1, | |
| 424 | + mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), | |
| 425 | + webApp: u.indexOf('Safari') == -1 | |
| 426 | + }; | |
| 427 | + for (var k in b) { | |
| 428 | + if (b[k]) { | |
| 429 | + w = k; | |
| 430 | + break; | |
| 431 | + } | |
| 432 | + } | |
| 433 | + return w; | |
| 434 | + }, | |
| 435 | + isHTML5:function(){ | |
| 436 | + return !!document.createElement('video').canPlayType; | |
| 437 | + }, | |
| 438 | + getType:function(){ | |
| 439 | + return this._T_; | |
| 440 | + }, | |
| 441 | + getVideo: function() { | |
| 442 | + var v = ''; | |
| 443 | + var s = this._E_['v']; | |
| 444 | + if (s && s.length>1) { | |
| 445 | + for (var i = 0; i < s.length; i++) { | |
| 446 | + var a = s[i].split('->'); | |
| 447 | + if (a.length >= 1 && a[0] != '') { | |
| 448 | + v += '<source src="' + a[0] + '"'; | |
| 449 | + } | |
| 450 | + if (a.length >= 2 && a[1] != '') { | |
| 451 | + v += ' type="' + a[1] + '"'; | |
| 452 | + } | |
| 453 | + v += '>'; | |
| 454 | + } | |
| 455 | + } | |
| 456 | + return v; | |
| 457 | + }, | |
| 458 | + getVars: function(k) { | |
| 459 | + var o=this._A_; | |
| 460 | + if (typeof(o) == 'undefined') { | |
| 461 | + return null; | |
| 462 | + } | |
| 463 | + if (k in o) { | |
| 464 | + return o[k]; | |
| 465 | + } else { | |
| 466 | + return null; | |
| 467 | + } | |
| 468 | + }, | |
| 469 | + getParams: function() { | |
| 470 | + var p = ''; | |
| 471 | + if (this._A_) { | |
| 472 | + if (parseInt(this.getVars('p')) == 1) { | |
| 473 | + p += ' autoplay="autoplay"'; | |
| 474 | + } | |
| 475 | + if (parseInt(this.getVars('e')) == 1) { | |
| 476 | + p += ' loop="loop"'; | |
| 477 | + } | |
| 478 | + if (parseInt(this.getVars('p')) == 2) { | |
| 479 | + p += ' preload="metadata"'; | |
| 480 | + } | |
| 481 | + if (this.getVars('i')) { | |
| 482 | + p += ' poster="' + this.getVars('i') + '"'; | |
| 483 | + } | |
| 484 | + } | |
| 485 | + return p; | |
| 486 | + }, | |
| 487 | + getpath: function(z) { | |
| 488 | + var f='CDEFGHIJKLMNOPQRSTUVWXYZcdefghijklmnopqrstuvwxyz'; | |
| 489 | + var w=z.substr(0,1); | |
| 490 | + if(f.indexOf(w)>-1 && (z.substr(0,4)==w+'://' || z.substr(0,4)==w+':\\')){ | |
| 491 | + return z; | |
| 492 | + } | |
| 493 | + var d = unescape(window.location.href).replace('file:///', ''); | |
| 494 | + var k = parseInt(document.location.port); | |
| 495 | + var u = document.location.protocol + '//' + document.location.hostname; | |
| 496 | + var l = '', | |
| 497 | + e = '', | |
| 498 | + t = ''; | |
| 499 | + var s = 0; | |
| 500 | + var r = unescape(z).split('//'); | |
| 501 | + if (r.length > 0) { | |
| 502 | + l = r[0] + '//' | |
| 503 | + } | |
| 504 | + var h = 'http|https|ftp|rtsp|mms|ftp|rtmp|file'; | |
| 505 | + var a = h.split('|'); | |
| 506 | + if (k != 80 && k) { | |
| 507 | + u += ':' + k; | |
| 508 | + } | |
| 509 | + for (i = 0; i < a.length; i++) { | |
| 510 | + if ((a[i] + '://') == l) { | |
| 511 | + s = 1; | |
| 512 | + break; | |
| 513 | + } | |
| 514 | + } | |
| 515 | + if (s == 0) { | |
| 516 | + if (z.substr(0, 1) == '/') { | |
| 517 | + t = u + z; | |
| 518 | + } else { | |
| 519 | + e = d.substring(0, d.lastIndexOf('/') + 1).replace('\\', '/'); | |
| 520 | + var w = z.replace('../', './'); | |
| 521 | + var u = w.split('./'); | |
| 522 | + var n = u.length; | |
| 523 | + var r = w.replace('./', ''); | |
| 524 | + var q = e.split('/'); | |
| 525 | + var j = q.length - n; | |
| 526 | + for (i = 0; i < j; i++) { | |
| 527 | + t += q[i] + '/'; | |
| 528 | + } | |
| 529 | + t += r; | |
| 530 | + } | |
| 531 | + } else { | |
| 532 | + t = z; | |
| 533 | + } | |
| 534 | + return t; | |
| 535 | + }, | |
| 536 | + getXhr: function() { | |
| 537 | + var x; | |
| 538 | + try { | |
| 539 | + x = new ActiveXObject('Msxml2.XMLHTTP'); | |
| 540 | + } catch(e) { | |
| 541 | + try { | |
| 542 | + x = new ActiveXObject('Microsoft.XMLHTTP'); | |
| 543 | + } catch(e) { | |
| 544 | + x = false; | |
| 545 | + } | |
| 546 | + } | |
| 547 | + if (!x && typeof XMLHttpRequest != 'undefined') { | |
| 548 | + x = new XMLHttpRequest(); | |
| 549 | + } | |
| 550 | + return x; | |
| 551 | + }, | |
| 552 | + getX: function(){ | |
| 553 | + var f='ckstyle()'; | |
| 554 | + if (this.getVars('x') && parseInt(this.getVars('c'))!=1 ) { | |
| 555 | + f=this.getVars('x')+'()'; | |
| 556 | + } | |
| 557 | + try { | |
| 558 | + if (typeof(eval(f)) == 'object') { | |
| 559 | + this._X_ = eval(f); | |
| 560 | + } | |
| 561 | + } catch(e) { | |
| 562 | + try { | |
| 563 | + if (typeof(eval(ckstyle)) == 'object') { | |
| 564 | + this._X_ = ckstyle(); | |
| 565 | + } | |
| 566 | + } catch(e) { | |
| 567 | + this._X_ = ckstyle(); | |
| 568 | + } | |
| 569 | + } | |
| 570 | + }, | |
| 571 | + getSn: function(s, n) { | |
| 572 | + if(n>=0){ | |
| 573 | + return this._X_[s].split(',')[n]; | |
| 574 | + } | |
| 575 | + else{ | |
| 576 | + return this._X_[s]; | |
| 577 | + } | |
| 578 | + }, | |
| 579 | + getUrl: function(L, B) { | |
| 580 | + var b = ['get', 'utf-8']; | |
| 581 | + if (L && L.length == 2) { | |
| 582 | + var a = L[0]; | |
| 583 | + var c = L[1].split('/'); | |
| 584 | + if (c.length >= 2) { | |
| 585 | + b[0] = c[1]; | |
| 586 | + } | |
| 587 | + if (c.length >= 3) { | |
| 588 | + b[1] = c[2]; | |
| 589 | + } | |
| 590 | + this.ajax(b[0], b[1], a, | |
| 591 | + function(s) { | |
| 592 | + var C = CKobject; | |
| 593 | + if (s && s != 'error') { | |
| 594 | + var d = '', | |
| 595 | + e = s; | |
| 596 | + if (s.indexOf('}') > -1) { | |
| 597 | + var f = s.split('}'); | |
| 598 | + for (var i = 0; i < f.length - 1; i++) { | |
| 599 | + d += f[i] + '}'; | |
| 600 | + var h = f[i].replace('{', '').split('->'); | |
| 601 | + if (h.length == 2) { | |
| 602 | + C._A_[h[0]] = h[1]; | |
| 603 | + } | |
| 604 | + } | |
| 605 | + e = f[f.length - 1]; | |
| 606 | + } | |
| 607 | + C._E_['v'] = e.split(','); | |
| 608 | + if (B) { | |
| 609 | + C.showHtml5(); | |
| 610 | + } else { | |
| 611 | + C.changeParams(d); | |
| 612 | + C.newAdr(); | |
| 613 | + } | |
| 614 | + } | |
| 615 | + }); | |
| 616 | + } | |
| 617 | + }, | |
| 618 | + getflashvars: function(s) { | |
| 619 | + var v = '', | |
| 620 | + i = 0; | |
| 621 | + if (s) { | |
| 622 | + for (var k in s) { | |
| 623 | + if (i > 0) { | |
| 624 | + v += '&'; | |
| 625 | + } | |
| 626 | + if (k == 'f' && s[k] && ! this.getSn('pm_repc',-1)) { | |
| 627 | + s[k] = this.getpath(s[k]); | |
| 628 | + if (s[k].indexOf('&') > -1) { | |
| 629 | + s[k] = encodeURIComponent(s[k]); | |
| 630 | + } | |
| 631 | + } | |
| 632 | + if (k == 'y' && s[k]) { | |
| 633 | + s[k] = this.getpath(s[k]); | |
| 634 | + } | |
| 635 | + v += k + '=' + s[k]; | |
| 636 | + i++; | |
| 637 | + } | |
| 638 | + } | |
| 639 | + return v; | |
| 640 | + }, | |
| 641 | + getparam: function(s) { | |
| 642 | + var w = '', | |
| 643 | + v = '', | |
| 644 | + o = { | |
| 645 | + allowScriptAccess: 'always', | |
| 646 | + allowFullScreen: true, | |
| 647 | + quality: 'high', | |
| 648 | + bgcolor: '#000' | |
| 649 | + }; | |
| 650 | + if (s) { | |
| 651 | + for (var k in s) { | |
| 652 | + o[k] = s[k]; | |
| 653 | + } | |
| 654 | + } | |
| 655 | + for (var e in o) { | |
| 656 | + w += e + '="' + o[e] + '" '; | |
| 657 | + v += '<param name="' + e + '" value="' + o[e] + '" />'; | |
| 658 | + } | |
| 659 | + w = w.replace('movie=', 'src='); | |
| 660 | + return { | |
| 661 | + w: w, | |
| 662 | + v: v | |
| 663 | + }; | |
| 664 | + }, | |
| 665 | + getObjectById: function(s) { | |
| 666 | + if (this._T_) { | |
| 667 | + return this; | |
| 668 | + } | |
| 669 | + var x = null, | |
| 670 | + y = this._K_(s), | |
| 671 | + r = 'embed'; | |
| 672 | + if (y && y.nodeName == 'OBJECT') { | |
| 673 | + if (typeof y.SetVariable != 'undefined') { | |
| 674 | + x= y; | |
| 675 | + } else { | |
| 676 | + var z = y.getElementsByTagName(r)[0]; | |
| 677 | + if (z) { | |
| 678 | + x= z; | |
| 679 | + } | |
| 680 | + } | |
| 681 | + } | |
| 682 | + return x; | |
| 683 | + }, | |
| 684 | + ajax: function(b, u, s, f) { | |
| 685 | + var x = this.getXhr(); | |
| 686 | + var a = [], | |
| 687 | + m = ''; | |
| 688 | + if (b == 'get') { | |
| 689 | + if (s.indexOf('?') > -1) { | |
| 690 | + m = s + '&t=' + new Date().getTime(); | |
| 691 | + } else { | |
| 692 | + m = s + '?t=' + new Date().getTime(); | |
| 693 | + } | |
| 694 | + x.open('get', m); | |
| 695 | + } else { | |
| 696 | + a = s.split('?'); | |
| 697 | + s = a[0], | |
| 698 | + m = a[1]; | |
| 699 | + x.open('post', s, true); | |
| 700 | + } | |
| 701 | + x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); | |
| 702 | + x.setRequestHeader('charset', u); | |
| 703 | + if (b == 'post') { | |
| 704 | + x.send(m); | |
| 705 | + } else { | |
| 706 | + x.send(null); | |
| 707 | + } | |
| 708 | + x.onreadystatechange = function() { | |
| 709 | + if (x.readyState == 4) { | |
| 710 | + var g = x.responseText; | |
| 711 | + if (g != '') { | |
| 712 | + f(g); | |
| 713 | + } else { | |
| 714 | + f(null); | |
| 715 | + } | |
| 716 | + } | |
| 717 | + } | |
| 718 | + }, | |
| 719 | + addListener: function(e, f) { | |
| 720 | + var o=CKobject._V_; | |
| 721 | + if (o.addEventListener) { | |
| 722 | + try{ | |
| 723 | + o.addEventListener(e, f, false); | |
| 724 | + } | |
| 725 | + catch (e) { | |
| 726 | + this.getNot(); | |
| 727 | + } | |
| 728 | + } | |
| 729 | + else if (o.attachEvent) { | |
| 730 | + try{ | |
| 731 | + o.attachEvent('on' + e, f); | |
| 732 | + } | |
| 733 | + catch(e){ | |
| 734 | + this.getNot(); | |
| 735 | + } | |
| 736 | + } | |
| 737 | + else { | |
| 738 | + o['on' + e] = f; | |
| 739 | + } | |
| 740 | + }, | |
| 741 | + removeListener: function( e, f) { | |
| 742 | + var o=CKobject._V_; | |
| 743 | + if (o.removeEventListener) { | |
| 744 | + try{ | |
| 745 | + o.removeEventListener(e, f, false); | |
| 746 | + } | |
| 747 | + catch(e){ | |
| 748 | + this.getNot(); | |
| 749 | + } | |
| 750 | + } | |
| 751 | + else if (o.detachEvent) { | |
| 752 | + try{ | |
| 753 | + o.detachEvent('on' + e, f); | |
| 754 | + } | |
| 755 | + catch(e){ | |
| 756 | + this.getNot(); | |
| 757 | + } | |
| 758 | + } | |
| 759 | + else { | |
| 760 | + o['on' + e] = null; | |
| 761 | + } | |
| 762 | + }, | |
| 763 | + Flash: function() { | |
| 764 | + var f = false,v = 0; | |
| 765 | + if (document.all || this.browser()['B'].toLowerCase().indexOf('ie')>-1) { | |
| 766 | + try { | |
| 767 | + var s = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | |
| 768 | + f = true; | |
| 769 | + var z = s.GetVariable('$version'); | |
| 770 | + v = parseInt(z.split(' ')[1].split(',')[0]); | |
| 771 | + } catch(e) {} | |
| 772 | + } else { | |
| 773 | + if (navigator.plugins && navigator.plugins.length > 0) { | |
| 774 | + var s = navigator.plugins['Shockwave Flash']; | |
| 775 | + if (s) { | |
| 776 | + f = true; | |
| 777 | + var w = s.description.split(' '); | |
| 778 | + for (var i = 0; i < w.length; ++i) { | |
| 779 | + if (isNaN(parseInt(w[i]))) continue; | |
| 780 | + v = parseInt(w[i]); | |
| 781 | + } | |
| 782 | + } | |
| 783 | + } | |
| 784 | + } | |
| 785 | + return { | |
| 786 | + f: f, | |
| 787 | + v: v | |
| 788 | + }; | |
| 789 | + }, | |
| 790 | + embed:function(f,d,i,w,h,b,v,e,p,j){ | |
| 791 | + var s=['all']; | |
| 792 | + if(b){ | |
| 793 | + if(this.isHTML5()){ | |
| 794 | + this.embedHTML5(d,i,w,h,e,v,s,j); | |
| 795 | + } | |
| 796 | + else{ | |
| 797 | + this.embedSWF(f,d,i,w,h,v,p); | |
| 798 | + } | |
| 799 | + } | |
| 800 | + else{ | |
| 801 | + if(this.Flash()['f'] && parseInt(this.Flash()['v'])>10){ | |
| 802 | + this.embedSWF(f,d,i,w,h,v,p); | |
| 803 | + } | |
| 804 | + else if(this.isHTML5()){ | |
| 805 | + this.embedHTML5(d,i,w,h,e,v,s,j); | |
| 806 | + } | |
| 807 | + else{ | |
| 808 | + this.embedSWF(f,d,i,w,h,v,p); | |
| 809 | + } | |
| 810 | + } | |
| 811 | + }, | |
| 812 | + embedSWF: function(C, D, N, W, H, V, P) { | |
| 813 | + if (!N) { | |
| 814 | + N = 'ckplayer_a1' | |
| 815 | + } | |
| 816 | + if (!P) { | |
| 817 | + P = { | |
| 818 | + bgcolor: '#FFF', | |
| 819 | + allowFullScreen: true, | |
| 820 | + allowScriptAccess: 'always', | |
| 821 | + wmode:'transparent' | |
| 822 | + }; | |
| 823 | + } | |
| 824 | + this._A_=V; | |
| 825 | + this.getX(); | |
| 826 | + var u = 'undefined', | |
| 827 | + g = false, | |
| 828 | + j = document, | |
| 829 | + r = 'http://www.macromedia.com/go/getflashplayer', | |
| 830 | + t = '<a href="' + r + '" target="_blank">请点击此处下载安装最新的flash插件</a>', | |
| 831 | + error = { | |
| 832 | + w: '您的网页不符合w3c标准,无法显示播放器', | |
| 833 | + f: '您没有安装flash插件,无法播放视频,' + t, | |
| 834 | + v: '您的flash插件版本过低,无法播放视频,' + t | |
| 835 | + }, | |
| 836 | + w3c = typeof j.getElementById != u && typeof j.getElementsByTagName != u && typeof j.createElement != u, | |
| 837 | + i = 'id="' + N + '" name="' + N + '" ', | |
| 838 | + s = '', | |
| 839 | + l = ''; | |
| 840 | + P['movie'] = C; | |
| 841 | + P['flashvars'] = this.getflashvars(V); | |
| 842 | + if(W==-1){ | |
| 843 | + d=true; | |
| 844 | + this._K_(D).style.width='100%'; | |
| 845 | + W='100%'; | |
| 846 | + } | |
| 847 | + s += '<object pluginspage="http://www.macromedia.com/go/getflashplayer" '; | |
| 848 | + s += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '; | |
| 849 | + s += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=11,3,0,0" '; | |
| 850 | + s += 'width="' + W + '" '; | |
| 851 | + s += 'height="' + H + '" '; | |
| 852 | + s += i; | |
| 853 | + s += 'align="middle">'; | |
| 854 | + s += this.getparam(P)['v']; | |
| 855 | + s += '<embed '; | |
| 856 | + s += this.getparam(P)['w']; | |
| 857 | + s += ' width="' + W + '" height="' + H + '" name="' + N + '" id="' + N + '" align="middle" ' + i; | |
| 858 | + s += 'type="application/x-shockwave-flash" pluginspage="' + r + '" />'; | |
| 859 | + s += '</object>'; | |
| 860 | + if (!w3c) { | |
| 861 | + l = error['w']; | |
| 862 | + g = true; | |
| 863 | + } else { | |
| 864 | + if (!this.Flash()['f']) { | |
| 865 | + l = error['f']; | |
| 866 | + g = true; | |
| 867 | + } else { | |
| 868 | + if (this.Flash()['v'] < 11) { | |
| 869 | + l = error['v']; | |
| 870 | + g = true; | |
| 871 | + } else { | |
| 872 | + l = s; | |
| 873 | + this._T_=false; | |
| 874 | + } | |
| 875 | + } | |
| 876 | + } | |
| 877 | + if (l) { | |
| 878 | + this._K_(D).innerHTML = l; | |
| 879 | + } | |
| 880 | + if (g){ | |
| 881 | + this._K_(D).style.color = '#0066cc'; | |
| 882 | + this._K_(D).style.lineHeight = this._K_(D).style.height; | |
| 883 | + this._K_(D).style.textAlign= 'center'; | |
| 884 | + } | |
| 885 | + }, | |
| 886 | + embedHTML5: function(C, P, W, H, V, A, S, J) { | |
| 887 | + this._E_ = { | |
| 888 | + c: C, | |
| 889 | + p: P, | |
| 890 | + w: W, | |
| 891 | + h: H, | |
| 892 | + v: V, | |
| 893 | + s: S, | |
| 894 | + j: J==undefined || J?true:false | |
| 895 | + }; | |
| 896 | + this._A_ = A; | |
| 897 | + this.getX(); | |
| 898 | + b = this.browser()['B'], | |
| 899 | + v = this.browser()['V'], | |
| 900 | + x = v.split('.'), | |
| 901 | + t = x[0], | |
| 902 | + m = b + v, | |
| 903 | + n = b + t, | |
| 904 | + w = '', | |
| 905 | + s = false, | |
| 906 | + f = this.Flash()['f'], | |
| 907 | + a = false; | |
| 908 | + if (!S) { | |
| 909 | + S = ['iPad', 'iPhone', 'ios']; | |
| 910 | + } | |
| 911 | + for (var i = 0; i < S.length; i++) { | |
| 912 | + w = S[i]; | |
| 913 | + if (w.toLowerCase() == 'all') { | |
| 914 | + s = true; | |
| 915 | + break; | |
| 916 | + } | |
| 917 | + if (w.toLowerCase() == 'all+false' && !f) { | |
| 918 | + s = true; | |
| 919 | + break; | |
| 920 | + } | |
| 921 | + if (w.indexOf('+') > -1) { | |
| 922 | + w = w.split('+')[0]; | |
| 923 | + a = true; | |
| 924 | + } else { | |
| 925 | + a = false; | |
| 926 | + } | |
| 927 | + if (this.Platform() == w || m == w || n == w || b == w) { | |
| 928 | + if (a) { | |
| 929 | + if (!f) { | |
| 930 | + s = true; | |
| 931 | + break; | |
| 932 | + } | |
| 933 | + }else { | |
| 934 | + s = true; | |
| 935 | + break; | |
| 936 | + } | |
| 937 | + } | |
| 938 | + } | |
| 939 | + if (s) { | |
| 940 | + if (V) { | |
| 941 | + var l = V[0].split('->'); | |
| 942 | + if (l && l.length == 2 && l[1].indexOf('ajax') > -1) { | |
| 943 | + this.getUrl(l, true); | |
| 944 | + return; | |
| 945 | + } | |
| 946 | + } | |
| 947 | + this.showHtml5(); | |
| 948 | + } | |
| 949 | + }, | |
| 950 | + status: function() { | |
| 951 | + this._H_ = parseInt(this.getSn('setup', 20)); | |
| 952 | + var f='ckplayer_status'; | |
| 953 | + if (this.getSn('calljs', 0)!='') { | |
| 954 | + f=this.getSn('calljs', 0); | |
| 955 | + } | |
| 956 | + try { | |
| 957 | + if (typeof(eval(f)) == 'function') { | |
| 958 | + this._L_=eval(f); | |
| 959 | + this._M_=true; | |
| 960 | + return true; | |
| 961 | + } | |
| 962 | + } catch(e) { | |
| 963 | + try { | |
| 964 | + if (typeof(eval(ckplayer_status)) == 'function') { | |
| 965 | + this._L_=ckplayer_status; | |
| 966 | + this._M_=true; | |
| 967 | + return true; | |
| 968 | + } | |
| 969 | + } catch(e) { | |
| 970 | + return false; | |
| 971 | + } | |
| 972 | + } | |
| 973 | + return false; | |
| 974 | + }, | |
| 975 | + showHtml5: function() { | |
| 976 | + var C = CKobject; | |
| 977 | + var p = C._E_['p'], | |
| 978 | + a = C._E_['v'], | |
| 979 | + c = C._E_['c'], | |
| 980 | + j = '', | |
| 981 | + b = false; | |
| 982 | + var s = this._E_['v']; | |
| 983 | + var w=C._E_['w'],h=C._E_['h']; | |
| 984 | + var d=false; | |
| 985 | + var r=''; | |
| 986 | + if(s.length==1){ | |
| 987 | + r=' src="'+s[0].split('->')[0]+'"'; | |
| 988 | + } | |
| 989 | + if(w==-1){ | |
| 990 | + d=true; | |
| 991 | + C._K_(c).style.width='100%'; | |
| 992 | + w='100%'; | |
| 993 | + } | |
| 994 | + if(w.toString().indexOf('%')>-1){ | |
| 995 | + w='100%'; | |
| 996 | + } | |
| 997 | + if(h.toString().indexOf('%')>-1){ | |
| 998 | + h='100%'; | |
| 999 | + } | |
| 1000 | + if(C._E_['j']){ | |
| 1001 | + j='controls="controls"'; | |
| 1002 | + } | |
| 1003 | + var v = '<video '+j+r+' id="' + p + '" width="' + w + '" height="' + h + '"' + C.getParams() + '>' + C.getVideo() + '</video>'; | |
| 1004 | + C._K_(c).innerHTML = v; | |
| 1005 | + C._K_(c).style.backgroundColor = '#000'; | |
| 1006 | + C._V_ = C._K_(p); | |
| 1007 | + if(!d){ | |
| 1008 | + C._K_(c).style.width=C._E_['w'].toString().indexOf('%')>-1?(C._K_(c).offsetWidth*parseInt(C._E_['w'])*0.01)+'px':C._V_.width+'px'; | |
| 1009 | + C._K_(c).style.height=C._E_['h'].toString().indexOf('%')>-1?(C._K_(c).offsetHeight*parseInt(C._E_['h'])*0.01)+'px':C._V_.height+'px'; | |
| 1010 | + } | |
| 1011 | + C._P_ = false; | |
| 1012 | + C._T_ = true; | |
| 1013 | + if (C.getVars('loaded')!='') { | |
| 1014 | + var f=C.getVars('loaded')+'()'; | |
| 1015 | + try { | |
| 1016 | + if (typeof(eval(f)) == 'function') { | |
| 1017 | + eval(f); | |
| 1018 | + } | |
| 1019 | + } catch(e) { | |
| 1020 | + try { | |
| 1021 | + if (typeof(eval(loadedHandler)) == 'function') { | |
| 1022 | + loadedHandler(); | |
| 1023 | + } | |
| 1024 | + } catch(e) { | |
| 1025 | + } | |
| 1026 | + } | |
| 1027 | + } | |
| 1028 | + C.status(); | |
| 1029 | + C.addListener('play', C.playHandler); | |
| 1030 | + C.addListener('pause', C.playHandler); | |
| 1031 | + C.addListener('error', C.errorHandler); | |
| 1032 | + C.addListener('emptied', C.errorHandler); | |
| 1033 | + C.addListener('loadedmetadata', C.loadedMetadataHandler); | |
| 1034 | + C.addListener('ended', C.endedHandler); | |
| 1035 | + C.addListener('volumechange', C.volumeChangeHandler); | |
| 1036 | + if((C.getVars('m')!='' && C.getVars('m')!=null) || parseInt( C.getSn('setup', 0))>0){ | |
| 1037 | + C._K_(c).style.cursor='pointer'; | |
| 1038 | + } | |
| 1039 | + if((C.getVars('m')!='' && C.getVars('m')!=null) || parseInt( C.getSn('setup', 1))==1){ | |
| 1040 | + C.addListener('click', C.html5Click); | |
| 1041 | + } | |
| 1042 | + }, | |
| 1043 | + videoPlay: function() { | |
| 1044 | + if (this._T_) { | |
| 1045 | + this._V_.play(); | |
| 1046 | + } | |
| 1047 | + }, | |
| 1048 | + videoPause: function() { | |
| 1049 | + if (this._T_) { | |
| 1050 | + this._V_.pause(); | |
| 1051 | + } | |
| 1052 | + }, | |
| 1053 | + playOrPause: function() { | |
| 1054 | + if (this._T_) { | |
| 1055 | + if (this._V_.paused) { | |
| 1056 | + this._V_.play(); | |
| 1057 | + } else { | |
| 1058 | + this._V_.pause(); | |
| 1059 | + } | |
| 1060 | + } | |
| 1061 | + }, | |
| 1062 | + fastNext: function() { | |
| 1063 | + if (this._T_) { | |
| 1064 | + this._V_['currentTime'] = this._V_['currentTime'] + 10; | |
| 1065 | + } | |
| 1066 | + }, | |
| 1067 | + fastBack: function() { | |
| 1068 | + if (this._T_) { | |
| 1069 | + this._V_['currentTime'] = this._V_['currentTime'] - 10; | |
| 1070 | + } | |
| 1071 | + }, | |
| 1072 | + changeVolume: function(n) { | |
| 1073 | + if (this._T_) { | |
| 1074 | + this._V_['volume'] = n * 0.01; | |
| 1075 | + } | |
| 1076 | + }, | |
| 1077 | + videoSeek: function(t) { | |
| 1078 | + if (this._T_) { | |
| 1079 | + this._V_['currentTime'] = t; | |
| 1080 | + } | |
| 1081 | + }, | |
| 1082 | + newAddress: function(u) { | |
| 1083 | + var s = []; | |
| 1084 | + if (u) { | |
| 1085 | + s = this.isHtml5New(u); | |
| 1086 | + } else { | |
| 1087 | + return; | |
| 1088 | + } | |
| 1089 | + if (s && this._T_) { | |
| 1090 | + this.changeParams(u); | |
| 1091 | + var l = s[0].split('->'); | |
| 1092 | + if (l && l.length == 2 && l[1].indexOf('ajax') > -1) { | |
| 1093 | + this.getUrl(l, false); | |
| 1094 | + return; | |
| 1095 | + } | |
| 1096 | + this._E_['v'] = s; | |
| 1097 | + this.newAdr(); | |
| 1098 | + } | |
| 1099 | + }, | |
| 1100 | + quitFullScreen:function() { | |
| 1101 | + if(document.cancelFullScreen) { | |
| 1102 | + document.cancelFullScreen(); | |
| 1103 | + } | |
| 1104 | + else if(document.mozCancelFullScreen) { | |
| 1105 | + document.mozCancelFullScreen(); | |
| 1106 | + } else if(document.webkitCancelFullScreen) { | |
| 1107 | + document.webkitCancelFullScreen(); | |
| 1108 | + } | |
| 1109 | + | |
| 1110 | + }, | |
| 1111 | + changeStatus:function(n){ | |
| 1112 | + this._H_=n; | |
| 1113 | + }, | |
| 1114 | + newAdr: function() { | |
| 1115 | + var s = this._E_['v']; | |
| 1116 | + this._V_.pause(); | |
| 1117 | + if(s.length==1){ | |
| 1118 | + this._V_.src=s[0].split('->')[0]; | |
| 1119 | + } | |
| 1120 | + else{ | |
| 1121 | + this._V_['innerHTML'] = this.getVideo(); | |
| 1122 | + } | |
| 1123 | + this._V_.load(); | |
| 1124 | + }, | |
| 1125 | + isHtml5New: function(s) { | |
| 1126 | + if (s.indexOf('html5') == -1) { | |
| 1127 | + return false; | |
| 1128 | + } | |
| 1129 | + var a = s.replace(/{/g, ''); | |
| 1130 | + var b = a.split('}'); | |
| 1131 | + var c = ''; | |
| 1132 | + for (var i = 0; i < b.length; i++) { | |
| 1133 | + if (b[i].indexOf('html5') > -1) { | |
| 1134 | + c = b[i].replace('html5->', '').split(','); | |
| 1135 | + break; | |
| 1136 | + } | |
| 1137 | + } | |
| 1138 | + return c; | |
| 1139 | + }, | |
| 1140 | + changeParams: function(f) { | |
| 1141 | + if (f) { | |
| 1142 | + var a = f.replace(/{/g, ''); | |
| 1143 | + var b = a.split('}'); | |
| 1144 | + var c = ''; | |
| 1145 | + for (var i = 0; i < b.length; i++) { | |
| 1146 | + var d = b[i].split('->'); | |
| 1147 | + if(d.length == 2){ | |
| 1148 | + switch(d[0]){ | |
| 1149 | + case 'p': | |
| 1150 | + if(parseInt(d[1]) == 1){ | |
| 1151 | + this._V_.autoplay = true; | |
| 1152 | + } | |
| 1153 | + else if(parseInt(d[1]) == 2){ | |
| 1154 | + this._V_.preload = 'metadata'; | |
| 1155 | + } | |
| 1156 | + else{ | |
| 1157 | + this._V_.autoplay = false; | |
| 1158 | + if(this._I_!=null){ | |
| 1159 | + clearInterval(this._I_); | |
| 1160 | + this._I_=null; | |
| 1161 | + } | |
| 1162 | + } | |
| 1163 | + break; | |
| 1164 | + case 'e': | |
| 1165 | + if(parseInt(d[1]) == 1){ | |
| 1166 | + this._V_.loop = true; | |
| 1167 | + } | |
| 1168 | + else{ | |
| 1169 | + this._V_.loop = false; | |
| 1170 | + } | |
| 1171 | + break; | |
| 1172 | + case 'i': | |
| 1173 | + this._V_.poster = d[1]; | |
| 1174 | + break; | |
| 1175 | + default: | |
| 1176 | + break; | |
| 1177 | + } | |
| 1178 | + } | |
| 1179 | + } | |
| 1180 | + } | |
| 1181 | + }, | |
| 1182 | + frontAdPause: function(s) { | |
| 1183 | + this.getNot(); | |
| 1184 | + }, | |
| 1185 | + frontAdUnload: function() { | |
| 1186 | + this.getNot(); | |
| 1187 | + }, | |
| 1188 | + changeFace: function(s) { | |
| 1189 | + this.getNot(); | |
| 1190 | + }, | |
| 1191 | + plugin: function(a, b, c, d, e, f, g) { | |
| 1192 | + this.getNot(); | |
| 1193 | + }, | |
| 1194 | + videoClear: function() { | |
| 1195 | + this.getNot(); | |
| 1196 | + }, | |
| 1197 | + videoBrightness: function(s) { | |
| 1198 | + this.getNot(); | |
| 1199 | + }, | |
| 1200 | + videoContrast: function(s) { | |
| 1201 | + this.getNot(); | |
| 1202 | + }, | |
| 1203 | + videoSaturation: function(s) { | |
| 1204 | + this.getNot(); | |
| 1205 | + }, | |
| 1206 | + videoSetHue: function(s) { | |
| 1207 | + this.getNot(); | |
| 1208 | + }, | |
| 1209 | + videoWAndH: function(a, b) { | |
| 1210 | + this.getNot(); | |
| 1211 | + }, | |
| 1212 | + videoWHXY: function(a, b, c, d) { | |
| 1213 | + this.getNot(); | |
| 1214 | + }, | |
| 1215 | + changeFlashvars: function(a) { | |
| 1216 | + this.getNot(); | |
| 1217 | + }, | |
| 1218 | + changeMyObject: function(a, b) { | |
| 1219 | + this.getNot(); | |
| 1220 | + }, | |
| 1221 | + getMyObject: function(a, b) { | |
| 1222 | + this.getNot(); | |
| 1223 | + }, | |
| 1224 | + changeeFace: function() { | |
| 1225 | + this.getNot(); | |
| 1226 | + }, | |
| 1227 | + changeStyle: function(a, b) { | |
| 1228 | + this.getNot(); | |
| 1229 | + }, | |
| 1230 | + promptLoad: function() { | |
| 1231 | + this.getNot(); | |
| 1232 | + }, | |
| 1233 | + promptUnload: function() { | |
| 1234 | + this.getNot(); | |
| 1235 | + }, | |
| 1236 | + marqueeLoad: function(a,b) { | |
| 1237 | + this.getNot(); | |
| 1238 | + }, | |
| 1239 | + marqueeClose: function(s) { | |
| 1240 | + this.getNot(); | |
| 1241 | + }, | |
| 1242 | + getNot: function() { | |
| 1243 | + var s='The ckplayer\'s API for HTML5 does not exist'; | |
| 1244 | + return s; | |
| 1245 | + }, | |
| 1246 | + volumeChangeHandler: function() { | |
| 1247 | + var C = CKobject; | |
| 1248 | + if (C._V_.muted) { | |
| 1249 | + C.returnStatus('volumechange:0', 1); | |
| 1250 | + C._O_['volume'] = 0; | |
| 1251 | + C._O_['mute'] = true; | |
| 1252 | + } else { | |
| 1253 | + C._O_['mute'] = false; | |
| 1254 | + C._O_['volume'] = C._V_['volume'] * 100; | |
| 1255 | + C.returnStatus('volumechange:'+C._V_['volume'] * 100, 1); | |
| 1256 | + } | |
| 1257 | + }, | |
| 1258 | + endedHandler: function() { | |
| 1259 | + var C = CKobject; | |
| 1260 | + var e=parseInt(C.getVars('e')); | |
| 1261 | + C.returnStatus('ended', 1); | |
| 1262 | + if(C._I_){ | |
| 1263 | + clearInterval(C._I_); | |
| 1264 | + C._I_=null; | |
| 1265 | + } | |
| 1266 | + if ( e!= 0 && e !=4 && e !=6) { | |
| 1267 | + return; | |
| 1268 | + } | |
| 1269 | + if(e==6){ | |
| 1270 | + this.quitFullScreen(); | |
| 1271 | + } | |
| 1272 | + var f='playerstop()'; | |
| 1273 | + if (C.getSn('calljs', 2)!='') { | |
| 1274 | + f=C.getSn('calljs', 2)+'()'; | |
| 1275 | + } | |
| 1276 | + try { | |
| 1277 | + if (typeof(eval(f)) == 'function') { | |
| 1278 | + eval(f); | |
| 1279 | + return; | |
| 1280 | + } | |
| 1281 | + } catch(e) { | |
| 1282 | + try { | |
| 1283 | + if (typeof(eval(playerstop)) == 'function') { | |
| 1284 | + playerstop(); | |
| 1285 | + return; | |
| 1286 | + } | |
| 1287 | + } catch(e) { | |
| 1288 | + return; | |
| 1289 | + } | |
| 1290 | + } | |
| 1291 | + }, | |
| 1292 | + loadedMetadataHandler: function() { | |
| 1293 | + var C = CKobject; | |
| 1294 | + C.returnStatus('loadedmetadata', 1); | |
| 1295 | + C._O_['totaltime'] = C._V_['duration']; | |
| 1296 | + C._O_['width'] = C._V_['width']; | |
| 1297 | + C._O_['height'] = C._V_['height']; | |
| 1298 | + C._O_['awidth'] = C._V_['videoWidth']; | |
| 1299 | + C._O_['aheight'] = C._V_['videoHeight']; | |
| 1300 | + if (C._V_.defaultMuted) { | |
| 1301 | + C.returnStatus('volumechange:0', 1); | |
| 1302 | + C._O_['mute'] = true; | |
| 1303 | + C._O_['volume'] = 0; | |
| 1304 | + } else { | |
| 1305 | + C._O_['mute'] = false; | |
| 1306 | + C._O_['volume'] = C._V_['volume'] * 100; | |
| 1307 | + C.returnStatus('volumechange:'+C._V_['volume'] * 100, 1); | |
| 1308 | + } | |
| 1309 | + if (parseInt(C.getVars('p')) == 1) { | |
| 1310 | + C.playHandler(); | |
| 1311 | + } | |
| 1312 | + }, | |
| 1313 | + errorHandler: function() { | |
| 1314 | + CKobject.returnStatus('error', 1); | |
| 1315 | + }, | |
| 1316 | + playHandler: function() { | |
| 1317 | + var C = CKobject; | |
| 1318 | + if (C._V_.paused) { | |
| 1319 | + C.returnStatus('pause', 1); | |
| 1320 | + C.addO('play', false); | |
| 1321 | + if(C._I_!=null){ | |
| 1322 | + clearInterval(C._I_); | |
| 1323 | + C._I_=null; | |
| 1324 | + } | |
| 1325 | + } else { | |
| 1326 | + C.returnStatus('play', 1); | |
| 1327 | + C.addO('play', true); | |
| 1328 | + if (!C._P_) { | |
| 1329 | + C.returnStatus('play', 1); | |
| 1330 | + C._P_ = true; | |
| 1331 | + } | |
| 1332 | + C._I_ = setInterval(C.playTime, parseInt( C.getSn('setup', 37))); | |
| 1333 | + if(!C._G_){ | |
| 1334 | + C._G_=true; | |
| 1335 | + for(var k in C._A_){ | |
| 1336 | + if(k=='g' && C._A_[k]){ | |
| 1337 | + var g=parseInt(C._A_[k]); | |
| 1338 | + C.videoSeek(g); | |
| 1339 | + } | |
| 1340 | + } | |
| 1341 | + } | |
| 1342 | + if(!C._Y_){ | |
| 1343 | + C._Y_=true; | |
| 1344 | + for(var k in C._A_){ | |
| 1345 | + if(k=='j' && C._A_[k]){ | |
| 1346 | + var j=parseInt(C._A_[k]); | |
| 1347 | + if(j>0){ | |
| 1348 | + C._J_=j; | |
| 1349 | + } | |
| 1350 | + else{ | |
| 1351 | + C._J_=parseInt(C._O_['totaltime'])+j; | |
| 1352 | + } | |
| 1353 | + } | |
| 1354 | + } | |
| 1355 | + } | |
| 1356 | + } | |
| 1357 | + }, | |
| 1358 | + html5Click: function(){ | |
| 1359 | + var C = CKobject; | |
| 1360 | + if(C.getVars('m')!='' && C.getVars('m')!=null){ | |
| 1361 | + window.open(C.getVars('m')); | |
| 1362 | + } | |
| 1363 | + }, | |
| 1364 | + returnStatus: function(s, j) { | |
| 1365 | + var h = s; | |
| 1366 | + if (this._H_ == 3) { | |
| 1367 | + h = this._E_['p'] +'->'+ h; | |
| 1368 | + } | |
| 1369 | + if (this._M_ && j <= this._H_ ) { | |
| 1370 | + this._L_(h); | |
| 1371 | + } | |
| 1372 | + }, | |
| 1373 | + addO: function(s, z) { | |
| 1374 | + this._O_[s] = z; | |
| 1375 | + }, | |
| 1376 | + getStatus: function() { | |
| 1377 | + return this._O_; | |
| 1378 | + }, | |
| 1379 | + playTime: function() { | |
| 1380 | + var C = CKobject; | |
| 1381 | + var t = C._V_['currentTime']; | |
| 1382 | + C._O_['time'] = t; | |
| 1383 | + if(C._J_>0 && t>C._J_){ | |
| 1384 | + C._J_=0; | |
| 1385 | + C.videoSeek(C._O_['totaltime']); | |
| 1386 | + } | |
| 1387 | + C.returnStatus('time:' + t, 1); | |
| 1388 | + } | |
| 1389 | + } | |
| 1390 | + window.CKobject = CKobject; | |
| 1391 | +})(); | |
| 0 | 1392 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ck/ckplayer/ckplayer.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/ckplayer.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<ckplayer> | |
| 3 | + <style> | |
| 4 | + <cpath></cpath> | |
| 5 | + <!-- | |
| 6 | + 播放器风格压缩包文件的路径,默认的是style.swf | |
| 7 | + 如果调用不出来可以试着设置成绝对路径试试 | |
| 8 | + 如果不知道路径并且使用的是默认配置,可以直接留空,播放器会自动寻找 | |
| 9 | + --> | |
| 10 | + <language></language> | |
| 11 | + <!-- | |
| 12 | + 播放器所使用的语言配置文件,需要和播放器在同目录下,默认是language.xml | |
| 13 | + --> | |
| 14 | + <flashvars>{b->1}{p->1}</flashvars> | |
| 15 | + <!-- | |
| 16 | + 这里是用来做为对flashvars值的补充,除了c和x二个参数以外的设置都可以在这里进行配置 | |
| 17 | + 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 | |
| 18 | + 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 | |
| 19 | + --> | |
| 20 | + <setup>1,1,1,1,1,2,0,1,2,0,0,1,200,0,2,1,0,1,1,1,0,10,3,0,1,2,3000,0,0,0,0,1,1,1,1,1,1,250,0,90,0,0,0</setup> | |
| 21 | + <!-- | |
| 22 | + 这是配置文件里比较重要的一个参数,共有N个功能控制参数,并且以后会继续的增加,各控制参数以英文逗号(,)隔开。下面列出各参数的说明: | |
| 23 | + 1、鼠标经过按钮是否使用手型,0普通鼠标,1手型鼠标,2是只有按钮手型,3是控制栏手型 | |
| 24 | + 2、是否支持单击暂停,0不支持,1是支持 | |
| 25 | + 3、是否支持双击全屏,0不支持,1是支持 | |
| 26 | + 4、在播放前置广告时是否同时加载视频,0不加载,1加载 | |
| 27 | + 5、广告显示的参考对象,0是参考视频区域,1是参考播放器区域 | |
| 28 | + 6、广告大小的调整方式,只针对swf和图片有效,视频是自动缩放的 | |
| 29 | + =0是自动调整大小,意思是说大的话就变小,小的话就变大 | |
| 30 | + =1是大的化变小,小的话不变 | |
| 31 | + =2是什么也不变,就这么大 | |
| 32 | + =3是跟参考对像(第5个控制)参数设置的一样宽高 | |
| 33 | + 7、前置广告播放顺序,0是顺序播放,1是随机播放,>1则随机取所有广告中的(N-1)个进行播放 | |
| 34 | + 8、对于视频广告是否采用修正,0是不使用,1是使用,如果是1,则用户在网速慢的情况下会按设定的倒计时进行播放广告,计时结束则放正片(比较人性化),设置成0的话,则强制播放完广告才能播放正片 | |
| 35 | + 9、是否开启滚动文字广告,0是不开启,1是开启且不使用关闭按钮,2是开启并且使用关闭按钮,开启后将在加载视频的时候加载滚动文字广告 | |
| 36 | + 10、视频的调整方式 | |
| 37 | + =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 38 | + =1是大的化变小,小的话不变 | |
| 39 | + =2是什么也不变,就这么大 | |
| 40 | + =3是跟参考对像(pm_video的设置)参数设置的一样宽高 | |
| 41 | + 11、是否在多视频时分段加载,0不是,1是 | |
| 42 | + 12、缩放视频时是否进行平滑处理,0不是,1是 | |
| 43 | + 13、视频缓冲时间,单位:毫秒,建议不超过300 | |
| 44 | + 14、初始图片调整方式( | |
| 45 | + =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 46 | + =1是大的化变小,小的话不变 | |
| 47 | + =2是什么也不变,就这么大 | |
| 48 | + =3是跟pm_video参数设置的一样宽高 | |
| 49 | + 15、暂停广告调整方式( | |
| 50 | + =0是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 51 | + =1是大的化变小,小的话不变 | |
| 52 | + =2是什么也不变,就这么大 | |
| 53 | + =3是跟pm_video参数设置的一样宽 | |
| 54 | + 16、暂停广告是否使用关闭广告设置,0不使用,1使用 | |
| 55 | + 17、缓冲时是否播放广告,0是不显示,1是显示并同时隐藏掉缓冲图标和进度,2是显示并不隐藏缓冲图标 | |
| 56 | + 18、是否支持键盘空格键控制播放和暂停0不支持,1支持 | |
| 57 | + 19、是否支持键盘左右方向键控制快进快退0不支持,1支持 | |
| 58 | + 20、是否支持键盘上下方向键控制音量0不支持,1支持 | |
| 59 | + 21、播放器返回js交互函数的等级,0-2,等级越高,返回的参数越多 | |
| 60 | + 0是返回少量常用交互 | |
| 61 | + 1返回播放器在播放的时候的参数,不返回广告之类的参数 | |
| 62 | + 2返回全部参数 | |
| 63 | + 3返回全部参数,并且在参数前加上"播放器ID->",用于多播放器的监听 | |
| 64 | + 22、快进和快退的秒数 | |
| 65 | + 23、界面上图片元素加载失败重新加载次数 | |
| 66 | + 24、开启加载皮肤压缩文件包的加载进度提示 | |
| 67 | + 25、使用隐藏控制栏时显示简单进度条的功能,0是不使用,1是使用,2是只在普通状态下使用 | |
| 68 | + 26、控制栏隐藏设置(0不隐藏,1全屏时隐藏,2都隐藏 | |
| 69 | + 27、控制栏隐藏延时时间,即在鼠标离开控制栏后多少毫秒后隐藏控制栏 | |
| 70 | + 28、左右滚动时是否采用无缝,默认0采用,1是不采用 | |
| 71 | + 29、0是正常状态,1是控制栏默认隐藏,播放状态下鼠标经过播放器显示控制栏,2是一直隐藏控制栏 | |
| 72 | + 30、在播放rtmp视频时暂停后点击播放是否采用重新链接的方式,这里一共分0-3四个等级 | |
| 73 | + 31、当采用网址形式(flashvars里s=1/2时)读取视频地址时是采用默认0=get方法,1=post方式 | |
| 74 | + 32、是否启用播放按钮和暂停按钮 | |
| 75 | + 33、是否启用中间暂停按钮 | |
| 76 | + 34、是否启用静音按钮 | |
| 77 | + 35、是否启用全屏按钮 | |
| 78 | + 36、是否启用进度调节栏,0不启用,1是启用,2是只能前进(向右拖动),3是只能后退,4是只能前进但能回到第一次拖动时的位置,5是看过的地方可以随意拖动, | |
| 79 | + 37、是否启用调节音量 | |
| 80 | + 38、计算时间的间隔,毫秒 | |
| 81 | + 39、前置logo至少显示的时间,单位:毫秒 | |
| 82 | + 40、前置视频广告的默认音量 | |
| 83 | + 41、当s=3/4时加载插件是否从压缩包里加载,0不是,1是 | |
| 84 | + 42、加载风格是否采用加密方式传送,该功能普通用户不能使用 | |
| 85 | + 43、在s=1/2时,调用地址里的地址是否是相对地址(相对于调用文件),0不是,1是 | |
| 86 | + --> | |
| 87 | + <pm_bg>0x000000,100,230,180</pm_bg> | |
| 88 | + <!--播放器整体的背景配置 | |
| 89 | + 1、整体背景颜色 | |
| 90 | + 2、背景透明度 | |
| 91 | + 3、播放器最小宽度 | |
| 92 | + 4、播放器最小高度 | |
| 93 | + 这里只是初始化时的设置,最终加载完播放器后显示的效果需要在style.swf/style.xml里设置该参数 | |
| 94 | + --> | |
| 95 | + <mylogo>logo.swf</mylogo> | |
| 96 | + <!-- | |
| 97 | + 视频加载前显示的logo文件,不使用设置成<mylogo>null</mylogo> | |
| 98 | + --> | |
| 99 | + <pm_mylogo>1,1,-100,-55</pm_mylogo> | |
| 100 | + <!-- | |
| 101 | + 视频加载前显示的logo文件(mylogo参数的)的位置 | |
| 102 | + 本软件所有的四个参数控制位置的方式全部都是统一的意思,如下 | |
| 103 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 104 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 105 | + 3、水平偏移量,举例说明,如果第1个参数设置成0左对齐,第3个偏移量设置成10,就是离左边10个像素,第一个参数设置成2,偏移量如果设置的是正值就会移到播放器外面,只有设置成负值才行,设置成-1,按钮就会跑到播放器外面 | |
| 106 | + 4、垂直偏移量 | |
| 107 | + --> | |
| 108 | + <logo>cklogo.png</logo> | |
| 109 | + <!-- | |
| 110 | + 默认右上角一直显示的logo,不使用设置成<logo>null</logo> | |
| 111 | + --> | |
| 112 | + <pm_logo>2,0,-100,20</pm_logo> | |
| 113 | + <!-- | |
| 114 | + 播放器右上角的logo的位置 | |
| 115 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 116 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 117 | + 3、水平偏移量 | |
| 118 | + 4、垂直偏移量 | |
| 119 | + 以下是播放器自带的二个插件 | |
| 120 | + --> | |
| 121 | + <control_rel>related.swf,related.xml,0</control_rel> | |
| 122 | + <!-- | |
| 123 | + 1、视频播放结束后显示相关精彩视频的插件文件(注意,视频结束动作设置成3时(即var flashvars={e:3})有效), | |
| 124 | + 2、xml文件是调用精彩视频的示例文件,可以自定义文件类型(比如asp,php,jsp,.net只要输出的是xml格式就行),实际使用中一定要注意第二个参数的路径要正确 | |
| 125 | + 3、第三个参数是设置配置文件的编码,0是默认的utf-8,1是gbk2312 | |
| 126 | + --> | |
| 127 | + <control_pv>Preview.swf,105,2000</control_pv> | |
| 128 | + <!-- | |
| 129 | + 视频预览插件 | |
| 130 | + 1、插件文件名称(该插件和上面的精彩视频的插件都是放在风格压缩包里的) | |
| 131 | + 2、离进度栏的高(指的是插件的顶部离进度栏的位置) | |
| 132 | + 3、延迟时间(该处设置鼠标经过进度栏停顿多少毫秒后才显示插件) | |
| 133 | + 建议一定要设置延时时间,不然当鼠标在进度栏上划过的时候就会读取视频地址进行预览,很占资源 | |
| 134 | + --> | |
| 135 | + <pm_repc></pm_repc> | |
| 136 | + <!-- | |
| 137 | + 视频地址替换符,该功能主要是用来做简单加密的功能,使用方法很简单,请注意,只针对f值是视频地址的时候有效,其它地方不能使用。具体的请查看http://www.ckplayer.com/manual.php?id=4#title_25 | |
| 138 | + --> | |
| 139 | + <pm_spac>|</pm_spac> | |
| 140 | + <!-- | |
| 141 | + 视频地址间隔符,这里主要是播放多段视频时使用普通调用方式或网址调用方式时使用的。默认使用|,如果视频地址里本身存在|的话需要另外设置一个间隔符,注意,即使只有一个视频也需要设置。另外在使用rtmp协议播放视频的时候,如果视频存在多级目录的话,这里要改成其它的符号,因为rtmp协议的视频地址多级的话也需要用到|隔开流地址和实例地址 | |
| 142 | + --> | |
| 143 | + <pm_fpac>file->f</pm_fpac> | |
| 144 | + <!-- | |
| 145 | + 该参数的功能是把自定义的flashvars里的变量替换成ckplayer里对应的变量,默认的参数的意思是把flashvars里的file值替换成f值,因为ckplayer里只认f值,多个替换之间用竖线隔开 | |
| 146 | + --> | |
| 147 | + <pm_advtime>2,0,-110,10,0,300,0</pm_advtime> | |
| 148 | + <!-- | |
| 149 | + 前置广告倒计时文本位置,播放前置 广告时有个倒计时的显示文本框,这里是设置该文本框的位置和宽高,对齐方式的。一共7个参数,分别表示: | |
| 150 | + 1、水平对齐方式,0是左对齐,1是中间对齐,2是右对齐 | |
| 151 | + 2、垂直对齐方式,0是上对齐,1是中间对齐,2是低部对齐 | |
| 152 | + 3、水平位置偏移量 | |
| 153 | + 4、垂直位置偏移量 | |
| 154 | + 5、文字对齐方式,0是左对齐,1是中间对齐,2是右对齐,3是默认对齐 | |
| 155 | + 6、文本框宽席 | |
| 156 | + 7、文本框高度 | |
| 157 | + --> | |
| 158 | + <pm_advstatus>1,2,2,-200,-40</pm_advstatus> | |
| 159 | + <!-- | |
| 160 | + 前置广告静音按钮,静音按钮只在是视频广告时显示,当然也可以控制不显示 | |
| 161 | + 1、是否显示0不显示,1显示 | |
| 162 | + 2、水平对齐方式 | |
| 163 | + 3、垂直对齐方式 | |
| 164 | + 4、水平偏移量 | |
| 165 | + 5、垂直偏移量 | |
| 166 | + --> | |
| 167 | + <pm_advjp>1,0,2,2,-100,-40</pm_advjp> | |
| 168 | + <!-- | |
| 169 | + 前置广告跳过广告按钮的位置 | |
| 170 | + 1、是否显示0不显示,1是显示 | |
| 171 | + 2、跳过按钮触发对象(值0/1,0是直接跳转,1是触发js:function ckadjump(){}) | |
| 172 | + 3、水平对齐方式 | |
| 173 | + 4、垂直对齐方式 | |
| 174 | + 5、水平偏移量 | |
| 175 | + 6、垂直偏移量 | |
| 176 | + --> | |
| 177 | + <pm_padvc>2,0,-10,-10</pm_padvc> | |
| 178 | + <!-- | |
| 179 | + 暂停广告的关闭按钮的位置 | |
| 180 | + 1、水平对齐方式 | |
| 181 | + 2、垂直对齐方式 | |
| 182 | + 3、水平偏移量 | |
| 183 | + 4、垂直偏移量 | |
| 184 | + --> | |
| 185 | + <pm_advms>2,2,-46,-56</pm_advms> | |
| 186 | + <!-- | |
| 187 | + 滚动广告关闭按钮位置 | |
| 188 | + 1、水平对齐方式 | |
| 189 | + 2、垂直对齐方式 | |
| 190 | + 3、水平偏移量 | |
| 191 | + 4、垂直偏移量 | |
| 192 | + --> | |
| 193 | + <pm_zip>1,1,-20,-8,1,0,0</pm_zip> | |
| 194 | + <!-- | |
| 195 | + 加载皮肤压缩包时提示文字的位置 | |
| 196 | + 1、水平对齐方式,0是左对齐,1是中间对齐,2是右对齐 | |
| 197 | + 2、垂直对齐方式,0是上对齐,1是中间对齐,2是低部对齐 | |
| 198 | + 3、水平位置偏移量 | |
| 199 | + 4、垂直位置偏移量 | |
| 200 | + 5、文字对齐方式,0是左对齐,1是中间对齐,2是右对齐,3是默认对齐 | |
| 201 | + 6、文本框宽席 | |
| 202 | + 7、文本框高度 | |
| 203 | + --> | |
| 204 | + <pm_advmarquee>1,2,50,-60,50,18,0,0x000000,50,0,20,1,30,2000</pm_advmarquee> | |
| 205 | + <!-- | |
| 206 | + 滚动广告的控制,要使用的话需要在setup里的第9个参数设置成1 | |
| 207 | + 这里分二种情况,前六个参数是定位控制,第7个参数是设置定位方式(0:相对定位,1:绝对定位) | |
| 208 | + 第一种情况:第7个参数是0的时候,相对定位,就是播放器长宽变化的时候,控制栏也跟着变 | |
| 209 | + 1、默认1:中间对齐 | |
| 210 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 211 | + 3、离左边的距离 | |
| 212 | + 4、Y轴偏移量 | |
| 213 | + 5、离右边的距离 | |
| 214 | + 6、高度 | |
| 215 | + 7、定位方式 | |
| 216 | + 第二种情况:第7个参数是1的时候,绝对定位,就是播放器长宽变化的时候,控制栏不跟着变,这种方式一般使用在控制栏大小不变的时候 | |
| 217 | + 1、左中右对齐方式(0是左,1是中间,2是右) | |
| 218 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 219 | + 3、x偏移量 | |
| 220 | + 4、y偏移量 | |
| 221 | + 5、宽度 | |
| 222 | + 6、高度 | |
| 223 | + 7、定位方式 | |
| 224 | + 以上是前7个参数的作用 | |
| 225 | + 8、是文字广告的背景色 | |
| 226 | + 9、置背景色的透明度 | |
| 227 | + 10、控制滚动方向,0是水平滚动(包括左右),1是上下滚动(包括向上和向下) | |
| 228 | + 11、移动的单位时长,即移动单位像素所需要的时长,毫秒 | |
| 229 | + 12、移动的单位像素,正数同左/上,负数向右/下 | |
| 230 | + 13、是行高,这个在设置向上或向下滚动的时候有用处 | |
| 231 | + 14、控制向上或向下滚动时每次停止的时间 | |
| 232 | + --> | |
| 233 | + <pm_glowfilter>0,0x01485d, 100, 6, 3, 10, 1, 0, 0</pm_glowfilter> | |
| 234 | + <!--滚动文字广告是否采用发光滤镜 | |
| 235 | + 1、是否使用发光滤镜,0是不采用,1是使用 | |
| 236 | + 2、(default = 0xFF0000) — 光晕颜色,采用十六进制格式 0xRRGGBB。 默认值为 0xFF0000 | |
| 237 | + 3、(default = 100) — 颜色的 Alpha 透明度值。 有效值为 0 到 100。 例如,25 设置透明度为 25% | |
| 238 | + 4、(default = 6.0) — 水平模糊量。 有效值为 0 到 255(浮点)。 2 的乘方值(如 2、4、8、16 和 32)经过优化,呈现速度比其它值更快 | |
| 239 | + 5、(default = 6.0) — 垂直模糊量。 有效值为 0 到 255(浮点)。 2 的乘方值(如 2、4、8、16 和 32)经过优化,呈现速度比其它值更快 | |
| 240 | + 6、(default = 2) — 印记或跨页的强度。 该值越高,压印的颜色越深,而且发光与背景之间的对比度也越强。 有效值为 0 到 255 | |
| 241 | + 7、(default = 1) — 应用滤镜的次数 | |
| 242 | + 8、(default = 0) — 指定发光是否为内侧发光。 值 1 指定发光是内侧发光。 值 0 指定发光是外侧发光(对象外缘周围的发光) | |
| 243 | + 9、(default = 0) — 指定对象是否具有挖空效果。 值为 1 将使对象的填充变为透明,并显示文档的背景颜色背景颜色。 | |
| 244 | + --> | |
| 245 | + <advmarquee>{a href='http://www.ckplayer.com'}{font color='#FFFFFF' size='12'}这里可以放文字广告,为什么要在这里放呢,{/font}{/a}{a href='http://www.ckplayer.com'}{font color='#FFFFFF' size='12'}是因为如果你想在站外调用视频并且有文字广告的话,{/a}{br}就得在这里才能被加载,在js里是不能补加载的,{br}默认使用这里的广告,如果不想在这里使用可以清空这里的内容</advmarquee> | |
| 246 | + <!-- | |
| 247 | + 该处是滚动文字广告的内容,如果不想在这里设置,就把这里清空并且在页面中使用js的函数定义function ckmarqueeadv(){return '广告内容'} | |
| 248 | + --> | |
| 249 | + <mainfuntion></mainfuntion> | |
| 250 | + <!-- | |
| 251 | + 当flashvars里s=3/4时,调用的函数包名称,默认为空,调用时间轴上的函数setAppObj | |
| 252 | + --> | |
| 253 | + <flashplayer></flashplayer> | |
| 254 | + <!-- | |
| 255 | + 当flashvars里的s=3/4时,也可以把swf文件放在这里 | |
| 256 | + --> | |
| 257 | + <calljs>ckplayer_status,ckadjump,playerstop,ckmarqueeadv</calljs> | |
| 258 | + <!-- | |
| 259 | + 跳过广告和播放结束时调用的js函数 | |
| 260 | + --> | |
| 261 | + <myweb></myweb> | |
| 262 | + | |
| 263 | + <!-- | |
| 264 | + 以下内容部份是和插件相关的配置,请注意,自定义插件以及其配置的命名方式要注意,不要和系统的相重复,不然就会替换掉系统的相关设置,删除相关插件的话也可以同时删除相关的配置 | |
| 265 | + 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 | |
| 266 | + --> | |
| 267 | + <cpt_lights>0</cpt_lights> | |
| 268 | + <!-- | |
| 269 | + 该处定义是否使用开关灯,和right.swf插件配合作用,使用开灯效果时调用页面的js函数function closelights(){}; | |
| 270 | + --> | |
| 271 | + <cpt_share>/ckplayer/share.xml</cpt_share> | |
| 272 | + <!-- | |
| 273 | + 分享插件调用的配置文件地址 | |
| 274 | + 调用插件开始 | |
| 275 | + --> | |
| 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> | |
| 280 | +</ckplayer> | |
| 0 | 281 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ck/ckplayer/crossdomain.xml
0 → 100644
src/main/webapp/static/assets/ck/ckplayer/language.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | + <ckplayer> | |
| 3 | + <style> | |
| 4 | + <pr_zip>{font color='#FFFFFF' face='NSimSun'}已加载[$prtage]%{/font}</pr_zip> | |
| 5 | + <!-- | |
| 6 | + 加载皮肤包进度提示的文字,[$prtage]会被替换成加载百分比 | |
| 7 | + --> | |
| 8 | + <pr_load>{font color='#FFFFFF' face='NSimSun'}已加载[$prtage]%{/font}</pr_load> | |
| 9 | + <!-- | |
| 10 | + 当调用多段视频时,并且没有配置好各段视频的时间和字节数的情况下,播放器需要先读取各段视频的元数据进行计算,此时需要显示一个加载进度告诉用户已计算的情况。 | |
| 11 | + --> | |
| 12 | + <pr_noload>{font color='#FFFFFF' face='NSimSun'}加载失败{/font}</pr_noload> | |
| 13 | + <!-- | |
| 14 | + 加载视频失败时显示的内容 | |
| 15 | + --> | |
| 16 | + <pr_buffer>{font color='#FFFFFF' face='Arial'}[$buffer]%{/font}</pr_buffer> | |
| 17 | + <!-- | |
| 18 | + 视频缓冲时显示的提示,[$buffer]会被替换成缓冲的百分比数字部份 | |
| 19 | + --> | |
| 20 | + <pr_play>{font color='#FFFFFF' face='NSimSun'}点击播放{/font}</pr_play> | |
| 21 | + <!-- | |
| 22 | + 鼠标经过播放按钮时的提示,支持html | |
| 23 | + --> | |
| 24 | + <pr_pause>{font color='#FFFFFF' face='NSimSun'}点击暂停{/font}</pr_pause> | |
| 25 | + <!-- | |
| 26 | + 鼠标经过暂停按钮时的提示,支持html | |
| 27 | + --> | |
| 28 | + <pr_mute>{font color='#FFFFFF' face='NSimSun'}点击静音{/font}</pr_mute> | |
| 29 | + <!-- | |
| 30 | + 鼠标经过静音按钮时的提示,支持html | |
| 31 | + --> | |
| 32 | + <pr_nomute>{font color='#FFFFFF' face='NSimSun'}取消静音{/font}</pr_nomute> | |
| 33 | + <!-- | |
| 34 | + 鼠标经过取消静音按钮时的提示,支持html | |
| 35 | + --> | |
| 36 | + <pr_full>{font color='#FFFFFF' face='NSimSun'}点击全屏{/font}</pr_full> | |
| 37 | + <!-- | |
| 38 | + 鼠标经过全屏按钮时的提示,支持html | |
| 39 | + --> | |
| 40 | + <pr_nofull>{font color='#FFFFFF' face='NSimSun'}退出全屏{/font}</pr_nofull> | |
| 41 | + <!-- | |
| 42 | + 鼠标经过退出全屏按钮时的提示,支持html | |
| 43 | + --> | |
| 44 | + <pr_fastf>{font color='#FFFFFF' face='NSimSun'}快进{/font}</pr_fastf> | |
| 45 | + <!-- | |
| 46 | + 鼠标经过快进按钮时的提示,支持html | |
| 47 | + --> | |
| 48 | + <pr_fastr>{font color='#FFFFFF' face='NSimSun'}快退{/font}</pr_fastr> | |
| 49 | + <!-- | |
| 50 | + 鼠标经过快退按钮时的提示,支持html | |
| 51 | + --> | |
| 52 | + <pr_time>{font color='#FFFFFF' face='Arial'}[$Time]{/font}</pr_time> | |
| 53 | + <!-- | |
| 54 | + 鼠标经过进度栏时提示当前点上时间的,[$Time]会被替换成时间,支持html | |
| 55 | + --> | |
| 56 | + <pr_volume>{font color='#FFFFFF' face='NSimSun'}音量[$Volume]%{/font}</pr_volume> | |
| 57 | + <!-- | |
| 58 | + 鼠标经过音量调节框或调整音量时提示,[$Volume]会自动替换音量值(0-100) | |
| 59 | + --> | |
| 60 | + <pr_clockwait>{font color='#FFFFFF' face='Arial'}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='NSimSun'}视频直播中{/font}</pr_live> | |
| 65 | + <!-- | |
| 66 | + 在直播的情况下显示的文字 | |
| 67 | + --> | |
| 68 | + <pr_adv>{font color='#FFFFFF' size='12'}广告剩余:{font color='#FF0000' size='15'}{b}[$Second]{/b}{/font} 秒{/font}</pr_adv> | |
| 69 | + <!-- | |
| 70 | + 广告倒计时显示的内容,[$Second]将会显示倒计时的秒数 | |
| 71 | + --> | |
| 72 | + </style> | |
| 73 | + </ckplayer> | |
| 0 | 74 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ck/ckplayer/m3u8.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/related.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<ckplayer> | |
| 3 | +<title>{font color="#FFDD00" face="新宋体"}精彩视频推荐{/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/index.php?id=1</url> | |
| 33 | + <title>1:这里调用的文件配置在ckplayer/related.xml里</title> | |
| 34 | + </related> | |
| 35 | + <related> | |
| 36 | + <img>temp/2.jpg</img> | |
| 37 | + <url>http://www.ckplayer.com/index.php?id=2</url> | |
| 38 | + <title>2:支持多页调用</title> | |
| 39 | + </related> | |
| 40 | + <related> | |
| 41 | + <img>temp/3.jpg</img> | |
| 42 | + <url>http://www.ckplayer.com/index.php?id=3</url> | |
| 43 | + <title>3:文本请保持在二行,不能多于三行,多于三行将不显示</title> | |
| 44 | + </related> | |
| 45 | + <related> | |
| 46 | + <img>temp/4.jpg</img> | |
| 47 | + <url>http://www.ckplayer.com/index.php?id=3</url> | |
| 48 | + <title>4:支持多行调用,多页调用</title> | |
| 49 | + </related> | |
| 50 | + <related> | |
| 51 | + <img>temp/5.jpg</img> | |
| 52 | + <url>http://www.ckplayer.com/index.php?id=2</url> | |
| 53 | + <title>5:感谢对ckplayer的支持</title> | |
| 54 | + </related> | |
| 55 | + <related> | |
| 56 | + <img>temp/6.jpg</img> | |
| 57 | + <url>http://www.ckplayer.com/index.php?id=1</url> | |
| 58 | + <title>6:最多两行,请不要超过二行</title> | |
| 59 | + </related> | |
| 60 | + <related> | |
| 61 | + <img>temp/3.jpg</img> | |
| 62 | + <url>http://www.ckplayer.com/index.php?id=1</url> | |
| 63 | + <title>7:这里调用的文件配置在ckplayer/related.xml里</title> | |
| 64 | + </related> | |
| 65 | + <related> | |
| 66 | + <img>temp/5.jpg</img> | |
| 67 | + <url>http://www.ckplayer.com/index.php?id=2</url> | |
| 68 | + <title>8:支持多页调用</title> | |
| 69 | + </related> | |
| 70 | + <related> | |
| 71 | + <img>temp/4.jpg</img> | |
| 72 | + <url>http://www.ckplayer.com/index.php?id=3</url> | |
| 73 | + <title>9:文本请保持在二行,不能多于三行,多于三行将不显示</title> | |
| 74 | + </related> | |
| 75 | + <related> | |
| 76 | + <img>temp/1.jpg</img> | |
| 77 | + <url>http://www.ckplayer.com/index.php?id=3</url> | |
| 78 | + <title>10:支持多行调用,多页调用</title> | |
| 79 | + </related> | |
| 80 | + <related> | |
| 81 | + <img>temp/2.jpg</img> | |
| 82 | + <url>http://www.ckplayer.com/index.php?id=2</url> | |
| 83 | + <title>11:感谢对ckplayer的支持</title> | |
| 84 | + </related> | |
| 85 | + <related> | |
| 86 | + <img>temp/6.jpg</img> | |
| 87 | + <url>http://www.ckplayer.com/index.php?id=1</url> | |
| 88 | + <title>12:最多两行,请不要超过二行</title> | |
| 89 | + </related> | |
| 90 | + <related> | |
| 91 | + <img>temp/5.jpg</img> | |
| 92 | + <url>http://www.ckplayer.com/index.php?id=1</url> | |
| 93 | + <title>13:这里调用的文件配置在ckplayer/related.xml里</title> | |
| 94 | + </related> | |
| 95 | + <related> | |
| 96 | + <img>temp/4.jpg</img> | |
| 97 | + <url>http://www.ckplayer.com/index.php?id=2</url> | |
| 98 | + <title>14:支持多页调用</title> | |
| 99 | + </related> | |
| 100 | + <related> | |
| 101 | + <img>temp/6.jpg</img> | |
| 102 | + <url>http://www.ckplayer.com/index.php?id=3</url> | |
| 103 | + <title>15:文本请保持在二行,不能多于三行,多于三行将不显示</title> | |
| 104 | + </related> | |
| 105 | + <related> | |
| 106 | + <img>temp/3.jpg</img> | |
| 107 | + <url>http://www.ckplayer.com/index.php?id=3</url> | |
| 108 | + <title>16:支持多行调用,多页调用</title> | |
| 109 | + </related> | |
| 110 | + <related> | |
| 111 | + <img>temp/1.jpg</img> | |
| 112 | + <url>http://www.ckplayer.com/index.php?id=2</url> | |
| 113 | + <title>17:感谢对ckplayer的支持</title> | |
| 114 | + </related> | |
| 115 | + <related> | |
| 116 | + <img>temp/2.jpg</img> | |
| 117 | + <url>http://www.ckplayer.com/index.php?id=1</url> | |
| 118 | + <title>18:最多两行,请不要超过二行</title> | |
| 119 | + </related> | |
| 120 | + </relatedlist> | |
| 121 | +</ckplayer> | |
| 0 | 122 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ck/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 | 62 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ck/ckplayer/share/feixin.png
0 → 100644
2.16 KB
src/main/webapp/static/assets/ck/ckplayer/share/google.png
0 → 100644
1.78 KB
src/main/webapp/static/assets/ck/ckplayer/style.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style.zip
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style/Preview.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style/adjustment.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style/buffer.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style/cklogo.png
0 → 100644
1.44 KB
src/main/webapp/static/assets/ck/ckplayer/style/images_Fashf_on.png
0 → 100644
333 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Fashf_out.png
0 → 100644
199 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Fashr_on.png
0 → 100644
333 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Fashr_out.png
0 → 100644
204 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Full_on.png
0 → 100644
886 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Full_out.png
0 → 100644
395 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_General_on.png
0 → 100644
850 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_General_out.png
0 → 100644
421 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Mute_on.png
0 → 100644
759 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Mute_out.png
0 → 100644
338 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Pause_Scgedyke.png
0 → 100644
2.58 KB
src/main/webapp/static/assets/ck/ckplayer/style/images_Pause_Scgedyke_on.png
0 → 100644
4.08 KB
src/main/webapp/static/assets/ck/ckplayer/style/images_Pause_on.png
0 → 100644
320 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Pause_out.png
0 → 100644
283 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Play_on.png
0 → 100644
506 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Play_out.png
0 → 100644
571 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Schedule.png
0 → 100644
468 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Schedule_bg.png
0 → 100644
133 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Schedule_load.png
0 → 100644
133 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Schedule_on.png
0 → 100644
611 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Schedule_play.png
0 → 100644
133 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Sound_on.png
0 → 100644
687 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Sound_out.png
0 → 100644
305 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Volume_Float.png
0 → 100644
372 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Volume_Float_on.png
0 → 100644
526 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Volume_back.png
0 → 100644
167 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_Volume_on.png
0 → 100644
168 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_adv_skip_on.png
0 → 100644
434 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_adv_skip_out.png
0 → 100644
431 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_buttom_bg.png
0 → 100644
172 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_close_adv_on.png
0 → 100644
603 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_close_adv_out.png
0 → 100644
612 Bytes
src/main/webapp/static/assets/ck/ckplayer/style/images_v_off_on.png
0 → 100644
1.19 KB
src/main/webapp/static/assets/ck/ckplayer/style/images_v_off_out.png
0 → 100644
1.24 KB
src/main/webapp/static/assets/ck/ckplayer/style/images_v_on_on.png
0 → 100644
1.36 KB
src/main/webapp/static/assets/ck/ckplayer/style/images_v_on_out.png
0 → 100644
1.43 KB
src/main/webapp/static/assets/ck/ckplayer/style/logo.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style/pause_adv_close_on.png
0 → 100644
1.13 KB
src/main/webapp/static/assets/ck/ckplayer/style/pause_adv_close_out.png
0 → 100644
1.98 KB
src/main/webapp/static/assets/ck/ckplayer/style/related.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style/right.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style/share.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ck/ckplayer/style/style.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<ckplayer> | |
| 3 | + <style> | |
| 4 | + <controlbar>images_buttom_bg.png</controlbar> | |
| 5 | + <!-- | |
| 6 | + 控制栏背景图片 | |
| 7 | + --> | |
| 8 | + <cplay>images_Play_out.png,images_Play_on.png</cplay> | |
| 9 | + <!-- | |
| 10 | + 播放按钮的二个图片 | |
| 11 | + 1、普通状态下的图片 | |
| 12 | + 2、鼠标经过时的图片 | |
| 13 | + --> | |
| 14 | + <cpause>images_Pause_out.png,images_Pause_on.png</cpause> | |
| 15 | + <!-- | |
| 16 | + 暂停按钮的二个图片 | |
| 17 | + 1、普通状态下的图片 | |
| 18 | + 2、鼠标经过时的图片 | |
| 19 | + --> | |
| 20 | + <pausec>images_Pause_Scgedyke.png,images_Pause_Scgedyke_on.png</pausec> | |
| 21 | + <!-- | |
| 22 | + 播放器中间暂停按钮的二个图片 | |
| 23 | + 1、普通状态下的图片 | |
| 24 | + 2、鼠标经过时的图片 | |
| 25 | + --> | |
| 26 | + <sound>images_Sound_out.png,images_Sound_on.png</sound> | |
| 27 | + <!-- | |
| 28 | + 静音按钮的二个图片 | |
| 29 | + 1、普通状态下的图片 | |
| 30 | + 2、鼠标经过时的图片 | |
| 31 | + --> | |
| 32 | + <mute>images_Mute_out.png,images_Mute_on.png</mute> | |
| 33 | + <!-- | |
| 34 | + 取消静音按钮的二个图片 | |
| 35 | + 1、普通状态下的图片 | |
| 36 | + 2、鼠标经过时的图片 | |
| 37 | + --> | |
| 38 | + <full>images_Full_out.png,images_Full_on.png</full> | |
| 39 | + <!-- | |
| 40 | + 全屏按钮的二个图片 | |
| 41 | + 1、普通状态下的图片 | |
| 42 | + 2、鼠标经过时的图片 | |
| 43 | + --> | |
| 44 | + <general>images_General_out.png,images_General_on.png</general> | |
| 45 | + <!-- | |
| 46 | + 取消全屏按钮的二个图片 | |
| 47 | + 1、普通状态下的图片 | |
| 48 | + 2、鼠标经过时的图片 | |
| 49 | + --> | |
| 50 | + <cvolume>images_Volume_back.png,images_Volume_on.png,images_Volume_Float.png,images_Volume_Float_on.png</cvolume> | |
| 51 | + <!-- | |
| 52 | + 音量调节框的四个图片 | |
| 53 | + 1、调节框的背景图片(显示总体音量,1-100) | |
| 54 | + 2、调节框的前景图片(显示当前音量的) | |
| 55 | + 3、拖动按钮普通状态下的图片 | |
| 56 | + 4、拖动按钮鼠标经过时的图片 | |
| 57 | + --> | |
| 58 | + <schedule>images_Schedule_bg.png,images_Schedule_load.png,images_Schedule_play.png,images_Schedule.png,images_Schedule_on.png</schedule> | |
| 59 | + <!-- | |
| 60 | + 进度栏的五个图片 | |
| 61 | + 1、进度栏背景图片 | |
| 62 | + 2、已加载进度图片 | |
| 63 | + 3、已播放进度图片 | |
| 64 | + 4、拖动按钮普通状态下的图片 | |
| 65 | + 5、拖动按钮鼠标经过时的图片 | |
| 66 | + --> | |
| 67 | + <fast>images_Fashf_out.png,images_Fashf_on.png,images_Fashr_out.png,images_Fashr_on.png</fast> | |
| 68 | + <!-- | |
| 69 | + 快进和快退按钮图片 | |
| 70 | + 1、快进按钮普通状态下的图片 | |
| 71 | + 2、快进按钮鼠标经过时的图片 | |
| 72 | + 3、快退按钮普通状态下的图片 | |
| 73 | + 4、快退按钮鼠标经过时的图片 | |
| 74 | + --> | |
| 75 | + <advmute>images_v_off_out.png,images_v_off_on.png,images_v_on_out.png,images_v_on_on.png</advmute> | |
| 76 | + <!-- | |
| 77 | + 前置广告时静音按钮的四个图片 | |
| 78 | + 1、静音按钮普通状态下的图片 | |
| 79 | + 2、静音按钮鼠标经过时的图片 | |
| 80 | + 3、取消静音按钮普通状态下的图片 | |
| 81 | + 4、取消静音按钮鼠标经过时的图 | |
| 82 | + --> | |
| 83 | + <advjump>images_adv_skip_out.png,images_adv_skip_on.png</advjump> | |
| 84 | + <!-- | |
| 85 | + 前置广告时路过按钮的二个图片 | |
| 86 | + 1、普通状态下的图片 | |
| 87 | + 2、鼠标经过时的图片 | |
| 88 | + --> | |
| 89 | + <advclose>images_close_adv_out.png,images_close_adv_on.png</advclose> | |
| 90 | + <!-- | |
| 91 | + 关闭滚动文字广告按钮的二个图片 | |
| 92 | + 1、普通状态下的图片 | |
| 93 | + 2、鼠标经过时的图片 | |
| 94 | + --> | |
| 95 | + <padvclose>pause_adv_close_out.png,pause_adv_close_on.png</padvclose> | |
| 96 | + <!-- | |
| 97 | + 关闭暂停广告按钮的二个图片 | |
| 98 | + 1、普通状态下的图片 | |
| 99 | + 2、鼠标经过时的图片 | |
| 100 | + --> | |
| 101 | + <pm_tween>50,300,300</pm_tween> | |
| 102 | + <!-- | |
| 103 | + 1、控制栏向下缓动的距离,0是不缓动直接隐藏,1是透明度从1到0缓动,>1则是向下缓动,数值是向下缓动的距离 | |
| 104 | + 2、控制栏缓动的毫秒数 | |
| 105 | + 3、视频在播放器尺寸变化时是否采用缓动效果,0是不缓动,>0是采用缓动的秒数 | |
| 106 | + --> | |
| 107 | + <buffer>buffer.swf</buffer> | |
| 108 | + <!--缓冲时显示的图标--> | |
| 109 | + <!--以上是播放器用到的按钮和控制栏的图片,可以自己更改图片样式和坐标,坐标在本文档里配置--> | |
| 110 | + <pm_load>1,1,-30,10,0,200,0</pm_load> | |
| 111 | + <!-- | |
| 112 | + 提示加载视频百分比的文本框 | |
| 113 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 114 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 115 | + 3、水平偏移量 | |
| 116 | + 4、垂直偏移量 | |
| 117 | + 5、文本对齐方式:0是左对齐,1是中间对齐,2是右对齐,3是默认对齐(相当于左对齐) | |
| 118 | + 6、文本框的宽,只有在左/右对齐时有效 | |
| 119 | + 7、文本框的高 | |
| 120 | + 特别说明:在所有关于文本的控制中,只有设置了左右对齐,后面的宽度才会有效果,如果设置的中间对齐,则宽度无效果 | |
| 121 | + --> | |
| 122 | + <pm_buffer>1,1,-20,-35</pm_buffer> | |
| 123 | + <!--缓冲时显示的图标(buffer图标)的坐标--> | |
| 124 | + <pm_buffertext>1,1,-13,-25,0,40,0</pm_buffertext> | |
| 125 | + <!-- | |
| 126 | + 缓冲文本框(提示加载百分比)的坐标 | |
| 127 | + 缓冲进度文本框(提示缓冲百分比)的坐标 | |
| 128 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 129 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 130 | + 3、水平偏移量 | |
| 131 | + 4、垂直偏移量 | |
| 132 | + 5、文本对齐方式:0是左对齐,1是中间对齐,2是右对齐,3是默认对齐(相当于左对齐) | |
| 133 | + 6、文本框的宽,只有在左/右对齐时有效 | |
| 134 | + 7、文本框的高 | |
| 135 | + 特别说明:在所有关于文本的控制中,只有设置了左右对齐,后面的宽度才会有效果,如果设置的中间对齐,则宽度无效果 | |
| 136 | + --> | |
| 137 | + <pm_ctbar>1,2,0,-30,0,30,0</pm_ctbar> | |
| 138 | + <!-- | |
| 139 | + 控制栏的参数(进度栏和滚动文字广告栏的坐标也是7个参数,都参考这里) | |
| 140 | + 这里分二种情况,前六个参数是控制第7个参数是设置定位方式(0:相对定位,1:绝对定位) | |
| 141 | + 第一种情况:第7个参数是0的时候,相对定位,就是播放器长宽变化的时候,控制栏也跟着变 | |
| 142 | + 1、默认1:中间对齐 | |
| 143 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 144 | + 3、离左边的距离 | |
| 145 | + 4、Y轴偏移量 | |
| 146 | + 5、离右边的距离 | |
| 147 | + 6、高度 | |
| 148 | + 7、定位方式 | |
| 149 | + 第二种情况:第7个参数是1的时候,绝对定位,就是播放器长宽变化的时候,控制栏不跟着变,这种方式一般使用在控制栏大小不变的时候 | |
| 150 | + 1、左中右对齐方式(0是左,1是中间,2是右) | |
| 151 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 152 | + 3、x偏移量 | |
| 153 | + 4、y偏移量 | |
| 154 | + 5、宽度 | |
| 155 | + 6、高度 | |
| 156 | + 7、定位方式 | |
| 157 | + --> | |
| 158 | + <pm_sch>1,2,15,-37,15,5,0,14,14</pm_sch> | |
| 159 | + <!-- | |
| 160 | + 进度条的参数,这里分二种情况 | |
| 161 | + 第一种情况:第7个参数是0的时候,相对定位,就是播放器长宽变化的时候,控制栏也跟着变 | |
| 162 | + 1、默认1:中间对齐 | |
| 163 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 164 | + 3、离左边的距离 | |
| 165 | + 4、Y轴偏移量 | |
| 166 | + 5、离右边的距离 | |
| 167 | + 6、高度 | |
| 168 | + 7、定位方式 | |
| 169 | + 8、拖动按钮的宽 | |
| 170 | + 9、拖动按钮的高 | |
| 171 | + 第二种情况:第7个参数是1的时候,绝对定位,就是播放器长宽变化的时候,控制栏不跟着变,这种方式一般使用在控制栏大小不变的时候 | |
| 172 | + 1、左中右对齐方式(0是左,1是中间,2是右) | |
| 173 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 174 | + 3、x偏移量 | |
| 175 | + 4、y偏移量 | |
| 176 | + 5、宽度 | |
| 177 | + 6、高度 | |
| 178 | + 7、定位方式 | |
| 179 | + 8、拖动按钮的宽 | |
| 180 | + 9、拖动按钮的高 | |
| 181 | + --> | |
| 182 | + <pm_play>0,2,0,-30,35,30</pm_play> | |
| 183 | + <!-- | |
| 184 | + 播放按钮的位置 | |
| 185 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 186 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 187 | + 3、水平偏移量 | |
| 188 | + 4、垂直偏移量 | |
| 189 | + 5、按钮宽 | |
| 190 | + 6、按钮高 | |
| 191 | + --> | |
| 192 | + <pm_clock>0,2,100,-25,2,0,0</pm_clock> | |
| 193 | + <!-- | |
| 194 | + 显示当前播放时间和总时间的位置,这个要跟pr_clock的设置配合使用 | |
| 195 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 196 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 197 | + 3、水平偏移量 | |
| 198 | + 4、垂直偏移量 | |
| 199 | + 5、文本对齐方式(0左,1中,2右) | |
| 200 | + 6、宽度 | |
| 201 | + 7、高度 | |
| 202 | + --> | |
| 203 | + <pm_clock2>0,2,40,-25,0,0,0</pm_clock2> | |
| 204 | + <!--该功能跟pm_clock的功能一致,主要是为了在做风格时需要在二个不同的地方显示已播放时间和总时间时使用--> | |
| 205 | + <pr_clock></pr_clock> | |
| 206 | + <!-- | |
| 207 | + 这里显示播放时间和总时间,[$Time]会被替换成已播放时间,[$TimeAll]会被替换成总时间 | |
| 208 | + [$Timewait]参数会被替换成在默认不加载的时候并且没有设置各段视频的时间和字节的时候显示pr_clockwait的值 | |
| 209 | + --> | |
| 210 | + <pr_clock2>{font color='#FFFFFF' size='12' face='Arial'}[$Time] | [$TimeAll][$Timewait]{/font}</pr_clock2> | |
| 211 | + <!-- | |
| 212 | + 这里显示播放时间和总时间,[$Time]会被替换成已播放时间,[$TimeAll]会被替换成总时间 | |
| 213 | + [$Timewait]参数会被替换成在默认不加载的时候并且没有设置各段视频的时间和字节的时候显示pr_clockwait的值 | |
| 214 | + ck.pr_clock和ck.pr_clock2配合使用可以同时在二个不同的位置显示已播放时间和总时间 | |
| 215 | + --> | |
| 216 | + <pm_timestyle>1</pm_timestyle> | |
| 217 | + <!-- | |
| 218 | + 时间显示样式,0是显示为“分:秒”,1是显示为“时:分:秒” | |
| 219 | + --> | |
| 220 | + <pm_full>2,2,-35,-30,35,30</pm_full> | |
| 221 | + <!-- | |
| 222 | + 全屏和取消全屏按钮的坐标 | |
| 223 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 224 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 225 | + 3、水平偏移量 | |
| 226 | + 4、垂直偏移量 | |
| 227 | + 5、宽度 | |
| 228 | + 6、高度 | |
| 229 | + --> | |
| 230 | + <pm_vol>2,2,-95,-18,53,4,12,12</pm_vol> | |
| 231 | + <!-- | |
| 232 | + 音量调节框的坐标 | |
| 233 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 234 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 235 | + 3、水平偏移量 | |
| 236 | + 4、垂直偏移量 | |
| 237 | + 5、音量控制区域的宽度 | |
| 238 | + 6、音量控制区域的高度 | |
| 239 | + 7、拖动按钮的宽度 | |
| 240 | + 8、拖动按钮的高度 | |
| 241 | + --> | |
| 242 | + <pm_sound>2,2,-130,-30,35,30</pm_sound> | |
| 243 | + <!-- | |
| 244 | + 静音和取消静音的坐标 | |
| 245 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 246 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 247 | + 3、水平偏移量 | |
| 248 | + 4、垂直偏移量 | |
| 249 | + 5、宽度 | |
| 250 | + 6、高度 | |
| 251 | + --> | |
| 252 | + <pm_fastf>2,2,-13,-39,13,9</pm_fastf> | |
| 253 | + <!-- | |
| 254 | + 快进按钮的坐标 | |
| 255 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 256 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 257 | + 3、水平偏移量 | |
| 258 | + 4、垂直偏移量 | |
| 259 | + 5、宽度 | |
| 260 | + 6、高度 | |
| 261 | + --> | |
| 262 | + <pm_fastr>0,2,0,-39,13,9</pm_fastr> | |
| 263 | + <!-- | |
| 264 | + 快退按钮的坐标 | |
| 265 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 266 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 267 | + 3、水平偏移量 | |
| 268 | + 4、垂直偏移量 | |
| 269 | + 5、宽度 | |
| 270 | + 6、高度 | |
| 271 | + --> | |
| 272 | + <pm_pa>1,1,-33,-50,66,66,0,2,10,-120</pm_pa> | |
| 273 | + <!-- | |
| 274 | + 中间暂停按钮的坐标控制,四个一组 | |
| 275 | + 1、没有暂停广告时水平对齐方式,0是左,1是中,2是右 | |
| 276 | + 2、没有暂停广告时垂直对齐方式,0是上,1是中,2是下 | |
| 277 | + 3、没有暂停广告时水平偏移量 | |
| 278 | + 4、没有暂停广告时垂直偏移量 | |
| 279 | + 5、宽度 | |
| 280 | + 6、高度 | |
| 281 | + 7、有暂停广告时水平对齐方式,0是左,1是中,2是右 | |
| 282 | + 8、有暂停广告时垂直对齐方式,0是上,1是中,2是下 | |
| 283 | + 9、有暂停广告时水平偏移量 | |
| 284 | + 10、有暂停广告时垂直偏移量 | |
| 285 | + --> | |
| 286 | + <pm_bg>0x000000,100,230,180</pm_bg> | |
| 287 | + <!-- | |
| 288 | + 播放器整体的背景配置 | |
| 289 | + 1、整体背景颜色 | |
| 290 | + 2、背景透明度 | |
| 291 | + 3、播放器最小宽度 | |
| 292 | + 4、播放器最小高度 | |
| 293 | + 3,4二个值主要是控制不让播放器上各元素错位 | |
| 294 | + --> | |
| 295 | + <pm_video>0,0,0,0,0xffdd00,0,0,0,0,0</pm_video> | |
| 296 | + <!-- | |
| 297 | + 视频固定区域 | |
| 298 | + 1、控制栏未隐藏时左边预留宽 | |
| 299 | + 2、控制栏未隐藏时上面预留高度 | |
| 300 | + 3、控制栏未隐藏时右边预留宽度 | |
| 301 | + 4、控制栏未隐藏时下面预留高度 | |
| 302 | + 5、该区域背景颜色 | |
| 303 | + 6、该区域背景透明度 | |
| 304 | + 7、控制栏隐藏时左边预留宽 | |
| 305 | + 8、控制栏隐藏时上面预留高度 | |
| 306 | + 9、控制栏隐藏时右边预留宽度 | |
| 307 | + 10、控制栏隐藏时下面预留高度 | |
| 308 | + --> | |
| 309 | + <pm_pr>0x000000,0xFFFFFF,0xffffff,0,30,80,10</pm_pr> | |
| 310 | + <!-- | |
| 311 | + 鼠标经过按钮或进度栏显示一个文字提示框 | |
| 312 | + 1、提示框背景颜色 | |
| 313 | + 2、边框颜色 | |
| 314 | + 3、文字的颜色 | |
| 315 | + 4、边框的弧度 | |
| 316 | + 5、提示框透明度 | |
| 317 | + 6、文字透明度 | |
| 318 | + 7、离按钮的距离,这里指提示框的底部离所需提示的按钮上方的距离 | |
| 319 | + --> | |
| 320 | + <pm_advbg>0x000000,100</pm_advbg> | |
| 321 | + <!-- | |
| 322 | + 播放前置广告时底部颜色和透明度,这是一个层,主要用来遮住播放器上的所有元件和元素,不让用户点击 | |
| 323 | + 1、底部颜色 | |
| 324 | + 2、透明度 | |
| 325 | + --> | |
| 326 | + <pm_start>8,5,0xFFFFFF,100</pm_start> | |
| 327 | + <!-- | |
| 328 | + 进度栏提示点宽,高,颜色,透明度,这是用来制作在进度栏上根据设定的内容为观看者提供视频里关键时间点内容简介的指示块 | |
| 329 | + --> | |
| 330 | + <pm_sce>3,0x6E6E6E,100,0xFF0000,100</pm_sce> | |
| 331 | + <!-- | |
| 332 | + 当控制栏隐藏时在底部显示一个进度条 | |
| 333 | + 1、进度条的高度 | |
| 334 | + 2、底部颜色 | |
| 335 | + 3、底部颜色透明度 | |
| 336 | + 4、进度颜色 | |
| 337 | + 5、进度颜色的透明度 | |
| 338 | + --> | |
| 339 | + <author></author> | |
| 340 | + <!-- | |
| 341 | + 风格作者的昵称和链接地址,昵称和链接地址之间用逗号隔开 | |
| 342 | + --> | |
| 343 | + </style> | |
| 344 | +</ckplayer> | |
| 0 | 345 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ck/crossdomain.xml
0 → 100644
src/main/webapp/static/assets/ck/demo.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 3 | +<head> | |
| 4 | +<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /> | |
| 5 | +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| 6 | +<title>ckplayer简单调用演示</title> | |
| 7 | +<style type="text/css"> | |
| 8 | +* { | |
| 9 | + margin: 0; | |
| 10 | + padding: 0; | |
| 11 | +} | |
| 12 | + | |
| 13 | +button { | |
| 14 | + background: none; | |
| 15 | + border: none; | |
| 16 | +} | |
| 17 | + | |
| 18 | +.loadTemplate { | |
| 19 | + margin: 0 auto; | |
| 20 | + display: block; | |
| 21 | +} | |
| 22 | + | |
| 23 | +.btnContainer { | |
| 24 | + width: 100%; | |
| 25 | + height: 50px; | |
| 26 | + box-sizing: border-box; | |
| 27 | + position: absolute; | |
| 28 | + bottom: 0; | |
| 29 | + left: 0; | |
| 30 | + background: rgba(0, 0, 0, 0.8); | |
| 31 | + z-index: 5; | |
| 32 | + border-top-: 1px solid #c0c0c0; | |
| 33 | +} | |
| 34 | + | |
| 35 | +.btnPlay { | |
| 36 | + width: 30px; | |
| 37 | + height: 30px; | |
| 38 | + display: inline-block; | |
| 39 | + float: left; | |
| 40 | + background: url(images/play.png) 0 0 no-repeat; | |
| 41 | + background-size: 100% 100%; | |
| 42 | + border: none; | |
| 43 | + margin: 10px 20px; | |
| 44 | +} | |
| 45 | + | |
| 46 | +.set { | |
| 47 | + width: 50px; | |
| 48 | + height: 30px; | |
| 49 | + display: inline-block; | |
| 50 | + float: right; | |
| 51 | + border: 1px solid #fff; | |
| 52 | + margin: 8px 20px; | |
| 53 | + color: #fff; | |
| 54 | +} | |
| 55 | + | |
| 56 | +@-webkit-keyframes DivZoom { | |
| 57 | + 0% { | |
| 58 | + -webkit-transform: scale(0.01) | |
| 59 | + } | |
| 60 | + | |
| 61 | + 60% { | |
| 62 | + -webkit-transform: scale(1.05) | |
| 63 | + } | |
| 64 | + | |
| 65 | + 80% { | |
| 66 | + -webkit-transform: scale(0.95) | |
| 67 | + } | |
| 68 | + | |
| 69 | + 100% { | |
| 70 | + -webkit-transform: scale(1.00) | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | |
| 74 | + | |
| 75 | +.sZoom { | |
| 76 | + -webkit-animation: DivZoom 0.5s ease-in-out; | |
| 77 | +} | |
| 78 | + | |
| 79 | +/*.cZoom {visibility:hidden;}*/ | |
| 80 | +.cZoom { | |
| 81 | + -webkit-transition: all 1s ease-in-out; | |
| 82 | + -webkit-transform: rotate(360deg) scale(0.1); | |
| 83 | +} | |
| 84 | + | |
| 85 | +.dialog-content { | |
| 86 | + position: absolute; | |
| 87 | + top: 50%; | |
| 88 | + margin-top: -60px; | |
| 89 | + width: 260px; | |
| 90 | + height: 120px; | |
| 91 | + line-height: 120px; | |
| 92 | + padding-left: 8px; | |
| 93 | + padding-right: 8px; | |
| 94 | + color: #FFF; | |
| 95 | + text-shadow: 1px 1px 1px #000; | |
| 96 | + text-align: center; | |
| 97 | + background-color: RGBA(0, 0, 0, 0.9); | |
| 98 | + z-index: 10; | |
| 99 | + left: 50%; | |
| 100 | + margin-left: -130px; | |
| 101 | +} | |
| 102 | + | |
| 103 | +.mask { | |
| 104 | + width: 100%; | |
| 105 | + height: 100%; | |
| 106 | + position: absolute; | |
| 107 | + background: #000; | |
| 108 | + z-index: 9; | |
| 109 | + top: 0; | |
| 110 | + left: 0; | |
| 111 | +} | |
| 112 | + | |
| 113 | +.grayButton { | |
| 114 | + width: 200px; | |
| 115 | + display: block; | |
| 116 | + border-width: 0 12px; | |
| 117 | + padding: 10px; | |
| 118 | + text-align: center; | |
| 119 | + font-size: 20px; | |
| 120 | + font-weight: bold; | |
| 121 | + text-decoration: inherit; | |
| 122 | + color: inherit; | |
| 123 | +} | |
| 124 | + | |
| 125 | +.duration { | |
| 126 | + float: left; | |
| 127 | + height: 30px; | |
| 128 | + line-height: 30px; | |
| 129 | + color: #fff; | |
| 130 | + margin: 10px; | |
| 131 | +} | |
| 132 | + | |
| 133 | +.dialog-content span.movieType { | |
| 134 | + padding: 10px; | |
| 135 | + border: 1px solid #fff; | |
| 136 | +} | |
| 137 | +</style> | |
| 138 | +</head> | |
| 139 | +<body> | |
| 140 | +<div id="a1"> | |
| 141 | + | |
| 142 | +</div> | |
| 143 | +<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8"></script> | |
| 144 | +<script type="text/javascript" src="js/video.js"></script> | |
| 145 | +<script type="text/javascript"> | |
| 146 | + var BASE_URL = "", | |
| 147 | + prefix = "http", | |
| 148 | + isHLS = true, | |
| 149 | + url = "http://video-web.ks3-cn-beijing.ksyun.com/video/data2/2016/0102/98852/800/1e8e7823a1a74355b637705419ed3e1b_98852_800.m3u8"; | |
| 150 | + var isMobile = function () { | |
| 151 | + var check = false; | |
| 152 | + (function (a) { | |
| 153 | + if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) | |
| 154 | + check = true | |
| 155 | + })(navigator.userAgent || navigator.vendor || window.opera); | |
| 156 | + return check; | |
| 157 | + } | |
| 158 | + if (isMobile()){ | |
| 159 | + new ksVideo({ | |
| 160 | + container:"a1", | |
| 161 | + url: url, | |
| 162 | + width:600, | |
| 163 | + height:200, | |
| 164 | + face:"mp4.png" | |
| 165 | + }); | |
| 166 | + } else { | |
| 167 | + var flashvars; | |
| 168 | + // 播放器参数说明地址:http://www.ckplayer.com/tool/help/29.htm | |
| 169 | + if (prefix == "http" && isHLS){ | |
| 170 | + flashvars = { | |
| 171 | + f : BASE_URL + 'ckplayer/m3u8.swf', | |
| 172 | + a : url || 'http://kssws.ks-cdn.com/20121218/abc.mp4-640x480-b211ebb6.mp4', | |
| 173 | + c : 0, | |
| 174 | + s : 4, | |
| 175 | + lv: 1//注意,是否锁定进度栏 0:不锁定,1:锁定。如果是直播,需设置lv:1 | |
| 176 | + } | |
| 177 | + } else if (prefix == "rtmp" || !isHLS){ | |
| 178 | + flashvars = { | |
| 179 | + f : url || 'http://kssws.ks-cdn.com/20121218/abc.mp4-640x480-b211ebb6.mp4', | |
| 180 | + p : 1, | |
| 181 | + c : 0, //调用配置方式 =0:调用ckplayer.js | |
| 182 | + lv: 1 | |
| 183 | + } | |
| 184 | + } | |
| 185 | + var params = { | |
| 186 | + bgcolor:'#FFF', | |
| 187 | + allowFullScreen:true, | |
| 188 | + allowScriptAccess:'always', | |
| 189 | + wmode:'transparent' | |
| 190 | + }; | |
| 191 | + CKobject.embed('ckplayer/ckplayer.swf','a1','ckplayer_a1','600', '400', false, flashvars) | |
| 192 | + } | |
| 193 | +</script> | |
| 194 | +</body> | |
| 195 | +</html> | ... | ... |
src/main/webapp/static/assets/ck/demo.html.bak
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 3 | +<head> | |
| 4 | +<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /> | |
| 5 | +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| 6 | +<title>ckplayer简单调用演示</title> | |
| 7 | +<style type="text/css"> | |
| 8 | +* { | |
| 9 | + margin: 0; | |
| 10 | + padding: 0; | |
| 11 | +} | |
| 12 | + | |
| 13 | +button { | |
| 14 | + background: none; | |
| 15 | + border: none; | |
| 16 | +} | |
| 17 | + | |
| 18 | +.loadTemplate { | |
| 19 | + margin: 0 auto; | |
| 20 | + display: block; | |
| 21 | +} | |
| 22 | + | |
| 23 | +.btnContainer { | |
| 24 | + width: 100%; | |
| 25 | + height: 50px; | |
| 26 | + box-sizing: border-box; | |
| 27 | + position: absolute; | |
| 28 | + bottom: 0; | |
| 29 | + left: 0; | |
| 30 | + background: rgba(0, 0, 0, 0.8); | |
| 31 | + z-index: 5; | |
| 32 | + border-top-: 1px solid #c0c0c0; | |
| 33 | +} | |
| 34 | + | |
| 35 | +.btnPlay { | |
| 36 | + width: 30px; | |
| 37 | + height: 30px; | |
| 38 | + display: inline-block; | |
| 39 | + float: left; | |
| 40 | + background: url(images/play.png) 0 0 no-repeat; | |
| 41 | + background-size: 100% 100%; | |
| 42 | + border: none; | |
| 43 | + margin: 10px 20px; | |
| 44 | +} | |
| 45 | + | |
| 46 | +.set { | |
| 47 | + width: 50px; | |
| 48 | + height: 30px; | |
| 49 | + display: inline-block; | |
| 50 | + float: right; | |
| 51 | + border: 1px solid #fff; | |
| 52 | + margin: 8px 20px; | |
| 53 | + color: #fff; | |
| 54 | +} | |
| 55 | + | |
| 56 | +@-webkit-keyframes DivZoom { | |
| 57 | + 0% { | |
| 58 | + -webkit-transform: scale(0.01) | |
| 59 | + } | |
| 60 | + | |
| 61 | + 60% { | |
| 62 | + -webkit-transform: scale(1.05) | |
| 63 | + } | |
| 64 | + | |
| 65 | + 80% { | |
| 66 | + -webkit-transform: scale(0.95) | |
| 67 | + } | |
| 68 | + | |
| 69 | + 100% { | |
| 70 | + -webkit-transform: scale(1.00) | |
| 71 | + } | |
| 72 | + | |
| 73 | +} | |
| 74 | + | |
| 75 | +.sZoom { | |
| 76 | + -webkit-animation: DivZoom 0.5s ease-in-out; | |
| 77 | +} | |
| 78 | + | |
| 79 | +/*.cZoom {visibility:hidden;}*/ | |
| 80 | +.cZoom { | |
| 81 | + -webkit-transition: all 1s ease-in-out; | |
| 82 | + -webkit-transform: rotate(360deg) scale(0.1); | |
| 83 | +} | |
| 84 | + | |
| 85 | +.dialog-content { | |
| 86 | + position: absolute; | |
| 87 | + top: 50%; | |
| 88 | + margin-top: -60px; | |
| 89 | + width: 260px; | |
| 90 | + height: 120px; | |
| 91 | + line-height: 120px; | |
| 92 | + padding-left: 8px; | |
| 93 | + padding-right: 8px; | |
| 94 | + color: #FFF; | |
| 95 | + text-shadow: 1px 1px 1px #000; | |
| 96 | + text-align: center; | |
| 97 | + background-color: RGBA(0, 0, 0, 0.9); | |
| 98 | + z-index: 10; | |
| 99 | + left: 50%; | |
| 100 | + margin-left: -130px; | |
| 101 | +} | |
| 102 | + | |
| 103 | +.mask { | |
| 104 | + width: 100%; | |
| 105 | + height: 100%; | |
| 106 | + position: absolute; | |
| 107 | + background: #000; | |
| 108 | + z-index: 9; | |
| 109 | + top: 0; | |
| 110 | + left: 0; | |
| 111 | +} | |
| 112 | + | |
| 113 | +.grayButton { | |
| 114 | + width: 200px; | |
| 115 | + display: block; | |
| 116 | + border-width: 0 12px; | |
| 117 | + padding: 10px; | |
| 118 | + text-align: center; | |
| 119 | + font-size: 20px; | |
| 120 | + font-weight: bold; | |
| 121 | + text-decoration: inherit; | |
| 122 | + color: inherit; | |
| 123 | +} | |
| 124 | + | |
| 125 | +.duration { | |
| 126 | + float: left; | |
| 127 | + height: 30px; | |
| 128 | + line-height: 30px; | |
| 129 | + color: #fff; | |
| 130 | + margin: 10px; | |
| 131 | +} | |
| 132 | + | |
| 133 | +.dialog-content span.movieType { | |
| 134 | + padding: 10px; | |
| 135 | + border: 1px solid #fff; | |
| 136 | +} | |
| 137 | +</style> | |
| 138 | +</head> | |
| 139 | +<body> | |
| 140 | +<div id="a1"> | |
| 141 | + | |
| 142 | +</div> | |
| 143 | +<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8"></script> | |
| 144 | +<script type="text/javascript" src="js/video.js"></script> | |
| 145 | +<script type="text/javascript"> | |
| 146 | + var BASE_URL = "ckplayer_demo_1/", | |
| 147 | + prefix = "http", | |
| 148 | + isHLS = true, | |
| 149 | + url = "http://video-web.ks3-cn-beijing.ksyun.com/video/data2/2016/0102/98852/800/1e8e7823a1a74355b637705419ed3e1b_98852_800.m3u8"; | |
| 150 | + var isMobile = function () { | |
| 151 | + var check = false; | |
| 152 | + (function (a) { | |
| 153 | + if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) | |
| 154 | + check = true | |
| 155 | + })(navigator.userAgent || navigator.vendor || window.opera); | |
| 156 | + return check; | |
| 157 | + } | |
| 158 | + if (isMobile()){ | |
| 159 | + new ksVideo({ | |
| 160 | + container:"a1", | |
| 161 | + url: url, | |
| 162 | + width:600, | |
| 163 | + height:200, | |
| 164 | + face:"mp4.png" | |
| 165 | + }); | |
| 166 | + } else { | |
| 167 | + var flashvars; | |
| 168 | + // 播放器参数说明地址:http://www.ckplayer.com/tool/help/29.htm | |
| 169 | + if (prefix == "http" && isHLS){ | |
| 170 | + flashvars = { | |
| 171 | + f : BASE_URL + 'ckplayer/m3u8.swf', | |
| 172 | + a : url || 'http://kssws.ks-cdn.com/20121218/abc.mp4-640x480-b211ebb6.mp4', | |
| 173 | + c : 0, | |
| 174 | + s : 4, | |
| 175 | + lv: 1//注意,是否锁定进度栏 0:不锁定,1:锁定。如果是直播,需设置lv:1 | |
| 176 | + } | |
| 177 | + } else if (prefix == "rtmp" || !isHLS){ | |
| 178 | + flashvars = { | |
| 179 | + f : url || 'http://kssws.ks-cdn.com/20121218/abc.mp4-640x480-b211ebb6.mp4', | |
| 180 | + p : 1, | |
| 181 | + c : 0, //调用配置方式 =0:调用ckplayer.js | |
| 182 | + lv: 1 | |
| 183 | + } | |
| 184 | + } | |
| 185 | + var params = { | |
| 186 | + bgcolor:'#FFF', | |
| 187 | + allowFullScreen:true, | |
| 188 | + allowScriptAccess:'always', | |
| 189 | + wmode:'transparent' | |
| 190 | + }; | |
| 191 | + CKobject.embed('ckplayer/ckplayer.swf','a1','ckplayer_a1','600', '400', false, flashvars) | |
| 192 | + } | |
| 193 | +</script> | |
| 194 | +</body> | |
| 195 | +</html> | ... | ... |
src/main/webapp/static/assets/ck/images/pause.png
0 → 100644
6.46 KB
src/main/webapp/static/assets/ck/images/play.png
0 → 100644
5.61 KB
src/main/webapp/static/assets/ck/js/offlights.js
0 → 100644
| 1 | +/* | |
| 2 | +该文件是从网上收集的方法,用来做开关灯的,相对于原来的程序做了一些改变,兼容了IE10 | |
| 3 | +*/ | |
| 4 | +var Offlights = { | |
| 5 | + create: function() { | |
| 6 | + return function() { | |
| 7 | + this.initialize.apply(this, arguments) | |
| 8 | + } | |
| 9 | + } | |
| 10 | +} | |
| 11 | +var OverLay = Offlights.create(); | |
| 12 | +OverLay.prototype = { | |
| 13 | + initialize: function(options) { | |
| 14 | + this.SetOptions(options); | |
| 15 | + this.browser = (function(ua){ | |
| 16 | + var a=new Object(); | |
| 17 | + var b = { | |
| 18 | + msie: /msie/.test(ua) && !/opera/.test(ua), | |
| 19 | + opera: /opera/.test(ua), | |
| 20 | + safari: /webkit/.test(ua) && !/chrome/.test(ua), | |
| 21 | + firefox: /firefox/.test(ua), | |
| 22 | + chrome: /chrome/.test(ua) | |
| 23 | + }; | |
| 24 | + var vMark = ""; | |
| 25 | + for (var i in b) { | |
| 26 | + if (b[i]) { vMark = "safari" == i ? "version" : i; break; } | |
| 27 | + } | |
| 28 | + b.version = vMark && RegExp("(?:" + vMark + ")[\\/: ]([\\d.]+)").test(ua) ? RegExp.$1 : "0"; | |
| 29 | + b.ie = b.msie; | |
| 30 | + b.ie6 = b.msie && parseInt(b.version, 10) == 6; | |
| 31 | + b.ie7 = b.msie && parseInt(b.version, 10) == 7; | |
| 32 | + b.ie8 = b.msie && parseInt(b.version, 10) == 8; | |
| 33 | + a.B=vMark; | |
| 34 | + a.V=b.version; | |
| 35 | + return a; | |
| 36 | + })(window.navigator.userAgent.toLowerCase()); | |
| 37 | + this.isIE = this.browser['B']=='msie' ? true : false; | |
| 38 | + this.isIE6 = (this.isIE && this.browser['V']==6)?true:false; | |
| 39 | + this._K_ = function(id) {return "string" == typeof id ? document.getElementById(id) : id}; | |
| 40 | + this.Lay = this._K_(this.options.Lay) || document.body.insertBefore(document.createElement("div"), document.body.childNodes[0]); | |
| 41 | + this.Color = this.options.Color; | |
| 42 | + this.Opacity = parseInt(this.options.Opacity); | |
| 43 | + this.zIndex = parseInt(this.options.zIndex); | |
| 44 | + with(this.Lay.style) { | |
| 45 | + display = "none"; | |
| 46 | + zIndex = this.zIndex; | |
| 47 | + left = top = 0; | |
| 48 | + position = "fixed"; | |
| 49 | + width = height = "100%" | |
| 50 | + } | |
| 51 | + if (this.isIE6) { | |
| 52 | + this.Lay.style.position = "absolute"; | |
| 53 | + this._resize = this.Bind(this, | |
| 54 | + function() { | |
| 55 | + this.Lay.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px"; | |
| 56 | + this.Lay.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px" | |
| 57 | + }); | |
| 58 | + this.Lay.innerHTML = '' | |
| 59 | + } | |
| 60 | + }, | |
| 61 | + Bind:function(object, fun) { | |
| 62 | + return function() { | |
| 63 | + return fun.apply(object, arguments) | |
| 64 | + } | |
| 65 | + }, | |
| 66 | + Extend :function(destination, source) { | |
| 67 | + for (var property in source) { | |
| 68 | + destination[property] = source[property] | |
| 69 | + } | |
| 70 | + }, | |
| 71 | + SetOptions: function(options) { | |
| 72 | + this.options = { | |
| 73 | + Lay: null, | |
| 74 | + Color: "#000", | |
| 75 | + Opacity: 100, | |
| 76 | + zIndex: 50 | |
| 77 | + }; | |
| 78 | + this.Extend(this.options, options || {}) | |
| 79 | + }, | |
| 80 | + Show: function() { | |
| 81 | + if (this.isIE6) { | |
| 82 | + this._resize(); | |
| 83 | + window.attachEvent("onresize", this._resize) | |
| 84 | + } | |
| 85 | + with(this.Lay.style) { | |
| 86 | + this.isIE ? filter = "alpha(opacity:" + this.Opacity + ")": opacity = this.Opacity / 100; | |
| 87 | + backgroundColor = this.Color; | |
| 88 | + display = "block" | |
| 89 | + } | |
| 90 | + }, | |
| 91 | + Close: function() { | |
| 92 | + this.Lay.style.display = "none"; | |
| 93 | + if (this.isIE6) { | |
| 94 | + window.detachEvent("onresize", this._resize) | |
| 95 | + } | |
| 96 | + } | |
| 97 | +}; | |
| 98 | +var LightBox = Offlights.create(); | |
| 99 | +LightBox.prototype = { | |
| 100 | + initialize: function(options) { | |
| 101 | + this.OverLay = new OverLay(options); | |
| 102 | + }, | |
| 103 | + Show: function(options) { | |
| 104 | + this.OverLay.Show(); | |
| 105 | + }, | |
| 106 | + Close: function() { | |
| 107 | + this.OverLay.Close(); | |
| 108 | + } | |
| 109 | +}; | ... | ... |
src/main/webapp/static/assets/ck/js/video.js
0 → 100644
| 1 | +var ksVideo=function(options){ | |
| 2 | + this.videoUrl=options && options.url; | |
| 3 | + this.containerID=options && options.container; | |
| 4 | + this.videoList = options && options.videoList; | |
| 5 | + this.width = options && options.width || 0; | |
| 6 | + this.height=options && options.height || 0; | |
| 7 | + this.face=options && options.face ||null; | |
| 8 | + //this.setContainerPosition(); | |
| 9 | + if(!this.videoUrl || !this.containerID){ | |
| 10 | + return false; | |
| 11 | + } | |
| 12 | + | |
| 13 | + this.init(); | |
| 14 | + | |
| 15 | +} | |
| 16 | +ksVideo.prototype={ | |
| 17 | + init:function(){ | |
| 18 | + this.safari=this.isSafari(); | |
| 19 | + this.android=this.version.ANDROID; | |
| 20 | + this.container=this.getID(this.containerID); | |
| 21 | + this.draw(); | |
| 22 | + | |
| 23 | + }, | |
| 24 | + currentTime:0, | |
| 25 | + draw:function(){ | |
| 26 | + this.oDiv=document.createElement("div"); | |
| 27 | + this.oDiv.style.background="#000"; | |
| 28 | + this.setContainerPosition(); | |
| 29 | + this.createVideo(); | |
| 30 | + this.loadImg(); | |
| 31 | + | |
| 32 | + | |
| 33 | + this.oBtnContainer=document.createElement("div"); | |
| 34 | + this.oBtnContainer.className="btnContainer"; | |
| 35 | + var arr=[]; | |
| 36 | + arr.push('<div class="operate"><button id="play" class="btnPlay"></button>'); | |
| 37 | + arr.push('<div class="duration" id="duration">--/--</div>'); | |
| 38 | + //arr.push('<button id="set" class="set">设置</button>'); | |
| 39 | + arr.push("</div>"); | |
| 40 | + this.oBtnContainer.innerHTML=arr.join(''); | |
| 41 | + this.oDiv.appendChild(this.oBtnContainer); | |
| 42 | + | |
| 43 | + this.container.appendChild(this.oDiv); | |
| 44 | + this.bindEvent(); | |
| 45 | + | |
| 46 | + }, | |
| 47 | + | |
| 48 | + loadImg:function(){ | |
| 49 | + | |
| 50 | + var oImage=new Image(); | |
| 51 | + this.oImage=oImage; | |
| 52 | + if(!this.face){ | |
| 53 | + return false; | |
| 54 | + } | |
| 55 | + oImage.src=this.face; | |
| 56 | + oImage.className="loadTemplate"; | |
| 57 | + | |
| 58 | + var me=this; | |
| 59 | + oImage.onload=function(){ | |
| 60 | + //console.log(oImage.width); | |
| 61 | + var imageStyle=me.getImageStyle(this); | |
| 62 | + for(var item in imageStyle){ | |
| 63 | + this.style[item]=imageStyle[item]+"px"; | |
| 64 | + } | |
| 65 | + | |
| 66 | + this.style.top="50%"; | |
| 67 | + this.style.left="50%"; | |
| 68 | + this.style.position="absolute" | |
| 69 | + this.style.marginLeft=(-1*parseInt(this.style.width)/2)+"px"; | |
| 70 | + this.style.marginTop=(-1*parseInt(this.style.height)/2)+"px"; | |
| 71 | + | |
| 72 | + me.oDiv.appendChild(oImage); | |
| 73 | + } | |
| 74 | + | |
| 75 | + }, | |
| 76 | + | |
| 77 | + getImageStyle:function(obj){ | |
| 78 | + var w=obj.width; | |
| 79 | + var h=obj.height; | |
| 80 | + var currentWidth=this.currentWidth; | |
| 81 | + var currentHeight=this.currentHeight; | |
| 82 | + var newWidth,newHeight; | |
| 83 | + if(w>h){ | |
| 84 | + newWidth = Math.min(w,currentWidth); | |
| 85 | + var xishu=newWidth/w; | |
| 86 | + return {"width":newWidth,"height":h*xishu} | |
| 87 | + } | |
| 88 | + else{ | |
| 89 | + newHeight=Math.min(h,currentHeight); | |
| 90 | + var xishu=newHeight/h; | |
| 91 | + return {"height":newHeight,"width":w*xishu} | |
| 92 | + } | |
| 93 | + | |
| 94 | + }, | |
| 95 | + | |
| 96 | + createVideo:function(){ | |
| 97 | + var video=document.createElement("video"); | |
| 98 | + video.type="video/mp4"; | |
| 99 | + video.controls=false; | |
| 100 | + //video.preload="none"; | |
| 101 | + video.src=this.videoUrl; | |
| 102 | + //video.setAttribute("webkit-playsinline",true); | |
| 103 | + video.setAttribute("x-webkit-airplay",true); | |
| 104 | + video.setAttribute("preload","none"); | |
| 105 | + if(this.safari && !this.android){ | |
| 106 | + video.style.top="-30px"; | |
| 107 | + } | |
| 108 | + video.style.width="100%"; | |
| 109 | + video.style.height="100%"; | |
| 110 | + video.style.position="absolute"; | |
| 111 | + video.style.top="-200%"; | |
| 112 | + video.style.zIndex=1; | |
| 113 | + this.video=video; | |
| 114 | + this.oDiv.appendChild(video); | |
| 115 | + //video.load(); | |
| 116 | + this.setVideoEvent(); | |
| 117 | + }, | |
| 118 | + | |
| 119 | + setVideoEvent :function(){ | |
| 120 | + | |
| 121 | + var video=this.video; | |
| 122 | + var me=this; | |
| 123 | + video.load(); | |
| 124 | + | |
| 125 | + | |
| 126 | + video.addEventListener('loadeddata', function(){ | |
| 127 | + //me.closeMsg(); | |
| 128 | + video.currentTime=me.currentTime; | |
| 129 | + video.setAttribute("webkit-playsinline",true); | |
| 130 | + me.setDuration(); | |
| 131 | + }, false); | |
| 132 | + | |
| 133 | + video.addEventListener('timeupdate', function(){ | |
| 134 | + me.setDuration(); | |
| 135 | + }, false); | |
| 136 | + video.addEventListener('durationchange', function(){ | |
| 137 | + me.setDuration(); | |
| 138 | + }, false); | |
| 139 | + video.addEventListener('play', function(){ | |
| 140 | + if(me.safari && !me.android){ | |
| 141 | + video.style.top="0px"; | |
| 142 | + } | |
| 143 | + video.style.top="0px"; | |
| 144 | + me.onPlay(); | |
| 145 | + }, false); | |
| 146 | + | |
| 147 | + video.addEventListener('pause', function(){ | |
| 148 | + me.onPause(); | |
| 149 | + if(me.safari && !me.android){ | |
| 150 | + video.style.top="-30px"; | |
| 151 | + } | |
| 152 | + }, false); | |
| 153 | + }, | |
| 154 | + | |
| 155 | + setDuration:function(){ | |
| 156 | + var d=this.getID("duration"); | |
| 157 | + var currentTime=this.video.currentTime; | |
| 158 | + var _dur=this.getDuration(); | |
| 159 | + var _c=this.format(currentTime); | |
| 160 | + var _all=this.format(_dur); | |
| 161 | + d.innerHTML=_c+"/"+_all; | |
| 162 | + }, | |
| 163 | + | |
| 164 | + getDuration:function(){ | |
| 165 | + var _duration=this.video.duration; | |
| 166 | + return _duration; | |
| 167 | + }, | |
| 168 | + | |
| 169 | + format:function(str){ | |
| 170 | + var t=str; | |
| 171 | + var h=Math.floor(t/3600); | |
| 172 | + var min=Math.floor(t/60)-h*60; | |
| 173 | + var s=Math.floor(t%60); | |
| 174 | + var _h=h>9?h:"0"+h; | |
| 175 | + var _min=min>9?min:"0"+min; | |
| 176 | + var _s=s>9?s:"0"+s; | |
| 177 | + return _h+":"+_min+":"+_s; | |
| 178 | + }, | |
| 179 | + | |
| 180 | + onPlay:function(){ | |
| 181 | + this.oImage.style.display="none"; | |
| 182 | + this.oBtnContainer.style.display="none"; | |
| 183 | + this.video.controls=true; | |
| 184 | + }, | |
| 185 | + | |
| 186 | + onPause:function(){ | |
| 187 | + this.oBtnContainer.style.display="block"; | |
| 188 | + this.video.controls=false; | |
| 189 | + }, | |
| 190 | + | |
| 191 | + setContainerPosition :function(){ | |
| 192 | + var isMobile=this.isMobile(); | |
| 193 | + var vheight=this.getVisibleHeight(); | |
| 194 | + var vwidth=this.getVisibleWidth(); | |
| 195 | + var _w=vwidth<=this.width ? vwidth : this.width?this.width:vwidth; | |
| 196 | + var _h=vheight<=this.height ? vheight : this.height?this.height:vheight; | |
| 197 | + this.currentWidth=_w; | |
| 198 | + this.currentHeight=_h; | |
| 199 | + | |
| 200 | + //if(isMobile){ | |
| 201 | + this.oDiv.style.width=_w+"px"; | |
| 202 | + this.oDiv.style.height=_h+"px"; | |
| 203 | + this.oDiv.style.position="relative"; | |
| 204 | + //} | |
| 205 | + | |
| 206 | + | |
| 207 | + }, | |
| 208 | + | |
| 209 | + bindEvent :function(){ | |
| 210 | + var btn=this.getID("play"); | |
| 211 | + var me=this; | |
| 212 | + /* | |
| 213 | + btn.onclick=function(){ | |
| 214 | + me.video.play(); | |
| 215 | + } | |
| 216 | + */ | |
| 217 | + btn.addEventListener('click', function(){ | |
| 218 | + if(!me.video){ | |
| 219 | + me.createVideo(); | |
| 220 | + //me.setVideoEvent(); | |
| 221 | + } | |
| 222 | + me.video.play(); | |
| 223 | + }, false); | |
| 224 | + | |
| 225 | + | |
| 226 | + //var btnSet=this.getID("set"); | |
| 227 | + /* | |
| 228 | + btnSet.onclick=function(){ | |
| 229 | + me.showMsg(); | |
| 230 | + } | |
| 231 | + */ | |
| 232 | + /* | |
| 233 | + btnSet.addEventListener('click', function(){ | |
| 234 | + me.showMsg(); | |
| 235 | + }, false); | |
| 236 | + */ | |
| 237 | +/* | |
| 238 | + var btnSetContainer=this.getID("dialogSet"); | |
| 239 | + btnSetList=btnSetContainer.getElementsByTagName("span"); | |
| 240 | + | |
| 241 | + btnSetList[0].addEventListener('click', function(){ | |
| 242 | + me.currentTime=me.video.currentTime; | |
| 243 | + //console.log(me.currentTime); | |
| 244 | + //me.showMsg(); | |
| 245 | + me.video.src=me.videoList[0]; | |
| 246 | + | |
| 247 | + me.video.load(); | |
| 248 | + me.closeMsg(); | |
| 249 | + }, false); | |
| 250 | + | |
| 251 | + btnSetList[1].addEventListener('click', function(){ | |
| 252 | + //me.showMsg(); | |
| 253 | + me.currentTime=me.video.currentTime; | |
| 254 | + me.video.src=me.videoList[1]; | |
| 255 | + me.closeMsg(); | |
| 256 | + me.video.load(); | |
| 257 | + }, false); | |
| 258 | + | |
| 259 | + btnSetList[2].addEventListener('click', function(){ | |
| 260 | + //me.showMsg(); | |
| 261 | + me.currentTime=me.video.currentTime; | |
| 262 | + me.video.src=me.videoList[2]; | |
| 263 | + | |
| 264 | + me.video.load(); | |
| 265 | + | |
| 266 | + me.closeMsg(); | |
| 267 | + }, false); | |
| 268 | + | |
| 269 | + btnSetList[3].addEventListener('click', function(){ | |
| 270 | + me.closeMsg(); | |
| 271 | + }, false);*/ | |
| 272 | + }, | |
| 273 | + | |
| 274 | + showMsg:function(){ | |
| 275 | + var dialogSet=this.getID("dialogSet"); | |
| 276 | + dialogSet.style.display="block"; | |
| 277 | + }, | |
| 278 | + | |
| 279 | + closeMsg:function(){ | |
| 280 | + var dialogSet=this.getID("dialogSet"); | |
| 281 | + dialogSet.style.display="none"; | |
| 282 | + }, | |
| 283 | + | |
| 284 | + isMobile: function() { | |
| 285 | + var check = false; | |
| 286 | + (function(a){ | |
| 287 | + if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) | |
| 288 | + check = true | |
| 289 | + })(navigator.userAgent||navigator.vendor||window.opera); | |
| 290 | + return check; | |
| 291 | + }, | |
| 292 | + | |
| 293 | + isSafari : function(){ | |
| 294 | + var ua = navigator.userAgent||navigator.vendor||window.opera | |
| 295 | + return ua.indexOf("Safari") > -1 && ua.indexOf("Chrome") == -1 | |
| 296 | + }, | |
| 297 | + | |
| 298 | + version : { | |
| 299 | + IOS: !! navigator.userAgent.match(/iP(od|hone|ad)/i), | |
| 300 | + ANDROID: !! (/Android/i).test(navigator.userAgent) | |
| 301 | + }, | |
| 302 | + | |
| 303 | + getVisibleHeight: function() { | |
| 304 | + var doc = document; | |
| 305 | + var docE = doc.documentElement; | |
| 306 | + var body = doc.body; | |
| 307 | + return (docE && docE.clientHeight) || (body && body.offsetHeight) || window.innerHeight || 0; | |
| 308 | + }, | |
| 309 | + getVisibleWidth: function() { | |
| 310 | + var doc = document; | |
| 311 | + var docE = doc.documentElement; | |
| 312 | + var body = doc.body; | |
| 313 | + return (docE && docE.clientWidth) || (body && body.offsetWidth) || window.innerWidth || 0; | |
| 314 | + }, | |
| 315 | + getID:function(id){ | |
| 316 | + return typeof id == "string" ?document.getElementById(id):id; | |
| 317 | + } | |
| 318 | + | |
| 319 | + | |
| 320 | +} | ... | ... |
src/main/webapp/static/assets/ck/mp4.png
0 → 100644
428 KB
src/main/webapp/static/assets/ck/readme.txt
0 → 100644
src/main/webapp/static/assets/ckplayer_back/offlights.js
0 → 100644
| 1 | +/* | |
| 2 | +该文件是从网上收集的方法,用来做开关灯的,相对于原来的程序做了一些改变,兼容了IE10 | |
| 3 | +*/ | |
| 4 | +var Offlights = { | |
| 5 | + create: function() { | |
| 6 | + return function() { | |
| 7 | + this.initialize.apply(this, arguments) | |
| 8 | + } | |
| 9 | + } | |
| 10 | +} | |
| 11 | +var OverLay = Offlights.create(); | |
| 12 | +OverLay.prototype = { | |
| 13 | + initialize: function(options) { | |
| 14 | + this.SetOptions(options); | |
| 15 | + this.browser = (function(ua){ | |
| 16 | + var a=new Object(); | |
| 17 | + var b = { | |
| 18 | + msie: /msie/.test(ua) && !/opera/.test(ua), | |
| 19 | + opera: /opera/.test(ua), | |
| 20 | + safari: /webkit/.test(ua) && !/chrome/.test(ua), | |
| 21 | + firefox: /firefox/.test(ua), | |
| 22 | + chrome: /chrome/.test(ua) | |
| 23 | + }; | |
| 24 | + var vMark = ""; | |
| 25 | + for (var i in b) { | |
| 26 | + if (b[i]) { vMark = "safari" == i ? "version" : i; break; } | |
| 27 | + } | |
| 28 | + b.version = vMark && RegExp("(?:" + vMark + ")[\\/: ]([\\d.]+)").test(ua) ? RegExp.$1 : "0"; | |
| 29 | + b.ie = b.msie; | |
| 30 | + b.ie6 = b.msie && parseInt(b.version, 10) == 6; | |
| 31 | + b.ie7 = b.msie && parseInt(b.version, 10) == 7; | |
| 32 | + b.ie8 = b.msie && parseInt(b.version, 10) == 8; | |
| 33 | + a.B=vMark; | |
| 34 | + a.V=b.version; | |
| 35 | + return a; | |
| 36 | + })(window.navigator.userAgent.toLowerCase()); | |
| 37 | + this.isIE = this.browser['B']=='msie' ? true : false; | |
| 38 | + this.isIE6 = (this.isIE && this.browser['V']==6)?true:false; | |
| 39 | + this._K_ = function(id) {return "string" == typeof id ? document.getElementById(id) : id}; | |
| 40 | + this.Lay = this._K_(this.options.Lay) || document.body.insertBefore(document.createElement("div"), document.body.childNodes[0]); | |
| 41 | + this.Color = this.options.Color; | |
| 42 | + this.Opacity = parseInt(this.options.Opacity); | |
| 43 | + this.zIndex = parseInt(this.options.zIndex); | |
| 44 | + with(this.Lay.style) { | |
| 45 | + display = "none"; | |
| 46 | + zIndex = this.zIndex; | |
| 47 | + left = top = 0; | |
| 48 | + position = "fixed"; | |
| 49 | + width = height = "100%" | |
| 50 | + } | |
| 51 | + if (this.isIE6) { | |
| 52 | + this.Lay.style.position = "absolute"; | |
| 53 | + this._resize = this.Bind(this, | |
| 54 | + function() { | |
| 55 | + this.Lay.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px"; | |
| 56 | + this.Lay.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px" | |
| 57 | + }); | |
| 58 | + this.Lay.innerHTML = '' | |
| 59 | + } | |
| 60 | + }, | |
| 61 | + Bind:function(object, fun) { | |
| 62 | + return function() { | |
| 63 | + return fun.apply(object, arguments) | |
| 64 | + } | |
| 65 | + }, | |
| 66 | + Extend :function(destination, source) { | |
| 67 | + for (var property in source) { | |
| 68 | + destination[property] = source[property] | |
| 69 | + } | |
| 70 | + }, | |
| 71 | + SetOptions: function(options) { | |
| 72 | + this.options = { | |
| 73 | + Lay: null, | |
| 74 | + Color: "#000", | |
| 75 | + Opacity: 100, | |
| 76 | + zIndex: 50 | |
| 77 | + }; | |
| 78 | + this.Extend(this.options, options || {}) | |
| 79 | + }, | |
| 80 | + Show: function() { | |
| 81 | + if (this.isIE6) { | |
| 82 | + this._resize(); | |
| 83 | + window.attachEvent("onresize", this._resize) | |
| 84 | + } | |
| 85 | + with(this.Lay.style) { | |
| 86 | + this.isIE ? filter = "alpha(opacity:" + this.Opacity + ")": opacity = this.Opacity / 100; | |
| 87 | + backgroundColor = this.Color; | |
| 88 | + display = "block" | |
| 89 | + } | |
| 90 | + }, | |
| 91 | + Close: function() { | |
| 92 | + this.Lay.style.display = "none"; | |
| 93 | + if (this.isIE6) { | |
| 94 | + window.detachEvent("onresize", this._resize) | |
| 95 | + } | |
| 96 | + } | |
| 97 | +}; | |
| 98 | +var LightBox = Offlights.create(); | |
| 99 | +LightBox.prototype = { | |
| 100 | + initialize: function(options) { | |
| 101 | + this.OverLay = new OverLay(options); | |
| 102 | + }, | |
| 103 | + Show: function(options) { | |
| 104 | + this.OverLay.Show(); | |
| 105 | + }, | |
| 106 | + Close: function() { | |
| 107 | + this.OverLay.Close(); | |
| 108 | + } | |
| 109 | +}; | ... | ... |
src/main/webapp/static/assets/cnlive/js/all_live.js
0 → 100644
| 1 | +function t_live_close(id,live_url){ | |
| 2 | + alert(live_url); | |
| 3 | + $.ajax({ | |
| 4 | + url : BASE+'/check/close/'+id, | |
| 5 | + type : 'post', | |
| 6 | + async : true, | |
| 7 | + data :{"live_url":live_url, | |
| 8 | + }, | |
| 9 | + error : function() { | |
| 10 | + alert('获取错误!'); | |
| 11 | + }, | |
| 12 | + success : function(data) { | |
| 13 | + alert(data); | |
| 14 | + location.href="../../live/alllive/1"; | |
| 15 | + } | |
| 16 | + }); | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/cnlive/js/live.js
| 1 | 1 | function toSubmit(){ |
| 2 | 2 | $("#activityForm").submit(); |
| 3 | 3 | } |
| 4 | - jwplayer("playId").setup({ | |
| 5 | - file: "", | |
| 6 | - height: 260, | |
| 7 | - image: "/assets/myVideo.jpg", | |
| 8 | - autostart:true, | |
| 9 | - rtmp: { | |
| 10 | - bufferlength: 0.1 | |
| 11 | - }, | |
| 12 | - width: 370 | |
| 13 | - }); | |
| 4 | + | |
| 14 | 5 | //修改直播开始结束时间 |
| 15 | 6 | function update_activity_time(){ |
| 16 | 7 | var start_time= $('#start_time').val(); |
| ... | ... | @@ -444,7 +435,7 @@ function do_publishreview(id){ |
| 444 | 435 | }); |
| 445 | 436 | } |
| 446 | 437 | //断流处理 |
| 447 | -function play_close(id,live_url){ | |
| 438 | +function play_close(id,live_url,uuid){ | |
| 448 | 439 | var id_live_url = $("hidId").val(); |
| 449 | 440 | alert(id_live_url); |
| 450 | 441 | $.ajax({ |
| ... | ... | @@ -452,7 +443,9 @@ function play_close(id,live_url){ |
| 452 | 443 | type : 'post', |
| 453 | 444 | datatype : "json", |
| 454 | 445 | async : true, |
| 455 | - data:{"live_url":live_url}, | |
| 446 | + data:{"live_url":live_url, | |
| 447 | + "uuid":uuid, | |
| 448 | + }, | |
| 456 | 449 | error : function() { |
| 457 | 450 | alert('关闭时发生错误!'); |
| 458 | 451 | }, |
| ... | ... | @@ -484,4 +477,7 @@ function changePlay(id,live_url,userId,title,time){ |
| 484 | 477 | }); |
| 485 | 478 | |
| 486 | 479 | } |
| 480 | +function t_live_xq(id){ | |
| 481 | + window.location.href="../../video/view/"+id; | |
| 482 | +} | |
| 487 | 483 | ... | ... |