Commit b6b048d31034595cac86676200d2cfda8f4fa2b3
Merge branch 'v532' of http://bj.gitlab.cnlive.com/liujicheng/cnlive_live_web
Showing
50 changed files
with
4682 additions
and
519 deletions
.settings/org.eclipse.wst.common.component
| ... | ... | @@ -8,10 +8,10 @@ |
| 8 | 8 | <dependent-module archiveName="cnlive_live_model-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_live_model/cnlive_live_model"> |
| 9 | 9 | <dependency-type>uses</dependency-type> |
| 10 | 10 | </dependent-module> |
| 11 | - <dependent-module archiveName="cnlive_ks3-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_ks3/cnlive_ks3"> | |
| 11 | + <dependent-module archiveName="smart-framework-4.0.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-framework/smart-framework"> | |
| 12 | 12 | <dependency-type>uses</dependency-type> |
| 13 | 13 | </dependent-module> |
| 14 | - <dependent-module archiveName="smart-framework-4.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-framework/smart-framework"> | |
| 14 | + <dependent-module archiveName="smart-plugin-job-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-job/smart-plugin-job"> | |
| 15 | 15 | <dependency-type>uses</dependency-type> |
| 16 | 16 | </dependent-module> |
| 17 | 17 | <dependent-module archiveName="smart-plugin-dbcp-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-plugin-dbcp/smart-plugin-dbcp"> | ... | ... |
src/main/java/com/cnlive/mz/live/action/CheckAction.java deleted
100644 → 0
| 1 | -package com.cnlive.mz.live.action; | |
| 2 | - | |
| 3 | -import org.smart4j.framework.dao.bean.Pager; | |
| 4 | -import org.smart4j.framework.ioc.annotation.Inject; | |
| 5 | -import org.smart4j.framework.mvc.DataContext; | |
| 6 | -import org.smart4j.framework.mvc.annotation.Action; | |
| 7 | -import org.smart4j.framework.mvc.annotation.Request; | |
| 8 | -import org.smart4j.framework.mvc.bean.View; | |
| 9 | -import org.smart4j.framework.util.CastUtil; | |
| 10 | - | |
| 11 | -import com.cnlive.mz.live.common.LiveUtils; | |
| 12 | -import com.cnlive.mz.live.entity.TLive; | |
| 13 | -import com.cnlive.mz.live.service.TLiveService; | |
| 14 | -import com.cnlive.mz.live.service.TRoomService; | |
| 15 | - | |
| 16 | -@Action | |
| 17 | -public class CheckAction { | |
| 18 | - | |
| 19 | - @Inject | |
| 20 | - private TLiveService tLiveService; | |
| 21 | - @Inject | |
| 22 | - private TRoomService tRoomService; | |
| 23 | - | |
| 24 | - @Request.Get("/check/list/{page_number}") | |
| 25 | - public View list(int page_number) { | |
| 26 | - int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | |
| 27 | - System.out.println(user_id); | |
| 28 | - Pager<TLive> tLive = tLiveService.getTLivePager(page_number, 16, user_id); | |
| 29 | - return new View("check/check_management.jsp").data("tLive", tLive); | |
| 30 | - } | |
| 31 | -} |
src/main/java/com/cnlive/mz/live/action/CopyOfIndexAction.java deleted
100644 → 0
| 1 | -/** | |
| 2 | - * Project Name:cnlive_live_web | |
| 3 | - * File Name:IndexAction.java | |
| 4 | - * Package Name:com.cnlive.mz.live.action | |
| 5 | - * Date:2015年8月3日下午3:18:31 | |
| 6 | - * Copyright (c) 2015, cnlive.com All Rights Reserved. | |
| 7 | - * | |
| 8 | - */ | |
| 9 | - | |
| 10 | -package com.cnlive.mz.live.action; | |
| 11 | - | |
| 12 | -import java.io.File; | |
| 13 | -import java.util.HashMap; | |
| 14 | -import java.util.LinkedHashMap; | |
| 15 | -import java.util.Map; | |
| 16 | - | |
| 17 | -import net.sf.json.JSONObject; | |
| 18 | - | |
| 19 | -import org.apache.commons.lang.StringUtils; | |
| 20 | -import org.smart4j.framework.ioc.annotation.Inject; | |
| 21 | -import org.smart4j.framework.mvc.annotation.Action; | |
| 22 | -import org.smart4j.framework.mvc.annotation.Request; | |
| 23 | -import org.smart4j.framework.mvc.bean.Params; | |
| 24 | - | |
| 25 | -import com.cnlive.mz.live.bean.Account; | |
| 26 | -import com.cnlive.ksyun.KsYun; | |
| 27 | -import com.cnlive.mz.commons.CNLiveFFmpeg; | |
| 28 | -import com.cnlive.mz.commons.CnliveUtil; | |
| 29 | -import com.cnlive.mz.commons.DateUtil; | |
| 30 | -import com.cnlive.mz.commons.JsonUtil; | |
| 31 | -import com.cnlive.mz.commons.net.HttpReq; | |
| 32 | -import com.cnlive.mz.commons.sys.Scp; | |
| 33 | -import com.cnlive.mz.live.bean.ResultBean; | |
| 34 | -import com.cnlive.mz.live.entity.TApp; | |
| 35 | -import com.cnlive.mz.live.entity.TDispatchServer; | |
| 36 | -import com.cnlive.mz.live.entity.TUser; | |
| 37 | -import com.cnlive.mz.live.entity.TVideo; | |
| 38 | -import com.cnlive.mz.live.service.TActivityService; | |
| 39 | -import com.cnlive.mz.live.service.TAppService; | |
| 40 | -import com.cnlive.mz.live.service.TChannelService; | |
| 41 | -import com.cnlive.mz.live.service.TDispatchServerService; | |
| 42 | -import com.cnlive.mz.live.service.TUserService; | |
| 43 | -import com.cnlive.mz.live.service.TVideoService; | |
| 44 | -import com.cnlive.mz.live.service.TWowzaService; | |
| 45 | - | |
| 46 | -@Action | |
| 47 | -public class CopyOfIndexAction { | |
| 48 | - @Inject | |
| 49 | - private TChannelService tChannelService; | |
| 50 | - @Inject | |
| 51 | - private TActivityService tActivityService; | |
| 52 | - @Inject | |
| 53 | - private TWowzaService tWowzaService; | |
| 54 | - | |
| 55 | - @Inject | |
| 56 | - private TUserService tUserService; | |
| 57 | - | |
| 58 | - @Request.Post("/api/video/uploadNotify") | |
| 59 | - public void uploadNotify(Params params) { | |
| 60 | - String video_uuid = params.getString("video_uuid"); | |
| 61 | - String upload_type = params.getString("upload_type"); | |
| 62 | - String video_type = params.getString("video_type"); | |
| 63 | - String state = params.getString("state"); | |
| 64 | - notify(video_uuid); | |
| 65 | - // renderJson(new ResultBean(100, "请求成功", null)); | |
| 66 | - } | |
| 67 | - | |
| 68 | - /** | |
| 69 | - * sdk 方式上传 | |
| 70 | - */ | |
| 71 | - @Request.Post("/api/video/supload") | |
| 72 | - public void supload(Params params) { | |
| 73 | - ResultBean resultBean = new ResultBean(); | |
| 74 | - try { | |
| 75 | - Map data = new LinkedHashMap(); | |
| 76 | - String app_access_key = params.getString("app_access_key"); | |
| 77 | - String user_access_key = params.getString("user_access_key"); | |
| 78 | - String server_access_key = params.getString("server_access_key"); | |
| 79 | - String uuid = CnliveUtil.getUUID(); | |
| 80 | - String md5 = params.getString("md5"); | |
| 81 | - TVideo tVideo = new TVideo(); | |
| 82 | - tVideo.setCustom_args(params.getString("custom_args")); | |
| 83 | - tVideo.setRelation_id(params.getString("relation_id")); | |
| 84 | - tVideo.setName(params.getString("name")); | |
| 85 | - tVideo.setVideo_type(params.getString("video_type")); | |
| 86 | - tVideo.setPlat(params.getString("plat")); | |
| 87 | - tVideo.setState(207); | |
| 88 | - tVideo.setMd5(md5); | |
| 89 | - tVideo.setVideo_uuid(uuid); | |
| 90 | - tVideo.setTitle(params.getString("title")); | |
| 91 | - tVideo.setVideo_type(params.getString("video_type")); | |
| 92 | - tVideo.setDescription(params.getString("description")); | |
| 93 | - saveSdkVideoSrc(tVideo, server_access_key, user_access_key, app_access_key); | |
| 94 | - resultBean.setCode(100); | |
| 95 | - resultBean.setMessage("请求成功"); | |
| 96 | - data.put("video_uuid", uuid); | |
| 97 | - resultBean.setData(data); | |
| 98 | - } catch (Exception e) { | |
| 99 | - e.printStackTrace(); | |
| 100 | - } | |
| 101 | - // renderJson(resultBean); | |
| 102 | - } | |
| 103 | - | |
| 104 | - TDispatchServerService tDispatchServerService; | |
| 105 | - TAppService tAppService; | |
| 106 | - TVideoService tVideoService; | |
| 107 | - | |
| 108 | - public void saveSdkVideoSrc(TVideo tVideo, String server_access_key, String user_access_key, String app_access_key) { | |
| 109 | - TDispatchServer dispatchServer = tDispatchServerService.getServerByAccessKey(server_access_key); | |
| 110 | - TUser user = tUserService.getUserByAccessKey(user_access_key); | |
| 111 | - TApp app = tAppService.getAppByAccessKey(app_access_key); | |
| 112 | - int video_type = Integer.parseInt(tVideo.getVideo_type()); | |
| 113 | - String name = tVideo.getName(); | |
| 114 | - tVideo.setT_app_id(app.getId()); | |
| 115 | - tVideo.setT_user_id(user.getId()); | |
| 116 | - tVideo.setT_dispatch_server_id(dispatchServer.getId()); | |
| 117 | - tVideo.setState(207); | |
| 118 | - tVideoService.save(tVideo); | |
| 119 | - } | |
| 120 | - | |
| 121 | - public void notify(String video_uuid) { | |
| 122 | - TVideo video = tVideoService.getVideoByUuId(video_uuid); | |
| 123 | - tVideoService.updateState(video.getId(), 302); | |
| 124 | - NotifyThread t = new NotifyThread(video); | |
| 125 | - t.start(); | |
| 126 | - } | |
| 127 | - | |
| 128 | - public String tempPath = "/opt/video/"; | |
| 129 | - | |
| 130 | - class NotifyThread extends Thread { | |
| 131 | - TVideo video; | |
| 132 | - | |
| 133 | - NotifyThread(TVideo video) { | |
| 134 | - this.video = video; | |
| 135 | - } | |
| 136 | - | |
| 137 | - @Override | |
| 138 | - public void run() { | |
| 139 | - TDispatchServer dispatchServer = tDispatchServerService.getDispatchServerById(video | |
| 140 | - .getT_dispatch_server_id()); | |
| 141 | - String floder = "/home/lijielong/video/storage/";// dispatchServer.getStr("floder"); | |
| 142 | - String account = dispatchServer.getAccount(); | |
| 143 | - Account acc = (Account) JsonUtil.getDtoFromJsonObjStr(account, Account.class); | |
| 144 | - String name = video.getName(); | |
| 145 | - String md5 = video.getMd5(); | |
| 146 | - String ip = dispatchServer.getIp(); | |
| 147 | - String remoteFile = floder + md5 + "/" + name; | |
| 148 | - boolean flag = Scp.get(ip, acc.getS_name(), acc.getS_password(), tempPath, remoteFile); | |
| 149 | - if (flag) { | |
| 150 | - String localFilePath = tempPath + name; | |
| 151 | - File localFile = new File(localFilePath); | |
| 152 | - String basePath = tempPath + DateUtil.getDays("yyyy/MM/dd/"); | |
| 153 | - new File(basePath).mkdirs(); | |
| 154 | - String imageKey = DateUtil.getDays("yyyy/MM/dd/") + video.getVideo_uuid() + ".jpg"; | |
| 155 | - String imagePath = tempPath + imageKey; | |
| 156 | - CNLiveFFmpeg ffmpeg = new CNLiveFFmpeg(localFilePath); | |
| 157 | - String w = ffmpeg.getWidth(); | |
| 158 | - String h = ffmpeg.getHeight(); | |
| 159 | - int width = Integer.parseInt(w); | |
| 160 | - int height = Integer.parseInt(h); | |
| 161 | - CNLiveFFmpeg.getPreviewImg(localFilePath, imagePath); | |
| 162 | - | |
| 163 | - File image = new File(imagePath); | |
| 164 | - if (!image.exists()) { | |
| 165 | - image = new File("/usr/local/tomcat/webapps/ROOT/resource/assets/images/336x220.jpg"); | |
| 166 | - } | |
| 167 | - String ks3ImagePath = putToKS3(image, imageKey); | |
| 168 | - String ks3VideoPath = putToKS3(localFile, DateUtil.getDays("yyyy/MM/dd/") + name); | |
| 169 | - Map map = new HashMap(); | |
| 170 | - map.put("file_path", ks3VideoPath); | |
| 171 | - map.put("preview_image", ks3ImagePath); | |
| 172 | - tVideoService.update(video.getId(), map); | |
| 173 | - } else { | |
| 174 | - System.out.println("scp get file fail " + remoteFile); | |
| 175 | - } | |
| 176 | - } | |
| 177 | - } | |
| 178 | - | |
| 179 | - public String putToKS3(File file, String key) { | |
| 180 | - KsYun yun = new KsYun(false); | |
| 181 | - yun.singlePut("cnlive-ugc", key, file); | |
| 182 | - return "http://cnlive-ugc.ks3-cn-beijing.ksyun.com/" + key; | |
| 183 | - } | |
| 184 | - | |
| 185 | - private void pushToCms(TVideo video, String start_time, String endTime) { | |
| 186 | - String url = "http://icms.staff.cnlive.com/icms_service/api/ugcContentSave.do"; | |
| 187 | - JSONObject obj = JSONObject.fromObject(video.getCustom_args()); | |
| 188 | - Map map = new HashMap(); | |
| 189 | - map.put("MAM_UUID", video.getName()); | |
| 190 | - map.put("MAM_USERID", String.valueOf(obj.get("userId"))); | |
| 191 | - map.put("MAM_NickName", obj.get("nickName")); | |
| 192 | - map.put("MAM_Title", video.getTitle()); | |
| 193 | - map.put("MAM_Description", video.getDescription()); | |
| 194 | - map.put("MAM_PublishDate", start_time); | |
| 195 | - map.put("MAM_VideoUrl", video.getFile_path()); | |
| 196 | - map.put("MAM_VideoHUrl", video.getFile_path()); | |
| 197 | - map.put("MAM_VideoUHUrl", video.getFile_path()); | |
| 198 | - map.put("MAM_VideoLUrl", video.getFile_path()); | |
| 199 | - if (StringUtils.isNotEmpty(endTime)) { | |
| 200 | - map.put("MAM_EndTime", endTime); | |
| 201 | - } | |
| 202 | - JSONObject jsonObj = JSONObject.fromObject(map); | |
| 203 | - String str = HttpReq.postRequestWidthResult(url, "json", jsonObj.toString()); | |
| 204 | - System.out.println("测试期间:调用cms" + str); | |
| 205 | - } | |
| 206 | - | |
| 207 | -} |
src/main/java/com/cnlive/mz/live/action/HttpPostArgumentTest2.java
0 → 100644
| 1 | +package com.cnlive.mz.live.action; | |
| 2 | + | |
| 3 | +import java.io.File; | |
| 4 | +import java.io.IOException; | |
| 5 | + | |
| 6 | +import org.apache.commons.httpclient.NameValuePair; | |
| 7 | +import org.apache.commons.httpclient.params.HttpMethodParams; | |
| 8 | +import org.apache.http.HttpEntity; | |
| 9 | +import org.apache.http.HttpResponse; | |
| 10 | +import org.apache.http.HttpStatus; | |
| 11 | +import org.apache.http.ParseException; | |
| 12 | +import org.apache.http.client.HttpClient; | |
| 13 | +import org.apache.http.client.methods.HttpPost; | |
| 14 | +import org.apache.http.entity.mime.MultipartEntity; | |
| 15 | +import org.apache.http.entity.mime.content.FileBody; | |
| 16 | +import org.apache.http.entity.mime.content.StringBody; | |
| 17 | +import org.apache.http.impl.client.DefaultHttpClient; | |
| 18 | +import org.apache.http.util.EntityUtils; | |
| 19 | + | |
| 20 | +import com.cnlive.mz.commons.net.HttpReq; | |
| 21 | + | |
| 22 | +public class HttpPostArgumentTest2 { | |
| 23 | + | |
| 24 | + private static String user_access_key = "cf34f28db21b46678237bfa849e239ea"; | |
| 25 | + private static String app_access_key = "7338ebf9cab441c0843e437a18d85549"; | |
| 26 | + | |
| 27 | + public void SubmitPost(String url, String filepath) { | |
| 28 | + HttpClient httpclient = new DefaultHttpClient(); | |
| 29 | + try { | |
| 30 | + HttpPost httppost = new HttpPost(url); | |
| 31 | + FileBody bin = new FileBody(new File(filepath)); | |
| 32 | + MultipartEntity reqEntity = new MultipartEntity(); | |
| 33 | + // reqEntity.addPart("file", bin); | |
| 34 | + reqEntity.addPart("app_access_key", new StringBody("7338ebf9cab441c0843e437a18d85549")); | |
| 35 | + reqEntity.addPart("user_access_key", new StringBody("cf34f28db21b46678237bfa849e239ea")); | |
| 36 | + reqEntity.addPart("direct", new StringBody("0")); | |
| 37 | + reqEntity.addPart("upload_type", new StringBody("1")); | |
| 38 | + reqEntity.addPart("md5", new StringBody("liujicheng")); | |
| 39 | + reqEntity.addPart("title", new StringBody("title")); | |
| 40 | + reqEntity.addPart("name", new StringBody("中投视频宣传片熊猫test")); | |
| 41 | + reqEntity.addPart("server_access_key", new StringBody("3830ce241dad4b9f844d131c890231ae")); | |
| 42 | + | |
| 43 | + httppost.setEntity(reqEntity); | |
| 44 | + HttpResponse response = httpclient.execute(httppost); | |
| 45 | + int statusCode = response.getStatusLine().getStatusCode(); | |
| 46 | + System.out.println(statusCode); | |
| 47 | + System.out.println("服务器正常响应....."); | |
| 48 | + HttpEntity resEntity = response.getEntity(); | |
| 49 | + System.out.println(EntityUtils.toString(resEntity)); | |
| 50 | + System.out.println(resEntity.getContent()); | |
| 51 | + EntityUtils.consume(resEntity); | |
| 52 | + | |
| 53 | + } catch (ParseException e) { | |
| 54 | + e.printStackTrace(); | |
| 55 | + } catch (IOException e) { | |
| 56 | + e.printStackTrace(); | |
| 57 | + } finally { | |
| 58 | + try { | |
| 59 | + httpclient.getConnectionManager().shutdown(); | |
| 60 | + } catch (Exception ignore) { | |
| 61 | + ignore.printStackTrace(); | |
| 62 | + } | |
| 63 | + } | |
| 64 | + } | |
| 65 | + | |
| 66 | + public static void redirect() { | |
| 67 | + NameValuePair[] param = { new NameValuePair("relation_id", "282512"), new NameValuePair("video_type", "3"), | |
| 68 | + new NameValuePair("user_access_key", user_access_key), | |
| 69 | + new NameValuePair("app_access_key", app_access_key) }; | |
| 70 | + String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/redirect", param); | |
| 71 | + System.out.println(c); | |
| 72 | + } | |
| 73 | + | |
| 74 | + public static void delete() { | |
| 75 | + NameValuePair[] param = { new NameValuePair("video_type", "2"), | |
| 76 | + new NameValuePair("app_access_key", "7338ebf9cab441c0843e437a18d85549"), | |
| 77 | + new NameValuePair("user_access_key", "cf34f28db21b46678237bfa849e239ea"), | |
| 78 | + new NameValuePair("video_uuid", "a8794762b3e92c7d6589a6157cf1ef27,7e26dee78a584f8c5ab1d93a9c878f1d") }; | |
| 79 | + String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/delete", param); | |
| 80 | + System.out.println(c); | |
| 81 | + } | |
| 82 | + | |
| 83 | + private static String md5 = "ffa699fb66750acab30b71b8ceb0172d1"; | |
| 84 | + | |
| 85 | + public static void supload() { | |
| 86 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | |
| 87 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("video_type", "2"), | |
| 88 | + new NameValuePair("upload_type", "0"), new NameValuePair("direct", "1"), new NameValuePair("md5", md5), | |
| 89 | + new NameValuePair("title", "tit三道恩le1"), new NameValuePair("relation_id", "615207"), | |
| 90 | + new NameValuePair("custom_args", "custom_args1"), new NameValuePair("name", "VID_20151224_105421.mp4"), | |
| 91 | + new NameValuePair("server_access_key", "3830ce241dad4b9f844d131c890231ae") }; | |
| 92 | + String c = HttpReq.postRequestWidthResult("http://bc.cnlive.com/api/video/supload", param); | |
| 93 | + System.out.println(c); | |
| 94 | + } | |
| 95 | + | |
| 96 | + public static void uploadNotify() { | |
| 97 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | |
| 98 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("upload_type", "1"), | |
| 99 | + new NameValuePair("video_type", "2"), new NameValuePair("state", "200"), | |
| 100 | + new NameValuePair("video_uuid", md5) }; | |
| 101 | + String c = HttpReq | |
| 102 | + .postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/uploadNotify", param); | |
| 103 | + System.out.println(c); | |
| 104 | + } | |
| 105 | + | |
| 106 | + public static void all() { | |
| 107 | + NameValuePair[] param = { new NameValuePair("app_access_key", app_access_key), | |
| 108 | + new NameValuePair("relation_id", "498122"), | |
| 109 | + | |
| 110 | + new NameValuePair("user_access_key", user_access_key), new NameValuePair("upload_type", "1"), | |
| 111 | + new NameValuePair("video_type", "2"), new NameValuePair("page_no", "1"), | |
| 112 | + new NameValuePair("video_uuid", md5) }; | |
| 113 | + String c = HttpReq.postRequestWidthResult("http://localhost:8080/cnlive_live_web/api/video/all", param); | |
| 114 | + System.out.println(c); | |
| 115 | + } | |
| 116 | + | |
| 117 | + public static void main(String[] args) { | |
| 118 | + // new HttpPostArgumentTest2().delete(); | |
| 119 | + //HttpPostArgumentTest2.all(); | |
| 120 | + HttpPostArgumentTest2.redirect(); | |
| 121 | + // HttpReq.postRequestWidthResult("http://120.132.76.51:9696/cnlive_encoding_job/task", | |
| 122 | + // "json", "jsonjsonjsonjson");r | |
| 123 | + } | |
| 124 | + | |
| 125 | +} | ... | ... |
src/main/java/com/cnlive/mz/live/action/IndexAction.java
| ... | ... | @@ -15,6 +15,7 @@ import java.util.Map; |
| 15 | 15 | |
| 16 | 16 | import javax.servlet.http.HttpSession; |
| 17 | 17 | |
| 18 | +import org.apache.commons.lang3.StringUtils; | |
| 18 | 19 | import org.smart4j.framework.core.ConfigHelper; |
| 19 | 20 | import org.smart4j.framework.ioc.annotation.Inject; |
| 20 | 21 | import org.smart4j.framework.mvc.DataContext; |
| ... | ... | @@ -53,7 +54,6 @@ public class IndexAction { |
| 53 | 54 | @Inject |
| 54 | 55 | private TUserService tUserService; |
| 55 | 56 | |
| 56 | - | |
| 57 | 57 | int type = 1; |
| 58 | 58 | |
| 59 | 59 | @Request.Get("/index") |
| ... | ... | @@ -89,11 +89,16 @@ public class IndexAction { |
| 89 | 89 | @Request.Post("/doswitch") |
| 90 | 90 | public Result doSwitch(Params params) { |
| 91 | 91 | String channel_ids = params.getString("channel_ids"); |
| 92 | - String wowza_id = params.getString("wowza_id"); | |
| 93 | - tActivityService.doSwitch(channel_ids, Integer.parseInt(wowza_id)); | |
| 94 | - return new Result(true); | |
| 92 | + if (StringUtils.isEmpty(channel_ids)) { | |
| 93 | + System.out.println("没选择频道"); | |
| 94 | + return new Result(false); | |
| 95 | + } else { | |
| 96 | + String wowza_id = params.getString("wowza_id"); | |
| 97 | + tActivityService.doSwitch(channel_ids, Integer.parseInt(wowza_id)); | |
| 98 | + return new Result(true); | |
| 99 | + } | |
| 95 | 100 | } |
| 96 | - | |
| 101 | + | |
| 97 | 102 | @Request.Get("/login/success") |
| 98 | 103 | public View loginSuccess(Params params) { |
| 99 | 104 | String userName = params.getString("username"); |
| ... | ... | @@ -102,7 +107,7 @@ public class IndexAction { |
| 102 | 107 | if (tUser == null) { |
| 103 | 108 | view = new View("index/loginfail.jsp"); |
| 104 | 109 | } else { |
| 105 | - HttpSession session=DataContext.getRequest().getSession(); | |
| 110 | + HttpSession session = DataContext.getRequest().getSession(); | |
| 106 | 111 | session.setAttribute(LiveUtils.SESSION_KEY_NAME, tUser.getName()); |
| 107 | 112 | session.setAttribute(LiveUtils.SESSION_KEY_ID, tUser.getId()); |
| 108 | 113 | session.setAttribute(LiveUtils.SESSION_ROLE_ID, tUser.getIs_admin()); |
| ... | ... | @@ -125,17 +130,17 @@ public class IndexAction { |
| 125 | 130 | public void logout() { |
| 126 | 131 | HttpSession session = DataContext.getRequest().getSession(); |
| 127 | 132 | String logoutUrl = ConfigHelper.getString("auth.logout.url"); |
| 128 | - String webUrl= ConfigHelper.getString("website.url"); | |
| 133 | + String webUrl = ConfigHelper.getString("website.url"); | |
| 129 | 134 | session.removeAttribute(LiveUtils.SESSION_KEY_NAME); |
| 130 | 135 | session.removeAttribute(LiveUtils.SESSION_KEY_ID); |
| 131 | 136 | session.invalidate(); |
| 132 | 137 | try { |
| 133 | - DataContext.getResponse().sendRedirect(logoutUrl+webUrl+"/logout/success"); | |
| 138 | + DataContext.getResponse().sendRedirect(logoutUrl + webUrl + "/logout/success"); | |
| 134 | 139 | } catch (IOException e) { |
| 135 | 140 | e.printStackTrace(); |
| 136 | 141 | } |
| 137 | 142 | } |
| 138 | - | |
| 143 | + | |
| 139 | 144 | @Request.Get("/logout/success") |
| 140 | 145 | public Result logoutSuccess() { |
| 141 | 146 | return new Result(true).data("退出成功"); | ... | ... |
src/main/java/com/cnlive/mz/live/action/LiveAction.java
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | |
| 10 | 10 | package com.cnlive.mz.live.action; |
| 11 | 11 | |
| 12 | +import java.io.UnsupportedEncodingException; | |
| 12 | 13 | import java.util.List; |
| 13 | 14 | |
| 14 | 15 | import org.smart4j.framework.dao.bean.Pager; |
| ... | ... | @@ -21,13 +22,14 @@ import org.smart4j.framework.mvc.bean.Multiparts; |
| 21 | 22 | import org.smart4j.framework.mvc.bean.Params; |
| 22 | 23 | import org.smart4j.framework.mvc.bean.Result; |
| 23 | 24 | import org.smart4j.framework.mvc.bean.View; |
| 24 | -import org.smart4j.framework.orm.DataSet; | |
| 25 | 25 | import org.smart4j.framework.util.CastUtil; |
| 26 | 26 | |
| 27 | 27 | import com.cnlive.mz.commons.Constants; |
| 28 | +import com.cnlive.mz.commons.net.HttpReq; | |
| 28 | 29 | import com.cnlive.mz.live.common.LiveUtils; |
| 29 | 30 | import com.cnlive.mz.live.entity.TLive; |
| 30 | 31 | import com.cnlive.mz.live.entity.TRoom; |
| 32 | +import com.cnlive.mz.live.rest.BaseUtil; | |
| 31 | 33 | import com.cnlive.mz.live.service.TLiveService; |
| 32 | 34 | import com.cnlive.mz.live.service.TRoomService; |
| 33 | 35 | |
| ... | ... | @@ -94,4 +96,102 @@ public class LiveAction { |
| 94 | 96 | view.data("tRoom", tRoom); |
| 95 | 97 | return view; |
| 96 | 98 | } |
| 99 | + | |
| 100 | + @Request.Get("/check/list/{page_number}") | |
| 101 | + public View check(int page_number) { | |
| 102 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | |
| 103 | + Pager<TLive> tLive = tLiveService.getTCheckLivePager(page_number, 12, user_id); | |
| 104 | + View view = new View("check/monitor.jsp"); | |
| 105 | + view.data("tLive", tLive); | |
| 106 | + return view; | |
| 107 | + } | |
| 108 | + | |
| 109 | + // 置顶 | |
| 110 | + @Request.Get("/check/top/{id}") | |
| 111 | + public Result top(int id) { | |
| 112 | + tLiveService.top(id); | |
| 113 | + return new Result(true); | |
| 114 | + } | |
| 115 | + | |
| 116 | + // 切断 | |
| 117 | + @Request.Get("/check/cut/{id}") | |
| 118 | + public Result cut(int id) { | |
| 119 | + return new Result(true); | |
| 120 | + } | |
| 121 | + | |
| 122 | + // 通过审核 | |
| 123 | + @Request.Get("/check/pass/{id}") | |
| 124 | + public Result pass(int id) { | |
| 125 | + tLiveService.pass(id); | |
| 126 | + return new Result(true); | |
| 127 | + } | |
| 128 | + | |
| 129 | + @Request.Post("/check/close/{id}") | |
| 130 | + public Result coseLive(int id, Params params) throws UnsupportedEncodingException { | |
| 131 | + String userId = params.getString("user_id"); | |
| 132 | + String streamName = userId + "_" + id; | |
| 133 | + // String streamName = "498122_57"; | |
| 134 | + String accesskey = "I3TC8a4xboPUMe5xlp22"; | |
| 135 | + accesskey = java.net.URLEncoder.encode(accesskey, "utf-8"); | |
| 136 | + String signature = BaseUtil.signature(streamName); | |
| 137 | + String expire = String.valueOf(BaseUtil.getTimestamp()).substring(0, 10); | |
| 138 | + System.out.println(expire + "---expire---"); | |
| 139 | + // 添加到黑名单。。 | |
| 140 | + try { | |
| 141 | + addBlackList(signature, accesskey, expire, streamName); | |
| 142 | + } catch (UnsupportedEncodingException e) { | |
| 143 | + e.printStackTrace(); | |
| 144 | + } | |
| 145 | + boolean flag = tLiveService.closeLive(id); | |
| 146 | + return new Result(flag); | |
| 147 | + } | |
| 148 | + | |
| 149 | + /** | |
| 150 | + * 添加到黑名单 | |
| 151 | + * | |
| 152 | + * @param signature | |
| 153 | + * @param accesskey | |
| 154 | + * @param expire | |
| 155 | + * @param streamName | |
| 156 | + * @return | |
| 157 | + * @throws UnsupportedEncodingException | |
| 158 | + */ | |
| 159 | + public String addBlackList(String signature, String accesskey, String expire, String streamName) | |
| 160 | + throws UnsupportedEncodingException { | |
| 161 | + String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey | |
| 162 | + + "&expire=" + expire + "&method=add&app=live&name=" + streamName; | |
| 163 | + System.out.println(url); | |
| 164 | + String jsonArrStr = HttpReq.getRequestWidthResult(url); | |
| 165 | + int status = HttpReq.getRequest(url); | |
| 166 | + System.out.println("............" + status); | |
| 167 | + System.out.println("............" + jsonArrStr); | |
| 168 | + /* | |
| 169 | + * Map map = JsonUtil.getMapFromJsonObjStr(jsonArrStr); String | |
| 170 | + * chatRoomid = (String) map.get("Content-Length"); | |
| 171 | + */ | |
| 172 | + return jsonArrStr; | |
| 173 | + } | |
| 174 | + | |
| 175 | + /** | |
| 176 | + * 从黑名单删除 | |
| 177 | + * | |
| 178 | + * @param signature | |
| 179 | + * @param accesskey | |
| 180 | + * @param expire | |
| 181 | + * @param streamName | |
| 182 | + * @return | |
| 183 | + * @throws UnsupportedEncodingException | |
| 184 | + */ | |
| 185 | + public Object delBlackList(String signature, String accesskey, String expire, String streamName) | |
| 186 | + throws UnsupportedEncodingException { | |
| 187 | + String url = "http://cnlive.uplive.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey | |
| 188 | + + "&expire=" + expire + "&method=del&app=live&name=" + streamName; | |
| 189 | + String jsonArrStr = HttpReq.getRequestWidthResult(url); | |
| 190 | + System.out.println(); | |
| 191 | + /* | |
| 192 | + * Map map = JsonUtil.getMapFromJsonObjStr(jsonArrStr); String | |
| 193 | + * chatRoomid = (String) map.get("Content-Length"); | |
| 194 | + */ | |
| 195 | + return jsonArrStr; | |
| 196 | + } | |
| 97 | 197 | } |
| 98 | 198 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/mz/live/action/VideoAction.java
0 → 100644
| 1 | +package com.cnlive.mz.live.action; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import java.util.LinkedHashMap; | |
| 5 | +import java.util.Map; | |
| 6 | + | |
| 7 | +import org.apache.commons.lang3.StringUtils; | |
| 8 | +import org.smart4j.framework.dao.bean.Pager; | |
| 9 | +import org.smart4j.framework.ioc.annotation.Inject; | |
| 10 | +import org.smart4j.framework.mvc.DataContext; | |
| 11 | +import org.smart4j.framework.mvc.annotation.Action; | |
| 12 | +import org.smart4j.framework.mvc.annotation.Request; | |
| 13 | +import org.smart4j.framework.mvc.bean.ApiBean; | |
| 14 | +import org.smart4j.framework.mvc.bean.Params; | |
| 15 | +import org.smart4j.framework.mvc.bean.Result; | |
| 16 | +import org.smart4j.framework.mvc.bean.View; | |
| 17 | +import org.smart4j.framework.util.CastUtil; | |
| 18 | + | |
| 19 | +import com.cnlive.mz.commons.CnliveUtil; | |
| 20 | +import com.cnlive.mz.live.common.LiveUtils; | |
| 21 | +import com.cnlive.mz.live.entity.TLive; | |
| 22 | +import com.cnlive.mz.live.entity.TVideo; | |
| 23 | +import com.cnlive.mz.live.service.TDispatchServerService; | |
| 24 | +import com.cnlive.mz.live.service.TLiveService; | |
| 25 | +import com.cnlive.mz.live.service.TUserService; | |
| 26 | +import com.cnlive.mz.live.service.TVideoService; | |
| 27 | + | |
| 28 | +@Action | |
| 29 | +public class VideoAction { | |
| 30 | + @Inject | |
| 31 | + private TDispatchServerService tDispatchServerService; | |
| 32 | + @Inject | |
| 33 | + private TVideoService tVideoService; | |
| 34 | + @Inject | |
| 35 | + private TUserService tUserService; | |
| 36 | + @Inject | |
| 37 | + private TLiveService tLiveService; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 服务器定向 | |
| 41 | + * | |
| 42 | + * @param params | |
| 43 | + * @return | |
| 44 | + * {"mediaComment":"","nickName":"阳Sir","appId":"1","mediaName":"","userId" | |
| 45 | + * :"1167015","uuid": | |
| 46 | + * "1167015_1463725085798_6a551f9122494a05ac8566b7a2ae1092"} | |
| 47 | + */ | |
| 48 | + @Request.Post("/api/video/redirect") | |
| 49 | + public ApiBean redirect(Params params) { | |
| 50 | + String app_access_key = params.getString("app_access_key"); | |
| 51 | + String video_type = params.getString("video_type"); | |
| 52 | + String user_id = params.getString("relation_id"); | |
| 53 | + ApiBean apiBean = tDispatchServerService.redirect(video_type, app_access_key, user_id); | |
| 54 | + return apiBean; | |
| 55 | + } | |
| 56 | + | |
| 57 | + @Request.Post("/api/video/supload") | |
| 58 | + public ApiBean supload(Params params) { | |
| 59 | + Map data = new LinkedHashMap(); | |
| 60 | + String app_access_key = params.getString("app_access_key"); | |
| 61 | + String video_type = params.getString("video_type"); | |
| 62 | + String user_access_key = params.getString("user_access_key"); | |
| 63 | + String server_access_key = params.getString("server_access_key"); | |
| 64 | + String active_id = params.getString("active_id"); | |
| 65 | + String title = params.getString("title"); | |
| 66 | + String direct = params.getString("direct"); | |
| 67 | + String description = params.getString("description"); | |
| 68 | + String custom_args = params.getString("custom_args"); | |
| 69 | + String md5 = params.getString("md5"); | |
| 70 | + String relation_id = params.getString("relation_id"); | |
| 71 | + String uuid = ""; | |
| 72 | + if (video_type.equals("2")) { | |
| 73 | + // 2:sdk上传录播文件 | |
| 74 | + TVideo tVideo = new TVideo(); | |
| 75 | + tVideo.setCustom_args(custom_args); | |
| 76 | + tVideo.setRelation_id(relation_id); | |
| 77 | + tVideo.setName(params.getString("name")); | |
| 78 | + tVideo.setVideo_type(params.getString("video_type")); | |
| 79 | + tVideo.setPlat(params.getString("plat")); | |
| 80 | + tVideo.setState(207); | |
| 81 | + tVideo.setMd5(md5); | |
| 82 | + uuid = CnliveUtil.getUUID(); | |
| 83 | + tVideo.setVideo_uuid(uuid); | |
| 84 | + tVideo.setTitle(title); | |
| 85 | + tVideo.setDescription(description); | |
| 86 | + tVideoService.saveSdkVideo(tVideo, server_access_key, user_access_key, app_access_key); | |
| 87 | + } else if (video_type.equals("3")) { | |
| 88 | + // 3: sdk直播上传文件 | |
| 89 | + TLive tLive = tLiveService.getTLiveByUUId(active_id); | |
| 90 | + tLive.setTitle(title); | |
| 91 | + tLive.setDescription(description); | |
| 92 | + tLive.setStart_time(new Date()); | |
| 93 | + tLive.setUser_uuid(params.getString("name")); | |
| 94 | + tLive.setRelation_id(relation_id); | |
| 95 | + tLive.setCustom_args(custom_args); | |
| 96 | + uuid = tLive.getUuid(); | |
| 97 | + if (StringUtils.isEmpty(direct)) { | |
| 98 | + tLive.setDirect(0); | |
| 99 | + } else { | |
| 100 | + tLive.setDirect(Integer.parseInt(direct)); | |
| 101 | + } | |
| 102 | + // tLive.setLive_url("http://cnlive.hlslive.ks-cdn.com/live/" + | |
| 103 | + // tLive.getT_user_id() + "_" + uuid | |
| 104 | + // + "/index.m3u8"); | |
| 105 | + tLive.setLive_url("rtmp://cnlive.rtmplive.ks-cdn.com/live/" + tLive.getT_user_id() + "_" + uuid); | |
| 106 | + tLiveService.startLive(tLive); | |
| 107 | + } | |
| 108 | + data.put("video_uuid", uuid); | |
| 109 | + ApiBean apiBean = new ApiBean(); | |
| 110 | + apiBean.setCode(100); | |
| 111 | + apiBean.setMessage("请求成功"); | |
| 112 | + apiBean.setData(data); | |
| 113 | + return apiBean; | |
| 114 | + } | |
| 115 | + | |
| 116 | + @Request.Post("/api/video/all") | |
| 117 | + public ApiBean all(Params params) { | |
| 118 | + String app_access_key = params.getString("app_access_key"); | |
| 119 | + String relationId = params.getString("relation_id"); | |
| 120 | + String pageNo = params.getString("page_no"); | |
| 121 | + String relation_id = params.getString("relation_id"); | |
| 122 | + String upload_type = params.getString("upload_type"); | |
| 123 | + // String video_type = params.getString("video_type"); | |
| 124 | + Pager<TVideo> page = tVideoService.findAll(app_access_key, relationId, pageNo); | |
| 125 | + ApiBean apiBean = new ApiBean(); | |
| 126 | + apiBean.setCode(100); | |
| 127 | + apiBean.setMessage("请求成功"); | |
| 128 | + apiBean.setData(page); | |
| 129 | + return apiBean; | |
| 130 | + } | |
| 131 | + | |
| 132 | + @Request.Get("/video/list/{page_number}") | |
| 133 | + public View list(int page_number) { | |
| 134 | + int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | |
| 135 | + Pager<TVideo> page = tVideoService.list(user_id, page_number, 33); | |
| 136 | + return new View("live/video_management.jsp").data("videos", page); | |
| 137 | + } | |
| 138 | + | |
| 139 | + @Request.Get("/video/check/{page_number}") | |
| 140 | + public View check(int page_number) { | |
| 141 | + Pager<TVideo> page = tVideoService.list(page_number, 33); | |
| 142 | + return new View("live/video_management.jsp").data("videos", page); | |
| 143 | + } | |
| 144 | + | |
| 145 | + @Request.Get("/video/pass/{id}") | |
| 146 | + public Result pass(int id) { | |
| 147 | + tVideoService.pass(id); | |
| 148 | + return new Result(true); | |
| 149 | + } | |
| 150 | + | |
| 151 | + @Request.Get("/video/view/{id}") | |
| 152 | + public View view(int id) { | |
| 153 | + TVideo tVideo = tVideoService.getVideoById(id); | |
| 154 | + return new View("live/video_view.jsp").data("tVideo", tVideo); | |
| 155 | + } | |
| 156 | + | |
| 157 | + @Request.Post("/api/video/one") | |
| 158 | + public ApiBean one(Params params) { | |
| 159 | + String app_access_key = params.getString("app_access_key"); | |
| 160 | + String video_uuid = params.getString("video_uuid"); | |
| 161 | + TVideo page = tVideoService.getVideoByUuId(video_uuid); | |
| 162 | + ApiBean apiBean = new ApiBean(); | |
| 163 | + apiBean.setCode(100); | |
| 164 | + apiBean.setMessage("请求成功"); | |
| 165 | + apiBean.setData(page); | |
| 166 | + return apiBean; | |
| 167 | + } | |
| 168 | + | |
| 169 | + @Request.Post("/api/video/uploadNotify") | |
| 170 | + public ApiBean uploadNotify(Params params) { | |
| 171 | + String video_uuid = params.getString("video_uuid"); | |
| 172 | + String upload_type = params.getString("upload_type"); | |
| 173 | + String video_type = params.getString("video_type"); | |
| 174 | + String state = params.getString("state"); | |
| 175 | + if (video_type.equals("2")) { | |
| 176 | + // 点播通知 | |
| 177 | + tVideoService.notify(video_uuid); | |
| 178 | + } else if (video_type.equals("3")) { | |
| 179 | + // 直播通知 | |
| 180 | + tLiveService.notify(video_uuid); | |
| 181 | + } | |
| 182 | + ApiBean apiBean = new ApiBean(); | |
| 183 | + apiBean.setCode(100); | |
| 184 | + apiBean.setMessage("请求成功"); | |
| 185 | + return apiBean; | |
| 186 | + } | |
| 187 | + | |
| 188 | + @Request.Post("/api/video/delete") | |
| 189 | + public ApiBean delete(Params params) { | |
| 190 | + String user_access_key = params.getString("user_access_key"); | |
| 191 | + String video_uuid = params.getString("video_uuid"); | |
| 192 | + String app_access_key = params.getString("app_access_key"); | |
| 193 | + String video_type = params.getString("video_type");// 视频类型 | |
| 194 | + tVideoService.delete(video_uuid); | |
| 195 | + ApiBean apiBean = new ApiBean(); | |
| 196 | + apiBean.setCode(100); | |
| 197 | + apiBean.setMessage("请求成功"); | |
| 198 | + return apiBean; | |
| 199 | + } | |
| 200 | +} | ... | ... |
src/main/java/com/cnlive/mz/live/action/VideoApiAction.java deleted
100644 → 0
| 1 | -package com.cnlive.mz.live.action; | |
| 2 | - | |
| 3 | -import org.smart4j.framework.ioc.annotation.Inject; | |
| 4 | -import org.smart4j.framework.mvc.annotation.Action; | |
| 5 | -import org.smart4j.framework.mvc.annotation.Request; | |
| 6 | -import org.smart4j.framework.mvc.bean.Params; | |
| 7 | -import org.smart4j.framework.mvc.bean.Result; | |
| 8 | - | |
| 9 | -import com.cnlive.mz.live.entity.ResultBean; | |
| 10 | -import com.cnlive.mz.live.entity.TApp; | |
| 11 | -import com.cnlive.mz.live.service.AppService; | |
| 12 | -import com.cnlive.mz.live.service.VideoApiService; | |
| 13 | - | |
| 14 | -@Action | |
| 15 | -public class VideoApiAction { | |
| 16 | - @Inject | |
| 17 | - private VideoApiService videoApiService; | |
| 18 | - @Inject | |
| 19 | - private AppService appService; | |
| 20 | - | |
| 21 | - @Request.Post("com/api/video/redirect") | |
| 22 | - public Result redirect(Params params) { | |
| 23 | - String app_access_key = params.getString("app_access_key"); | |
| 24 | - String video_type = params.getString("video_type"); | |
| 25 | - TApp app =appService.getAppByAccessKey(app_access_key); | |
| 26 | - //String ip = getRequest().getRemoteAddr(); | |
| 27 | - String ip =null; | |
| 28 | - ResultBean resultBean = new ResultBean(); | |
| 29 | - resultBean.setCode(100); | |
| 30 | - resultBean.setMessage("请求成功"); | |
| 31 | - resultBean.setData(videoApiService.getDispatchServer(app,ip, video_type, app_access_key)); | |
| 32 | - Result result= new Result(true); | |
| 33 | - return result.data(resultBean); | |
| 34 | - } | |
| 35 | - @Request.Post("com/api/video/all") | |
| 36 | - public Result all(Params params){ | |
| 37 | - String app_access_key =params.getString("app_access_key"); | |
| 38 | - String relationId = params.getString("relation_id"); | |
| 39 | - String pageNo = params.getString("page_no"); | |
| 40 | - ResultBean resultBean = new ResultBean(); | |
| 41 | - resultBean.setCode(100); | |
| 42 | - resultBean.setMessage("请求成功"); | |
| 43 | - resultBean.setData(videoApiService.findAll(app_access_key, relationId, pageNo)); | |
| 44 | - Result result= new Result(true); | |
| 45 | - return result.data(resultBean); | |
| 46 | - } | |
| 47 | - /*@Request.Post("com/api/video/uploadNotify") | |
| 48 | - public Result uploadNotify(Params params){ | |
| 49 | - String video_uuid = params.getString("video_uuid"); | |
| 50 | - System.out.println("video_uuid:" + video_uuid); | |
| 51 | - String upload_type = params.getString("upload_type"); | |
| 52 | - int video_type = params.getInt("video_type"); | |
| 53 | - String state = params.getString("state"); | |
| 54 | - videoApiService.notify(video_uuid, upload_type, video_type, state); | |
| 55 | - Result result= new Result(true); | |
| 56 | - return result.data(new ResultBean(100, "请求成功", null)); | |
| 57 | - }*/ | |
| 58 | - public static void main(String[] args) { | |
| 59 | - | |
| 60 | - } | |
| 61 | -} |
src/main/java/com/cnlive/mz/live/rest/BaseUtil.java
0 → 100644
| 1 | +package com.cnlive.mz.live.rest; | |
| 2 | + | |
| 3 | +import java.io.BufferedReader; | |
| 4 | +import java.io.IOException; | |
| 5 | +import java.io.InputStreamReader; | |
| 6 | +import java.io.PrintWriter; | |
| 7 | +import java.io.UnsupportedEncodingException; | |
| 8 | +import java.net.URL; | |
| 9 | +import java.net.URLConnection; | |
| 10 | +import java.security.MessageDigest; | |
| 11 | +import java.text.DateFormat; | |
| 12 | +import java.text.ParseException; | |
| 13 | +import java.text.SimpleDateFormat; | |
| 14 | +import java.util.Calendar; | |
| 15 | +import java.util.Date; | |
| 16 | +import java.util.Locale; | |
| 17 | +import java.util.UUID; | |
| 18 | + | |
| 19 | +import javax.crypto.Mac; | |
| 20 | +import javax.crypto.spec.SecretKeySpec; | |
| 21 | + | |
| 22 | +import org.apache.commons.codec.binary.Base64; | |
| 23 | + | |
| 24 | +import sun.misc.BASE64Encoder; | |
| 25 | + | |
| 26 | +public class BaseUtil { | |
| 27 | + | |
| 28 | + private static final String ENCODING = "UTF-8"; | |
| 29 | + private static final String AK_SECRET = "7SxVU5lFpqCEQIqxLprQat9BWoyZNKlKfSScTuIk"; | |
| 30 | + private static final String AK_ID = "I3TC8a4xboPUMe5xlp22"; | |
| 31 | + | |
| 32 | + /* | |
| 33 | + * 计算MD5+BASE64 | |
| 34 | + */ | |
| 35 | + public static String MD5Base64(String s) { | |
| 36 | + if (s == null) | |
| 37 | + return null; | |
| 38 | + String encodeStr = ""; | |
| 39 | + byte[] utfBytes = s.getBytes(); | |
| 40 | + MessageDigest mdTemp; | |
| 41 | + try { | |
| 42 | + mdTemp = MessageDigest.getInstance("MD5"); | |
| 43 | + mdTemp.update(utfBytes); | |
| 44 | + byte[] md5Bytes = mdTemp.digest(); | |
| 45 | + BASE64Encoder b64Encoder = new BASE64Encoder(); | |
| 46 | + encodeStr = b64Encoder.encode(md5Bytes); | |
| 47 | + } catch (Exception e) { | |
| 48 | + throw new Error("Failed to generate MD5 : " + e.getMessage()); | |
| 49 | + } | |
| 50 | + return encodeStr; | |
| 51 | + } | |
| 52 | + | |
| 53 | + /* | |
| 54 | + * 哈希计算 HMAC-SHA1 base64 | |
| 55 | + */ | |
| 56 | + public static String HMACSha1(String data, String key) { | |
| 57 | + String result; | |
| 58 | + try { | |
| 59 | + SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(), "HmacSHA1"); | |
| 60 | + Mac mac = Mac.getInstance("HmacSHA1"); | |
| 61 | + mac.init(signingKey); | |
| 62 | + byte[] rawHmac = mac.doFinal(data.getBytes()); | |
| 63 | + //result = new String(Base64.encodeBase64(rawHmac, false), ENCODING); | |
| 64 | + //result = (new BASE64Encoder()).encode(rawHmac); | |
| 65 | + result = new String(Base64.encodeBase64(rawHmac),ENCODING); | |
| 66 | + } catch (Exception e) { | |
| 67 | + throw new Error("Failed to generate HMAC : " + e.getMessage()); | |
| 68 | + } | |
| 69 | + return result; | |
| 70 | + } | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 获取当前时间戳 | |
| 74 | + * @return | |
| 75 | + */ | |
| 76 | + public static String getTimestamp(){ | |
| 77 | + DateFormat df = new SimpleDateFormat("yyyyMMdd"); | |
| 78 | + Date date = null; | |
| 79 | + try { | |
| 80 | + date = df.parse("20160607"); | |
| 81 | + } catch (ParseException e) { | |
| 82 | + e.printStackTrace(); | |
| 83 | + } | |
| 84 | + Calendar cal = Calendar.getInstance(); | |
| 85 | + cal.setTime(date); | |
| 86 | + long timestamp = cal.getTimeInMillis(); | |
| 87 | + Calendar calendar = Calendar.getInstance(); | |
| 88 | + calendar.add(Calendar.DATE,+1); | |
| 89 | + SimpleDateFormat sdf = new SimpleDateFormat("MMddHHmmss"); | |
| 90 | + String motoday = sdf.format(calendar.getTime()); | |
| 91 | + //Timestamp ts = new Timestamp(System.currentTimeMillis()); | |
| 92 | + long currentTime=Calendar.getInstance().getTimeInMillis(); | |
| 93 | + // System.out.println(ts+"---..ts..----"); | |
| 94 | + // Date date = new Date(); | |
| 95 | + // SimpleDateFormat sd = new SimpleDateFormat("MMddHHmmss"); | |
| 96 | + // String ss = sd.format(date); | |
| 97 | + return String.valueOf(timestamp); | |
| 98 | + //return motoday; | |
| 99 | + } | |
| 100 | + /** | |
| 101 | + * 签名算法:signature 字符串格式,由三部分组成:GET+”\n”+Expire+”\n”+Resource | |
| 102 | + * 2016 0602171212 | |
| 103 | + * @return | |
| 104 | + * @throws UnsupportedEncodingException | |
| 105 | + */ | |
| 106 | + public static String signature(String streamName) throws UnsupportedEncodingException { | |
| 107 | + | |
| 108 | + String method = "GET"; | |
| 109 | + String Expire = String.valueOf(BaseUtil.getTimestamp()).substring(0, 10); | |
| 110 | + System.out.println(Expire+"---expire----"); | |
| 111 | + String Resource = "app=live&method=add&nonce=cnlive&public=0&vdoid=12345&stream="+streamName; | |
| 112 | + Resource = java.net.URLEncoder.encode(Resource,"utf-8"); | |
| 113 | + String stringToSign = method + "\n" + Expire + "\n" + Resource; | |
| 114 | + // 2.计算 HMAC-SHA1 | |
| 115 | + String signature = HMACSha1(stringToSign, AK_SECRET); | |
| 116 | + System.out.println(signature+"------"); | |
| 117 | + signature =java.net.URLEncoder.encode(signature,"utf-8"); | |
| 118 | + return signature; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public static String UUid() { | |
| 122 | + String uuid = UUID.randomUUID().toString(); | |
| 123 | + uuid = uuid.replaceAll("-", ""); | |
| 124 | + return uuid; | |
| 125 | + } | |
| 126 | + | |
| 127 | + public static int random_7(int number) { | |
| 128 | + int x = (int) (Math.random() * 10); | |
| 129 | + for (int i = 0; i < number; i++) { | |
| 130 | + String num = Math.random() * 10 + ""; | |
| 131 | + } | |
| 132 | + return x; | |
| 133 | + } | |
| 134 | + | |
| 135 | + /* | |
| 136 | + * 等同于javaScript中的 new Date().toUTCString(); | |
| 137 | + */ | |
| 138 | + public static String toGMTString(Date date) { | |
| 139 | + SimpleDateFormat df = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss z", Locale.UK); | |
| 140 | + df.setTimeZone(new java.util.SimpleTimeZone(0, "GMT")); | |
| 141 | + return df.format(date); | |
| 142 | + } | |
| 143 | + | |
| 144 | + /* | |
| 145 | + * 发送POST请求 | |
| 146 | + */ | |
| 147 | + public static String sendPost(String url, String body, String ak_id, String ak_secret) { | |
| 148 | + PrintWriter out = null; | |
| 149 | + BufferedReader in = null; | |
| 150 | + String result = ""; | |
| 151 | + try { | |
| 152 | + URL realUrl = new URL(url); | |
| 153 | + | |
| 154 | + /* | |
| 155 | + * http header 参数 | |
| 156 | + */ | |
| 157 | + String method = "POST"; | |
| 158 | + String accept = "json"; | |
| 159 | + String content_type = "application/json"; | |
| 160 | + String path = realUrl.getFile(); | |
| 161 | + String date = toGMTString(new Date()); | |
| 162 | + | |
| 163 | + // 1.对body做MD5+BASE64加密 | |
| 164 | + String bodyMd5 = MD5Base64(body); | |
| 165 | + String stringToSign = method + "\n" + accept + "\n" + bodyMd5 + "\n" + content_type + "\n" + date + "\n" | |
| 166 | + + path; | |
| 167 | + // 2.计算 HMAC-SHA1 | |
| 168 | + String signature = HMACSha1(stringToSign, ak_secret); | |
| 169 | + // 3.得到 authorization header | |
| 170 | + String authHeader = "Dataplus " + ak_id + ":" + signature; | |
| 171 | + | |
| 172 | + // 打开和URL之间的连接 | |
| 173 | + URLConnection conn = realUrl.openConnection(); | |
| 174 | + // 设置通用的请求属性 | |
| 175 | + conn.setRequestProperty("accept", accept); | |
| 176 | + conn.setRequestProperty("content-type", content_type); | |
| 177 | + conn.setRequestProperty("date", date); | |
| 178 | + conn.setRequestProperty("Authorization", authHeader); | |
| 179 | + // 发送POST请求必须设置如下两行 | |
| 180 | + conn.setDoOutput(true); | |
| 181 | + conn.setDoInput(true); | |
| 182 | + // 获取URLConnection对象对应的输出流 | |
| 183 | + out = new PrintWriter(conn.getOutputStream()); | |
| 184 | + // 发送请求参数 | |
| 185 | + out.print(body); | |
| 186 | + // flush输出流的缓冲 | |
| 187 | + out.flush(); | |
| 188 | + // 定义BufferedReader输入流来读取URL的响应 | |
| 189 | + in = new BufferedReader(new InputStreamReader(conn.getInputStream())); | |
| 190 | + String line; | |
| 191 | + while ((line = in.readLine()) != null) { | |
| 192 | + result += line; | |
| 193 | + } | |
| 194 | + } catch (Exception e) { | |
| 195 | + System.out.println("发送 POST 请求出现异常!" + e); | |
| 196 | + e.printStackTrace(); | |
| 197 | + } | |
| 198 | + // 使用finally块来关闭输出流、输入流 | |
| 199 | + finally { | |
| 200 | + try { | |
| 201 | + if (out != null) { | |
| 202 | + out.close(); | |
| 203 | + } | |
| 204 | + if (in != null) { | |
| 205 | + in.close(); | |
| 206 | + } | |
| 207 | + } catch (IOException ex) { | |
| 208 | + ex.printStackTrace(); | |
| 209 | + } | |
| 210 | + } | |
| 211 | + return result; | |
| 212 | + } | |
| 213 | + | |
| 214 | + /* | |
| 215 | + * GET请求 | |
| 216 | + */ | |
| 217 | + | |
| 218 | + public static String sendGet(String url, String ak_id, String ak_secret) { | |
| 219 | + String result = ""; | |
| 220 | + BufferedReader in = null; | |
| 221 | + try { | |
| 222 | + URL realUrl = new URL(url); | |
| 223 | + /* | |
| 224 | + * http header 参数 | |
| 225 | + */ | |
| 226 | + String method = "GET"; | |
| 227 | + String Expire = "1436976000"; | |
| 228 | + String Resource = "nonce=4e1f2519c626cbfbab1520c255830c26&public=0&vdoid=12345"; | |
| 229 | + String content_type = "application/json"; | |
| 230 | + String path = realUrl.getFile(); | |
| 231 | + String date = toGMTString(new Date()); | |
| 232 | + // 1.对body做MD5+BASE64加密 | |
| 233 | + // String bodyMd5 = MD5Base64(body); | |
| 234 | + String stringToSign = method + "\n" + Expire + "\n" + Resource; | |
| 235 | + // 2.计算 HMAC-SHA1 | |
| 236 | + String signature = HMACSha1(stringToSign, ak_secret); | |
| 237 | + // 3.得到 authorization header | |
| 238 | + String authHeader = "Dataplus " + ak_id + ":" + signature; | |
| 239 | + // 打开和URL之间的连接 | |
| 240 | + URLConnection connection = realUrl.openConnection(); | |
| 241 | + // 设置通用的请求属性 | |
| 242 | + connection.setRequestProperty("accept", "json"); | |
| 243 | + connection.setRequestProperty("content-type", content_type); | |
| 244 | + connection.setRequestProperty("date", date); | |
| 245 | + connection.setRequestProperty("Authorization", authHeader); | |
| 246 | + // 建立实际的连接 | |
| 247 | + connection.connect(); | |
| 248 | + // 定义 BufferedReader输入流来读取URL的响应 | |
| 249 | + in = new BufferedReader(new InputStreamReader(connection.getInputStream())); | |
| 250 | + String line; | |
| 251 | + while ((line = in.readLine()) != null) { | |
| 252 | + result += line; | |
| 253 | + } | |
| 254 | + } catch (Exception e) { | |
| 255 | + System.out.println("发送GET请求出现异常!" + e); | |
| 256 | + e.printStackTrace(); | |
| 257 | + } | |
| 258 | + // 使用finally块来关闭输入流 | |
| 259 | + finally { | |
| 260 | + try { | |
| 261 | + if (in != null) { | |
| 262 | + in.close(); | |
| 263 | + } | |
| 264 | + } catch (Exception e) { | |
| 265 | + e.printStackTrace(); | |
| 266 | + } | |
| 267 | + } | |
| 268 | + return result; | |
| 269 | + } | |
| 270 | + | |
| 271 | + public static void main(String[] args) throws Exception { | |
| 272 | + // 发送POST请求示例 | |
| 273 | + /* | |
| 274 | + * String ak_id = "fWUN8KDtJZJGo0ArQ4qo"; // 用户ak String ak_secret = | |
| 275 | + * "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // 用户ak_secret String url | |
| 276 | + * = "https://kmr-cn-beijing.ksyun.com"; String body = | |
| 277 | + * "{\"param1\": \"GET\n1436976000\nnonce=4e1f2519c626cbfbab1520c255830c26&public=0&vdoid=12345\", \"param2\":\"fWUN8KDtJZJGo0ArQ4qo\"}" | |
| 278 | + * ; System.out.println("response body:" + sendPost(url, body, AK_ID, | |
| 279 | + * AK_SECRET)); | |
| 280 | + */ | |
| 281 | + | |
| 282 | + Date date = new Date(); | |
| 283 | + System.out.println(toGMTString(date)); | |
| 284 | + String hh = HMACSha1("GET\n1436976124\nnonce=4e1f2519c626cbfbab1520c255830c26&public=1&vdoid=1", | |
| 285 | + "fWUN8KDtJZJGo0ArQ4qo"); | |
| 286 | + String hhhh = MD5Base64(hh); | |
| 287 | + System.out.println(hh); | |
| 288 | + System.out.println(".............."); | |
| 289 | + //String str = signature(); | |
| 290 | + //System.out.println(str);//L2muBoImPzyvwyzfBtGXEu+wRNE= | |
| 291 | + /*// 发送GET请求 | |
| 292 | + String ak_id1 = "fWUN8KDtJZJGo0ArQ4qo"; //用户ak | |
| 293 | + String ak_secret1 = "UIWPYVeaV8kq2vWImDkLBvWs/pwmTJVF9MCNHDsC"; // 用户ak_secret | |
| 294 | + String url1 = "http://cnlive.uplive.ks-cdn.com?signature=L2muBoImPzyvwyzfBtGXEu+wRNE=&accesskey=fWUN8KDtJZJGo0ArQ4qo&expire=1436976000&method=add&app=live&name=498122_57"; | |
| 295 | + System.out.println("response body:" +sendGet(url1, ak_id1, ak_secret1));*/ | |
| 296 | + //long d = getTimestamp(); | |
| 297 | + //System.out.println(d); | |
| 298 | + } | |
| 299 | +} | ... | ... |
src/main/webapp/WEB-INF/web.xml
| ... | ... | @@ -3,5 +3,13 @@ |
| 3 | 3 | xmlns="http://java.sun.com/xml/ns/javaee" |
| 4 | 4 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" |
| 5 | 5 | version="3.0"> |
| 6 | - | |
| 6 | + <servlet> | |
| 7 | + <servlet-name>init_job</servlet-name> | |
| 8 | + <servlet-class>com.cnlive.mz.live.action.Init</servlet-class> | |
| 9 | + <init-param> | |
| 10 | + <param-name>shutdown-on-unload</param-name> | |
| 11 | + <param-value>true</param-value> | |
| 12 | + </init-param> | |
| 13 | + <load-on-startup>2</load-on-startup> | |
| 14 | + </servlet> | |
| 7 | 15 | </web-app> |
| 8 | 16 | \ No newline at end of file | ... | ... |
src/main/webapp/crossdomain.xml
0 → 100644
src/main/webapp/pages/check/check_management.jsp
| 1 | -<%@ page language="java" pageEncoding="UTF-8"%> | |
| 1 | +<%@ page language="java" pageEncoding="UTF-8" | |
| 2 | + deferredSyntaxAllowedAsLiteral="true"%> | |
| 2 | 3 | <%@ include file="/pages/common/taglib.jsp"%> |
| 3 | 4 | <!DOCTYPE html> |
| 4 | 5 | <html> |
| 5 | 6 | <head> |
| 6 | 7 | <meta charset="UTF-8"> |
| 7 | 8 | <title>监审管理 | <f:message key="common.title" /></title> |
| 8 | -<meta | |
| 9 | - content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | |
| 9 | +<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | |
| 10 | 10 | name='viewport'> |
| 11 | 11 | <%@ include file="/pages/common/css.jsp"%> |
| 12 | 12 | <style type="text/css"> |
| 13 | -.divcss5 { | |
| 14 | - border: 1px solid #00ff00; | |
| 15 | - width: 200px; | |
| 16 | - height: 100px | |
| 17 | -} | |
| 18 | - | |
| 19 | -.divcss { | |
| 20 | - border: 1px solid #F00; | |
| 21 | - width: 300px; | |
| 22 | - height: 520px | |
| 23 | -} | |
| 24 | - | |
| 25 | 13 | body { |
| 26 | 14 | font-family: Verdana, Arial, Helvetica, sans-serif; |
| 27 | 15 | font-size: 12px; |
| ... | ... | @@ -34,7 +22,6 @@ body { |
| 34 | 22 | width: 770px; |
| 35 | 23 | margin-right: auto; |
| 36 | 24 | margin-left: auto; |
| 37 | - background: #EFEFEF; | |
| 38 | 25 | } |
| 39 | 26 | |
| 40 | 27 | .row { |
| ... | ... | @@ -48,24 +35,17 @@ body { |
| 48 | 35 | border: 1px solid #00ff00; |
| 49 | 36 | width: 25%; |
| 50 | 37 | height: 150px; |
| 51 | - background: #888; | |
| 52 | - float: left; | |
| 53 | -} | |
| 54 | - | |
| 55 | -.middle { | |
| 56 | - width: 470px; | |
| 57 | - background: #6699CC; | |
| 58 | 38 | float: left; |
| 59 | 39 | } |
| 60 | 40 | |
| 61 | 41 | .divleft { |
| 62 | - width: 21%; | |
| 42 | + width: 24%; | |
| 63 | 43 | height: 600px; |
| 64 | 44 | float: left; |
| 65 | 45 | } |
| 66 | 46 | |
| 67 | 47 | .divright { |
| 68 | - width: 77%; | |
| 48 | + width: 74%; | |
| 69 | 49 | height: 600px; |
| 70 | 50 | float: right; |
| 71 | 51 | } |
| ... | ... | @@ -73,7 +53,6 @@ body { |
| 73 | 53 | .leftTop { |
| 74 | 54 | width: 100%; |
| 75 | 55 | height: 340px; |
| 76 | - background: #6600CC; | |
| 77 | 56 | float: right; |
| 78 | 57 | } |
| 79 | 58 | |
| ... | ... | @@ -106,7 +85,6 @@ body { |
| 106 | 85 | <!-- Main content --> |
| 107 | 86 | <section class="content"> |
| 108 | 87 | <div class="row"> |
| 109 | - | |
| 110 | 88 | <div class="col-xs-12"> |
| 111 | 89 | <div class="box box-warning"> |
| 112 | 90 | <div class="box-header with-border"> |
| ... | ... | @@ -158,186 +136,56 @@ body { |
| 158 | 136 | <th id=""></th> |
| 159 | 137 | </tr> |
| 160 | 138 | |
| 161 | - | |
| 162 | - | |
| 163 | 139 | </table> |
| 164 | 140 | </div> |
| 165 | - | |
| 166 | 141 | </div> |
| 167 | - | |
| 168 | 142 | <div class="divright"> |
| 169 | 143 | <!--五列开始--> |
| 170 | - | |
| 171 | 144 | <div class="row"> |
| 172 | 145 | <c:forEach var="item" items="${tLive.recordList}" |
| 173 | 146 | varStatus="stat"> |
| 174 | - <div id="paly_live_${item.id}" class="left3" | |
| 147 | + <!-- <div style="border: 1px solid #00ff00; width: 33%; height: 200px; background: #888; float: left;"> --> | |
| 148 | + <div class="warp" | |
| 149 | + style="border: 1px solid #00ff00; width: 33%; height: 203px; float: left;" | |
| 150 | + id="divShow_${item.id}" | |
| 175 | 151 | onclick="getParam('${item.id}','${item.title}','${item.live_url}','${item.start_time}','${item.end_time}')"> |
| 176 | - ${item.title} | |
| 177 | - <p>这是五列的第一列</p> | |
| 178 | - <p></p> | |
| 179 | - <p></p> | |
| 152 | + <!-- <div class="warp" style="height: 24px; background: #;"> --> | |
| 153 | + <button type="button" class="close" data-dismiss="modal" | |
| 154 | + id="colseLive" onclick="coseLive(event,'${item.id}','${item.t_user_id}')"> | |
| 155 | + <span aria-hidden="true">×</span><span | |
| 156 | + class="sr-only">Close</span> | |
| 157 | + </button> | |
| 158 | + <h5 class="modal-title" id="myModalLabel">正在直播:${item.title}</h5> | |
| 159 | + <!-- </div> --> | |
| 160 | + <div id="a1_${item.id}" class="a1_class" | |
| 161 | + style="height: 150px"> | |
| 162 | + <input type="hidden" value='${item.id}' name="liveid" | |
| 163 | + id="liveid"> <input type="hidden" | |
| 164 | + value='${item.title}' name="title" id="title"> <input | |
| 165 | + type="hidden" value='${item.live_url}' name="live_url" | |
| 166 | + id="live_url_${item.id}"> <input type="hidden" | |
| 167 | + value='${item.start_time}' name="start_time" | |
| 168 | + id="start_time"> <input type="hidden" | |
| 169 | + value='${item.end_time}' name="end_time" id="end_time"> | |
| 170 | + <%-- <h4 class="blue smaller"> | |
| 171 | + <i class="icon-picture orange"></i>视频源 : ${item.title} | |
| 172 | + </h4> --%> | |
| 173 | + </div> | |
| 174 | + <div class="" style="height: 30px;"> | |
| 175 | + <input type="button" value="置顶" id="makeTop" | |
| 176 | + onclick="makeTop(event,'${item.id}',this)"> <input | |
| 177 | + type="button" value="关闭活动" id="closeLive" | |
| 178 | + onclick="coseLive(event,'${item.id}','${item.t_user_id}')"> | |
| 179 | + </div> | |
| 180 | 180 | </div> |
| 181 | + <!-- </div> --> | |
| 181 | 182 | </c:forEach> |
| 182 | - <!-- <div class="left3"> | |
| 183 | - | |
| 184 | - <p>这是五列的第一列</p> | |
| 185 | - <p></p> | |
| 186 | - <p></p> | |
| 187 | - </div> | |
| 188 | - <div class="left3"> | |
| 189 | - <p>这是五列的第二列</p> | |
| 190 | - <p></p> | |
| 191 | - <p></p> | |
| 192 | - </div> | |
| 193 | - <div class="left3"> | |
| 194 | - <p>这是五列的第三列</p> | |
| 195 | - <p></p> | |
| 196 | - <p></p> | |
| 197 | - </div> | |
| 198 | - <div class="left3"> | |
| 199 | - <p>这是五列的第四列</p> | |
| 200 | - <p></p> | |
| 201 | - <p></p> | |
| 202 | - </div> | |
| 203 | - | |
| 204 | - </div> | |
| 205 | - | |
| 206 | - <div class="row"> | |
| 207 | - <div class="left3"> | |
| 208 | - <p>这是五列的第一列</p> | |
| 209 | - <p></p> | |
| 210 | - <p></p> | |
| 211 | - </div> | |
| 212 | - <div class="left3"> | |
| 213 | - <p>这是五列的第二列</p> | |
| 214 | - <p></p> | |
| 215 | - <p></p> | |
| 216 | - </div> | |
| 217 | - <div class="left3"> | |
| 218 | - <p>这是五列的第三列</p> | |
| 219 | - <p></p> | |
| 220 | - <p></p> | |
| 221 | - </div> | |
| 222 | - <div class="left3"> | |
| 223 | - <p>这是五列的第四列</p> | |
| 224 | - <p></p> | |
| 225 | - <p></p> | |
| 226 | - </div> | |
| 227 | - | |
| 228 | - </div> | |
| 229 | - <div class="row"> | |
| 230 | - <div class="left3"> | |
| 231 | - <p>这是五列的第一列</p> | |
| 232 | - <p></p> | |
| 233 | - <p></p> | |
| 234 | - </div> | |
| 235 | - <div class="left3"> | |
| 236 | - <p>这是五列的第二列</p> | |
| 237 | - <p></p> | |
| 238 | - <p></p> | |
| 239 | - </div> | |
| 240 | - <div class="left3"> | |
| 241 | - <p>这是五列的第三列</p> | |
| 242 | - <p></p> | |
| 243 | - <p></p> | |
| 244 | - </div> | |
| 245 | - <div class="left3"> | |
| 246 | - <p>这是五列的第四列</p> | |
| 247 | - <p></p> | |
| 248 | - <p></p> | |
| 249 | - </div> | |
| 250 | - | |
| 251 | - </div> | |
| 252 | - <div class="row"> | |
| 253 | - <div class="left3"> | |
| 254 | - <p>这是五列的第一列</p> | |
| 255 | - <p></p> | |
| 256 | - <p></p> | |
| 257 | - </div> | |
| 258 | - <div class="left3"> | |
| 259 | - <p>这是五列的第二列</p> | |
| 260 | - <p></p> | |
| 261 | - <p></p> | |
| 262 | - </div> | |
| 263 | - <div class="left3"> | |
| 264 | - <p>这是五列的第三列</p> | |
| 265 | - <p></p> | |
| 266 | - <p></p> | |
| 267 | - </div> | |
| 268 | - <div class="left3"> | |
| 269 | - <p>这是五列的第四列</p> | |
| 270 | - <p></p> | |
| 271 | - <p></p> | |
| 272 | - </div> --> | |
| 273 | - | |
| 274 | - </div> | |
| 275 | - </div> | |
| 276 | - </div> | |
| 277 | - <div class="modal-body"> | |
| 278 | - <div> | |
| 279 | - <h4>100013-1463713882750.m3u8</h4> | |
| 280 | - <div class="error-ctn"></div> | |
| 281 | - <div class="preview-ctn" id="preview-ctn"> | |
| 282 | - <object | |
| 283 | - pluginspage="http://www.macromedia.com/go/getflashplayer" | |
| 284 | - classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" | |
| 285 | - codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=11,3,0,0" | |
| 286 | - width="100%" height="400" id="ckplayer_a2" name="ckplayer_a2" | |
| 287 | - align="middle"> | |
| 288 | - <param name="allowScriptAccess" value="always"> | |
| 289 | - <param name="allowFullScreen" value="true"> | |
| 290 | - <param name="quality" value="high"> | |
| 291 | - <param name="bgcolor" value="#FFF"> | |
| 292 | - <param name="wmode" value="transparent"> | |
| 293 | - <param name="movie" value="flash/ckplayer.swf"> | |
| 294 | - <param name="flashvars" | |
| 295 | - value="f=http://kls.ksyun.com/flash/m3u8.swf&a=http://com.cnlive.video.kssws.ks-cdn.com/record/live/100013/hls/100013-1463713882750.m3u8&c=0&s=4&lv=0"> | |
| 296 | - <embed allowscriptaccess="always" allowfullscreen="true" | |
| 297 | - quality="high" bgcolor="#FFF" wmode="transparent" | |
| 298 | - src="flash/ckplayer.swf" | |
| 299 | - flashvars="f=http://kls.ksyun.com/flash/m3u8.swf&a=http://com.cnlive.video.kssws.ks-cdn.com/record/live/100013/hls/100013-1463713882750.m3u8&c=0&s=4&lv=0" | |
| 300 | - width="100%" height="400" name="ckplayer_a2" | |
| 301 | - id="ckplayer_a2" align="middle" | |
| 302 | - type="application/x-shockwave-flash" | |
| 303 | - pluginspage="http://www.macromedia.com/go/getflashplayer"> | |
| 304 | - </object> | |
| 305 | 183 | </div> |
| 306 | 184 | </div> |
| 307 | 185 | </div> |
| 308 | 186 | |
| 309 | - <!-- <table class="table table-bordered"> | |
| 310 | - <tr> | |
| 311 | - <th rowspan="4"><div class="divcss"></div>活动名称</th> | |
| 312 | - <th><div class="divcss5"></div></th> | |
| 313 | - <th><div class="divcss5"></div></th> | |
| 314 | - <th><div class="divcss5"></div></th> | |
| 315 | - <th><div class="divcss5"></div></th> | |
| 316 | - </tr> | |
| 317 | - <tr> | |
| 318 | - <th><div class="divcss5"></div></th> | |
| 319 | - <th><div class="divcss5"></div></th> | |
| 320 | - <th><div class="divcss5"></div></th> | |
| 321 | - <th><div class="divcss5"></div></th> | |
| 322 | - </tr> | |
| 323 | - <tr> | |
| 324 | - <th><div class="divcss5"></div></th> | |
| 325 | - <th><div class="divcss5"></div></th> | |
| 326 | - <th><div class="divcss5"></div></th> | |
| 327 | - <th><div class="divcss5"></div></th> | |
| 328 | - </tr> | |
| 329 | - <tr> | |
| 330 | - <th><div class="divcss5"></div></th> | |
| 331 | - <th><div class="divcss5"></div></th> | |
| 332 | - <th><div class="divcss5"></div></th> | |
| 333 | - <th><div class="divcss5"></div></th> | |
| 334 | - </tr> | |
| 335 | - | |
| 336 | - | |
| 337 | - </table> --> | |
| 338 | 187 | </div> |
| 339 | 188 | <!-- /.box-body --> |
| 340 | - | |
| 341 | 189 | </div> |
| 342 | 190 | </div> |
| 343 | 191 | </section> |
| ... | ... | @@ -345,15 +193,99 @@ body { |
| 345 | 193 | </div> |
| 346 | 194 | <%@ include file="/pages/common/bottom.jsp"%> |
| 347 | 195 | <%@ include file="/pages/common/js.jsp"%> |
| 196 | + <script type="text/javascript" src="../../pages/check/js/ckplayer.js" charset="utf-8"></script> | |
| 197 | + <script type="text/javascript" src="../../pages/check/js/offlights.js" charset="utf-8"></script> | |
| 348 | 198 | <script type="text/javascript"> |
| 199 | + var flashvars = { | |
| 200 | + p : 1, | |
| 201 | + e : 1, | |
| 202 | + hl : '', | |
| 203 | + ht : '20', | |
| 204 | + }; | |
| 205 | + var video = [ '' ]; | |
| 206 | + var support = [ 'all' ]; | |
| 207 | + CKobject.embedHTML5('leftTopPlay', 'ckplayer_leftTopPlay', 250, 290, | |
| 208 | + video, flashvars, support); | |
| 209 | + | |
| 210 | + $(".a1_class #liveid").each(function() { | |
| 211 | + var id = $(this).val(); | |
| 212 | + var live_url = $('#live_url_' + id).val(); | |
| 213 | + var flashvars = { | |
| 214 | + p : 1, | |
| 215 | + e : 1, | |
| 216 | + hl : live_url, | |
| 217 | + ht : '20' | |
| 218 | + }; | |
| 219 | + var video = [live_url ]; | |
| 220 | + var support = [ 'all' ]; | |
| 221 | + CKobject.embedHTML5('a1_' + id, 'ckplayer_' + id, | |
| 222 | + 250, 153, video, flashvars, support); | |
| 223 | + | |
| 224 | + //m3u8 文件播放 | |
| 225 | + /* var flashvars={ | |
| 226 | + f:'http://localhost:8080/cnlive_live_web/static/assets/ckplayer/m3u8.swf', | |
| 227 | + a:'http://wideo01.cnlive.com/video/data1/2016/0524/124235/1500/b148a555a7984a539b56d7e17cb360f7_124235_1500.m3u8', | |
| 228 | + s:4, | |
| 229 | + c:0, | |
| 230 | + p:1 | |
| 231 | + }; | |
| 232 | + var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'}; | |
| 233 | + var video=['http://wideo01.cnlive.com/video/data1/2016/0524/124235/1500/b148a555a7984a539b56d7e17cb360f7_124235_1500.m3u8']; | |
| 234 | + CKobject.embed('http://localhost:8080/cnlive_live_web/static/assets/ckplayer/ckplayer.swf', 'a1_' + id, 'ckplayer_' + id, 250, 153,false,flashvars,video,params); */ | |
| 235 | + // rtmp 直播流播放。 | |
| 236 | + /* var flashvars = { | |
| 237 | + // f:'rtmp://localhost/live/livestreame', | |
| 238 | + f : 'rtmp://cnlive.uplive.ks-cdn.com/live/LIVEVJ154A34CF536', | |
| 239 | + c : 0 | |
| 240 | + }; | |
| 241 | + var video = [ 'http://cnlive.hlslive.ks-cdn.com/live/LIVEVJ154A34CF536/index.m3u8']; | |
| 242 | + CKobject.embed('../../static/assets/ckplayer/ckplayer.swf','a1_' + id, 'ckplayer_' + id, 250, | |
| 243 | + 153, false, flashvars, video); */ | |
| 244 | + | |
| 245 | + }); | |
| 246 | + | |
| 349 | 247 | function getParam(id, name, live_url, start_time, end_time) { |
| 350 | 248 | |
| 351 | 249 | $("#live_name").html(name); |
| 352 | 250 | $("#start_time").html(start_time); |
| 353 | 251 | $("#end_time").html(end_time); |
| 354 | 252 | $("#live_url").html(live_url); |
| 355 | - alert(id); | |
| 253 | + var flashvars = { | |
| 254 | + p : 1, | |
| 255 | + e : 1, | |
| 256 | + hl : 'http://movie.ks.js.cn/flv/other/1_0.mp4', | |
| 257 | + }; | |
| 258 | + var video = [ live_url ]; | |
| 259 | + var support = [ 'all' ]; | |
| 260 | + CKobject.embedHTML5('leftTopPlay', 'ckplayer_leftTopPlay', 250, | |
| 261 | + 290, video, flashvars, support); | |
| 262 | + } | |
| 263 | + function coseLive(e, id,user_id) { | |
| 264 | + e.cancelBubble = true; | |
| 265 | + $.ajax({ | |
| 266 | + url : '../../check/close/' + id, | |
| 267 | + type : 'post', | |
| 268 | + datatype : "json", | |
| 269 | + async : true, | |
| 270 | + data:{"user_id":user_id}, | |
| 271 | + error : function() { | |
| 272 | + alert('关闭时发生错误!'); | |
| 273 | + }, | |
| 274 | + success : function(data) { | |
| 275 | + location.href = '../../check/list/1'; | |
| 276 | + alert("关闭成功"); | |
| 277 | + } | |
| 278 | + }); | |
| 356 | 279 | } |
| 280 | + /** | |
| 281 | + 置顶 。。。 | |
| 282 | + */ | |
| 283 | + | |
| 284 | + function makeTop(event, id, obj) { | |
| 285 | + event.cancelBubble = true; | |
| 286 | + $(obj.parentElement.parentElement).insertBefore($('.warp').first()) | |
| 287 | + alert(obj.parentElement.parentElement); | |
| 288 | + }; | |
| 357 | 289 | </script> |
| 358 | 290 | </body> |
| 359 | 291 | </html> | ... | ... |
src/main/webapp/pages/check/js/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: 'logo.swf', | |
| 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: 'cklogo.png', | |
| 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/pages/check/monitor.jsp
0 → 100644
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | |
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | |
| 3 | +<!DOCTYPE html> | |
| 4 | +<html> | |
| 5 | +<head> | |
| 6 | +<meta charset="UTF-8"> | |
| 7 | +<title>监审管理 |<f:message key="common.title" /></title> | |
| 8 | +<meta | |
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | |
| 10 | + name='viewport'> | |
| 11 | +<%@ include file="/pages/common/css.jsp"%> | |
| 12 | +<script src="${BASE}/static/assets/cnlive/js/check.js"></script> | |
| 13 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | |
| 14 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | |
| 15 | +<script type="text/javascript">jwplayer.key="MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA==";</script> | |
| 16 | + | |
| 17 | +</head> | |
| 18 | +<body class="skin-blue sidebar-collapse sidebar-mini"> | |
| 19 | + <div class="wrapper"> | |
| 20 | + <%@ include file="/pages/common/top.jsp"%> | |
| 21 | + <%@ include file="/pages/common/left.jsp"%> | |
| 22 | + <!-- Content Wrapper. Contains page content --> | |
| 23 | + <div class="content-wrapper"> | |
| 24 | + <!-- Content Header (Page header) --> | |
| 25 | + <section class="content-header"> | |
| 26 | + <h1> | |
| 27 | + 监审管理 <small>monitor panel</small> | |
| 28 | + </h1> | |
| 29 | + <ol class="breadcrumb"> | |
| 30 | + <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 31 | + <li class="active">监审管理</li> | |
| 32 | + </ol> | |
| 33 | + </section> | |
| 34 | + <section class="content"> | |
| 35 | + <div class="row"> | |
| 36 | + <div class="col-md-4"> | |
| 37 | + <div class="box box-solid"> | |
| 38 | + <div class="box-header with-border"> | |
| 39 | + <h3 class="box-title">监控平台</h3> | |
| 40 | + </div> | |
| 41 | + <div class="box-body no-padding"> | |
| 42 | + <div class="col-md-12" id="divShow_${item.id}"> | |
| 43 | + <div class="box box-success box-solid"> | |
| 44 | + <div class="box-header with-border"> | |
| 45 | + <h3 class="box-title">${item.title}</h3> | |
| 46 | + <div class="box-tools pull-right"> | |
| 47 | + <button class="btn btn-sm" id="play_button_${item.id}" | |
| 48 | + onclick="play(${item.id});">重新载入</button> | |
| 49 | + </div> | |
| 50 | + </div> | |
| 51 | + <div class="box-body"> | |
| 52 | + <input type="hidden" name="play_url_${item.id}" | |
| 53 | + id="play_url_${item.id}" value="${item.live_url}" /> <span | |
| 54 | + class="mailbox-attachment-icon has-img" | |
| 55 | + id="player_span_${item.id}"> <img | |
| 56 | + src="../../static/assets/dist/img/photo2.png" | |
| 57 | + alt="Attachment"> | |
| 58 | + </span> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <div class="box-header with-border"> | |
| 65 | + <h3 class="box-title">直播信息:</h3> | |
| 66 | + </div> | |
| 67 | + <div class="box-body no-padding"> | |
| 68 | + <ul class="nav nav-pills nav-stacked"> | |
| 69 | + <li><a><i class="fa fa-file-text-o"></i>用户ID:</a></li> | |
| 70 | + <li><a><i class="fa fa-file-text-o"></i>TITLE: </a></li> | |
| 71 | + <li><a><i class="fa fa-file-text-o"></i>开播时间: </a></li> | |
| 72 | + </ul> | |
| 73 | + </div> | |
| 74 | + </div> | |
| 75 | + <div class="col-md-8"> | |
| 76 | + <div class="box box-primary"> | |
| 77 | + <div class="box-header with-border"> | |
| 78 | + <h3 class="box-title">监控</h3> | |
| 79 | + <tag:pager id="product_pager" pager="${tLive}" /> | |
| 80 | + </div> | |
| 81 | + <div class="box-body no-padding"> | |
| 82 | + <div class="row"> | |
| 83 | + <c:forEach var="item" items="${tLive.recordList}" | |
| 84 | + varStatus="stat"> | |
| 85 | + <div class="col-md-3" id="divShow_${item.id}"> | |
| 86 | + <div | |
| 87 | + class="box ${item.check_sort eq null ? 'box-warning':'box-success'} box-solid"> | |
| 88 | + <div class="box-header with-border"> | |
| 89 | + <h3 class="box-title">${item.title}</h3> | |
| 90 | + <div class="box-tools pull-right"> | |
| 91 | + <button class="btn btn-sm btn-danger" | |
| 92 | + onclick="to_pass(${item.id});">过</button> | |
| 93 | + <button class="btn btn-sm btn-danger" | |
| 94 | + onclick="to_top(${item.id});">顶</button> | |
| 95 | + <button class="btn btn-sm btn-danger" | |
| 96 | + onclick="play(${item.id});">断</button> | |
| 97 | + </div> | |
| 98 | + </div> | |
| 99 | + <div class="box-body"> | |
| 100 | + <input type="hidden" name="play_url_${item.id}" | |
| 101 | + id="play_url_${item.id}" value="${item.live_url}" /> <span | |
| 102 | + class="mailbox-attachment-icon has-img" | |
| 103 | + id="player_span_${item.id}"> <img | |
| 104 | + src="../../static/assets/dist/img/photo2.png" | |
| 105 | + alt="Attachment"> | |
| 106 | + </span> | |
| 107 | + </div> | |
| 108 | + </div> | |
| 109 | + </div> | |
| 110 | + </c:forEach> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | + </div> | |
| 114 | + </div> | |
| 115 | + </div> | |
| 116 | + <%@ include file="/pages/common/js.jsp"%> | |
| 117 | + <script src="${BASE}/static/assets/cnlive/js/player_m3u8.js"></script> | |
| 118 | + </section> | |
| 119 | + </div> | |
| 120 | + </div> | |
| 121 | +</body> | |
| 122 | +</html> | |
| 0 | 123 | \ No newline at end of file | ... | ... |
src/main/webapp/pages/common/js.jsp
| ... | ... | @@ -31,7 +31,9 @@ |
| 31 | 31 | <script src="${BASE}/static/assets/plugins/fileinput/fileinput.min.js"></script> |
| 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/live.js" type="text/javascript"></script> | |
| 36 | +<script src="${BASE}/static/assets/cnlive/js/room.js" type="text/javascript"></script> | |
| 35 | 37 | <script src="${BASE}/static/assets/cnlive/js/channel.js" type="text/javascript"></script> |
| 36 | 38 | <script src="${BASE}/static/assets/cnlive/js/signal.js" type="text/javascript"></script> |
| 37 | 39 | <script src="${BASE}/static/assets/cnlive/js/wowza.js" type="text/javascript"></script> | ... | ... |
src/main/webapp/pages/common/left.jsp
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | <i class="fa fa-circle text-success"></i> |
| 15 | 15 | <c:if test="${sessionScope.roleId=='1'}">超级管理员</c:if> |
| 16 | 16 | <c:if test="${sessionScope.roleId=='0'}">普通用户</c:if> |
| 17 | + <c:if test="${sessionScope.roleId=='2'}">总编室用户</c:if> | |
| 17 | 18 | </div> |
| 18 | 19 | </div> |
| 19 | 20 | <ul class="sidebar-menu"> |
| ... | ... | @@ -41,14 +42,22 @@ |
| 41 | 42 | <li> |
| 42 | 43 | <a href="${BASE}/signal/list/1"><i class="fa fa-circle-o text-red"></i>信源管理</a> |
| 43 | 44 | </li> |
| 44 | - | |
| 45 | - <!-- 主播 --> | |
| 46 | - <li class="header">系统设置</li> | |
| 45 | + <!-- 主播 --> | |
| 46 | + <li class="header">UGC直播</li> | |
| 47 | 47 | <li> |
| 48 | 48 | <a href="${BASE}/room/list/1"><i class="fa fa-circle-o text-yellow"></i>直播间管理</a> |
| 49 | 49 | </li> |
| 50 | 50 | <li> |
| 51 | - <a href="${BASE}/live/list/1"><i class="fa fa-circle-o text-yellow"></i>直播活动</a> | |
| 51 | + <a href="${BASE}/live/list/1"><i class="fa fa-circle-o text-yellow"></i>直播活动管理</a> | |
| 52 | + </li> | |
| 53 | + <li> | |
| 54 | + <a href="${BASE}/video/list/1"><i class="fa fa-circle-o text-yellow"></i>直播录制管理</a> | |
| 55 | + </li> | |
| 56 | + <li> | |
| 57 | + <a href="${BASE}/check/list/1"><i class="fa fa-circle-o text-yellow"></i>直播审查</a> | |
| 58 | + </li> | |
| 59 | + <li> | |
| 60 | + <a href="${BASE}/video/check/1"><i class="fa fa-circle-o text-yellow"></i>点播审查</a> | |
| 52 | 61 | </li> |
| 53 | 62 | </c:if> |
| 54 | 63 | <c:if test="${sessionScope.roleId=='0'}"> |
| ... | ... | @@ -67,6 +76,13 @@ |
| 67 | 76 | <a href="${BASE}/channel/list/1"><i class="fa fa-circle-o text-green"></i>频道管理</a> |
| 68 | 77 | </li> |
| 69 | 78 | </c:if> |
| 79 | + <c:if test="${sessionScope.roleId=='2'}"> | |
| 80 | + <!-- 主播 --> | |
| 81 | + <li class="header">UGC直播</li> | |
| 82 | + <li> | |
| 83 | + <a href="${BASE}/check/list/1"><i class="fa fa-circle-o text-yellow"></i>直播审查</a> | |
| 84 | + </li> | |
| 85 | + </c:if> | |
| 70 | 86 | </ul> |
| 71 | 87 | </section> |
| 72 | 88 | <!-- /.sidebar --> | ... | ... |
src/main/webapp/pages/live/live_add.jsp
| ... | ... | @@ -82,10 +82,10 @@ |
| 82 | 82 | </div> |
| 83 | 83 | </div> |
| 84 | 84 | <div class="form-group"> |
| 85 | - <label>海报 </label> | |
| 85 | + <label>封面海报 </label> | |
| 86 | 86 | <div class="input-group"> |
| 87 | 87 | <span class="input-group-addon"><i |
| 88 | - class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" name="input-22" accept="image/*" class="file-loading"> | |
| 88 | + class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" name="input-22" accept="image/*" class="file-loading"> | |
| 89 | 89 | </div> |
| 90 | 90 | </div> |
| 91 | 91 | <div class="form-group"> |
| ... | ... | @@ -106,7 +106,7 @@ |
| 106 | 106 | </div> |
| 107 | 107 | |
| 108 | 108 | <div class="form-group"> |
| 109 | - <label>活动简述 </label> | |
| 109 | + <label>活动简介 </label> | |
| 110 | 110 | <div class="input-group"> |
| 111 | 111 | <span class="input-group-addon"><i |
| 112 | 112 | 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/live_edit.jsp
| ... | ... | @@ -83,7 +83,6 @@ |
| 83 | 83 | </div> |
| 84 | 84 | <div class="form-group"> |
| 85 | 85 | <label>海报 </label> |
| 86 | - <img src="E:/image/0.jpg" class="user-image" alt="User Image" /> | |
| 87 | 86 | <div class="input-group"> |
| 88 | 87 | <span class="input-group-addon"><i |
| 89 | 88 | class="fa fa-file-word-o"></i> </span> <input id="input-22" type="file" value="${tActivity.poster}"name="input-22" accept="image/*" class="file-loading"> | ... | ... |
src/main/webapp/pages/live/video_management.jsp
0 → 100644
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | |
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | |
| 3 | +<!DOCTYPE html> | |
| 4 | +<html> | |
| 5 | +<head> | |
| 6 | +<meta charset="UTF-8"> | |
| 7 | +<title>直播录制管理 | <f:message key="common.title" /></title> | |
| 8 | +<meta | |
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | |
| 10 | + name='viewport'> | |
| 11 | +<%@ include file="/pages/common/css.jsp"%> | |
| 12 | +</head> | |
| 13 | +<body class="skin-blue fixed "> | |
| 14 | + <div class="wrapper"> | |
| 15 | + <%@ include file="/pages/common/top.jsp"%> | |
| 16 | + <%@ include file="/pages/common/left.jsp"%> | |
| 17 | + <div class="content-wrapper"> | |
| 18 | + <!-- Content Header (Page header) --> | |
| 19 | + <section class="content-header"> | |
| 20 | + <h1> | |
| 21 | + 直播录制管理 <small class="label label-warning" style="display: none" | |
| 22 | + id="info_tab_span"><i class="fa fa-bell-o"></i></small> | |
| 23 | + </h1> | |
| 24 | + | |
| 25 | + <ol class="breadcrumb"> | |
| 26 | + <li><a><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 27 | + <li class="active">活动管理</li> | |
| 28 | + </ol> | |
| 29 | + </section> | |
| 30 | + <!-- Main content --> | |
| 31 | + <section class="content"> | |
| 32 | + <div class="row"> | |
| 33 | + <div class="col-xs-12"> | |
| 34 | + <div class="box box-warning"> | |
| 35 | + <div class="box-header with-border"></div> | |
| 36 | + <div class="box-body"> | |
| 37 | + <table class="table table-bordered"> | |
| 38 | + <tr> | |
| 39 | + <th>名称</th> | |
| 40 | + <th>状态</th> | |
| 41 | + <th>修改</th> | |
| 42 | + <th>删除</th> | |
| 43 | + </tr> | |
| 44 | + <c:forEach var="item" items="${videos.recordList}" | |
| 45 | + varStatus="stat"> | |
| 46 | + <tr> | |
| 47 | + <td><a href="${BASE}/video/view/${item.id}">${item.title}</a> | |
| 48 | + </td> | |
| 49 | + <td><c:if test="${item.state==0}"> | |
| 50 | + <span class="badge bg-green">未开始</span> | |
| 51 | + </c:if> <c:if test="${item.state==1}"> | |
| 52 | + <span class="badge bg-red">直播中</span> | |
| 53 | + </c:if> <c:if test="${item.state==2}"> | |
| 54 | + <span class="badge">直播结束</span> | |
| 55 | + </c:if> <c:if test="${item.state==3}"> | |
| 56 | + <span class="badge">回放同步中</span> | |
| 57 | + </c:if> <c:if test="${item.state==4}"> | |
| 58 | + <span class="badge">同步完成</span> | |
| 59 | + </c:if></td> | |
| 60 | + <td> | |
| 61 | + <button class="btn btn-default btn-sm" | |
| 62 | + onclick="t_live_edit(${item.id});"> | |
| 63 | + <i class="fa fa-edit"></i> | |
| 64 | + </button> | |
| 65 | + </td> | |
| 66 | + <td> | |
| 67 | + <button class="btn btn-danger btn-sm" | |
| 68 | + onclick="t_live_delete(${item.id});"> | |
| 69 | + <i class="fa fa-close"></i> | |
| 70 | + </button> | |
| 71 | + </td> | |
| 72 | + </tr> | |
| 73 | + </c:forEach> | |
| 74 | + </table> | |
| 75 | + </div> | |
| 76 | + <!-- /.box-body --> | |
| 77 | + <div class="box-footer clearfix"> | |
| 78 | + <center> | |
| 79 | + <tag:pager id="product_pager" pager="${tLive}" /> | |
| 80 | + </center> | |
| 81 | + </div> | |
| 82 | + </div> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | + <%@ include file="/pages/common/bottom.jsp"%> | |
| 87 | + </div> | |
| 88 | + <%@ include file="/pages/common/js.jsp"%> | |
| 89 | +</body> | |
| 90 | +</html> | ... | ... |
src/main/webapp/pages/live/video_view.jsp
0 → 100644
| 1 | +<%@ page language="java" pageEncoding="UTF-8"%> | |
| 2 | +<%@ include file="/pages/common/taglib.jsp"%> | |
| 3 | +<!DOCTYPE html> | |
| 4 | +<html> | |
| 5 | +<head> | |
| 6 | +<meta charset="UTF-8"> | |
| 7 | +<title>点播详情 | <f:message key="common.title" /></title> | |
| 8 | +<meta | |
| 9 | + content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' | |
| 10 | + name='viewport'> | |
| 11 | +<%@ include file="/pages/common/css.jsp"%> | |
| 12 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.js"></script> | |
| 13 | +<script src="${BASE}/static/assets/jwplayer/jwplayer.html5.js"></script> | |
| 14 | +<script type="text/javascript"> | |
| 15 | + jwplayer.key = "MGAzpXRYxGnaVXhH8jSdKXzDe7ucAAvZGWggIA=="; | |
| 16 | +</script> | |
| 17 | +</head> | |
| 18 | +<body class="skin-blue fixed "> | |
| 19 | + <div class="wrapper"> | |
| 20 | + <%@ include file="/pages/common/top.jsp"%> | |
| 21 | + <%@ include file="/pages/common/left.jsp"%> | |
| 22 | + <div class="content-wrapper"> | |
| 23 | + <!-- Content Header (Page header) --> | |
| 24 | + <section class="content-header"> | |
| 25 | + <h1> | |
| 26 | + 点播详情 <small>${tVideo.title}</small> | |
| 27 | + </h1> | |
| 28 | + <ol class="breadcrumb"> | |
| 29 | + <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li> | |
| 30 | + <li><a href="#">点播详情</a></li> | |
| 31 | + </ol> | |
| 32 | + </section> | |
| 33 | + <section class="content"> | |
| 34 | + <div class="row"> | |
| 35 | + <div class="col-md-12"> | |
| 36 | + <div class="timeline-item"> | |
| 37 | + <div class="timeline-body"> | |
| 38 | + <div class="row"> | |
| 39 | + <div class="col-md-12"> | |
| 40 | + <div class="box box-danger"> | |
| 41 | + <div class="box-body"> | |
| 42 | + <table class="table table-bordered"> | |
| 43 | + <tr> | |
| 44 | + <td colspan="3" align='center'><h2>${tVideo.title}</h2></td> | |
| 45 | + </tr> | |
| 46 | + <tr> | |
| 47 | + <td>Name:</td> | |
| 48 | + <td colspan="3">${tVideo.name}</td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td>地点:</td> | |
| 52 | + <td colspan="3">${tActivity.place}</td> | |
| 53 | + </tr> | |
| 54 | + <tr> | |
| 55 | + <td>简介:</td> | |
| 56 | + <td colspan="3">${tActivity.description}</td> | |
| 57 | + </tr> | |
| 58 | + </table> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + </div> | |
| 65 | + <%@ include file="/pages/common/bottom.jsp"%> | |
| 66 | + </div> | |
| 67 | + <%@ include file="/pages/common/js.jsp"%> | |
| 68 | + <script src="${BASE}/static/assets/cnlive/js/player_6.js"></script> | |
| 69 | + </div> | |
| 70 | + </section> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | +</body> | |
| 74 | +</html> | ... | ... |
src/main/webapp/static/assets/ckplayer/ckplayer.js
0 → 100644
| 1 | +/* | |
| 2 | +------------------------------------------------------------------------- | |
| 3 | + 说明: | |
| 4 | + 正式使用时可以把该文件的注释全部去掉,节省加载时间 | |
| 5 | + ckplayer6.8,有问题请访问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 | + return cpt; | |
| 24 | +} | |
| 25 | +/* | |
| 26 | +插件的定义结束 | |
| 27 | +以下是对播放器功能进行配置 | |
| 28 | +*/ | |
| 29 | +function ckstyle() { //定义总的风格 | |
| 30 | + var ck = { | |
| 31 | + cpath: '', | |
| 32 | + /* | |
| 33 | + 播放器风格压缩包文件的路径,默认的是style.swf | |
| 34 | + 如果调用不出来可以试着设置成绝对路径试试 | |
| 35 | + 如果不知道路径并且使用的是默认配置,可以直接留空,播放器会 | |
| 36 | + */ | |
| 37 | + language: '', | |
| 38 | + /*播放器所使用的语言配置文件,需要和播放器在同目录下,默认是language.xml*/ | |
| 39 | + flashvars: '', | |
| 40 | + /* | |
| 41 | + 这里是用来做为对flashvars值的补充,除了c和x二个参数以外的设置都可以在这里进行配置 | |
| 42 | + 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 | |
| 43 | + 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3*/ | |
| 44 | + setup: '1,1,1,1,1,2,0,1,2,0,0,1,200,0,2,1,0,1,1,1,1,10,3,0,1,2,3000,0,0,0,0,1,1,1,1,1,1,250,0,90,0,0,0', | |
| 45 | + /* | |
| 46 | + 这是配置文件里比较重要的一个参数,共有N个功能控制参数,并且以后会继续的增加,各控制参数以英文逗号(,)隔开。下面列出各参数的说明: | |
| 47 | + 1、鼠标经过按钮是否使用手型,0普通鼠标,1手型鼠标,2是只有按钮手型,3是控制栏手型 | |
| 48 | + 2、是否支持单击暂停,0不支持,1是支持 | |
| 49 | + 3、是否支持双击全屏,0不支持,1是支持 | |
| 50 | + 4、在播放前置广告时是否同时加载视频,0不加载,1加载 | |
| 51 | + 5、广告显示的参考对象,0是参考视频区域,1是参考播放器区域 | |
| 52 | + 6、广告大小的调整方式,只针对swf和图片有效,视频是自动缩放的 | |
| 53 | + 0=自动调整大小,意思是说大的话就变小,小的话就变大 | |
| 54 | + 1=是大的化变小,小的话不变 | |
| 55 | + 2=是什么也不变,就这么大 | |
| 56 | + 3=是跟参考对像(第5个控制)参数设置的一样宽高 | |
| 57 | + 7、前置广告播放顺序,0是顺序播放,1是随机播放,>1则随机取所有广告中的(N-1)个进行播放 | |
| 58 | + 8、对于视频广告是否采用修正,0是不使用,1是使用,如果是1,则用户在网速慢的情况下会按设定的倒计时进行播放广告,计时结束则放正片(比较人性化),设置成0的话,则强制播放完广告才能播放正片 | |
| 59 | + 9、是否开启滚动文字广告,0是不开启,1是开启且不使用关闭按钮,2是开启并且使用关闭按钮,开启后将在加载视频的时候加载滚动文字广告 | |
| 60 | + 10、视频的调整方式 | |
| 61 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 62 | + 1=是大的化变小,小的话不变 | |
| 63 | + 2=是什么也不变,就这么大 | |
| 64 | + 3=是跟参考对像(pm_video的设置)参数设置的一样宽高 | |
| 65 | + 11、是否在多视频时分段加载,0不是,1是 | |
| 66 | + 12、缩放视频时是否进行平滑处理,0不是,1是 | |
| 67 | + 13、视频缓冲时间,单位:毫秒,建议不超过300 | |
| 68 | + 14、初始图片调整方式( | |
| 69 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 70 | + 1=是大的化变小,小的话不变 | |
| 71 | + 2=是什么也不变,就这么大 | |
| 72 | + 3=是跟pm_video参数设置的一样宽高 | |
| 73 | + 15、暂停广告调整方式( | |
| 74 | + 0=是自动调整大小,意思是说大的话就变小,小的话就变大,同时保持长宽比例不变 | |
| 75 | + 1=是大的化变小,小的话不变 | |
| 76 | + 2=是什么也不变,就这么大 | |
| 77 | + 3=是跟pm_video参数设置的一样宽 | |
| 78 | + 16、暂停广告是否使用关闭广告设置,0不使用,1使用 | |
| 79 | + 17、缓冲时是否播放广告,0是不显示,1是显示并同时隐藏掉缓冲图标和进度,2是显示并不隐藏缓冲图标 | |
| 80 | + 18、是否支持键盘空格键控制播放和暂停0不支持,1支持 | |
| 81 | + 19、是否支持键盘左右方向键控制快进快退0不支持,1支持 | |
| 82 | + 20、是否支持键盘上下方向键控制音量0不支持,1支持 | |
| 83 | + 21、播放器返回js全部监听函数的等级,0-2,等级越高,返回的参数越多 | |
| 84 | + 0=不返回全部监听事件 | |
| 85 | + 1=返回监听,但不在控制台输出 | |
| 86 | + 2=返回监听,并且在控制台同步输出 | |
| 87 | + 3=返回全部监听事件,并且在参数前加上"播放器ID->",用于多播放器的监听 | |
| 88 | + 22、快进和快退的秒数 | |
| 89 | + 23、界面上图片元素加载失败重新加载次数 | |
| 90 | + 24、开启加载皮肤压缩文件包的加载进度提示 | |
| 91 | + 25、使用隐藏控制栏时显示简单进度条的功能,0是不使用,1是使用,2是只在普通状态下使用 | |
| 92 | + 26、控制栏隐藏设置(0不隐藏,1全屏时隐藏,2都隐藏 | |
| 93 | + 27、控制栏隐藏延时时间,即在鼠标离开控制栏后多少毫秒后隐藏控制栏 | |
| 94 | + 28、滚动文字广告左右滚动时是否采用无缝,默认0采用,1是不采用 | |
| 95 | + 29、0是正常状态,1是控制栏默认隐藏,播放状态下鼠标经过播放器显示控制栏,2是一直隐藏控制栏 | |
| 96 | + 30、在播放rtmp视频时暂停后点击播放是否采用重新链接的方式,这里一共分0-2三个等级 | |
| 97 | + 31、当采用网址形式(flashvars里s=1/2时)读取视频地址时是采用默认0=get方法,1=post方式 | |
| 98 | + 32、是否启用播放按钮和暂停按钮 | |
| 99 | + 33、是否启用中间暂停按钮 | |
| 100 | + 34、是否启用静音按钮 | |
| 101 | + 35、是否启用全屏按钮 | |
| 102 | + 36、是否启用进度调节栏,0不启用,1是启用,2是只能前进(向右拖动),3是只能后退,4是只能前进但能回到第一次拖动时的位置,5是看过的地方可以随意拖动, | |
| 103 | + 37、是否启用调节音量 | |
| 104 | + 38、计算时间的间隔,毫秒 | |
| 105 | + 39、前置logo至少显示的时间,单位:毫秒 | |
| 106 | + 40、前置视频广告的默认音量 | |
| 107 | + 41、当s=3/4时加载插件是否从压缩包里加载,0不是,1是 | |
| 108 | + 42、加载风格是否采用加密方式传送,该功能普通用户不能使用 | |
| 109 | + 43、在s=1/2时,调用地址里的地址是否是相对地址(相对于调用文件),0不是,1是 | |
| 110 | + */ | |
| 111 | + pm_bg: '0x000000,100,230,180', | |
| 112 | + /*播放器整体的背景配置,请注意,这里只是一个初始化的设置,如果需要真正的改动播放器的背景和最小宽高,需要在风格文件里找到相同的参数进行更改。 | |
| 113 | + 1、整体背景颜色 | |
| 114 | + 2、背景透明度 | |
| 115 | + 3、播放器最小宽度 | |
| 116 | + 4、播放器最小高度 | |
| 117 | + 这里只是初始化时的设置,最终加载完播放器后显示的效果需要在style.swf/style.xml里设置该参数 | |
| 118 | + */ | |
| 119 | + mylogo: 'logo.swf', | |
| 120 | + /* | |
| 121 | + 视频加载前显示的logo文件,不使用设置成null,即mylogo='null'; | |
| 122 | + */ | |
| 123 | + pm_mylogo: '1,1,-100,-55', | |
| 124 | + /* | |
| 125 | + 视频加载前显示的logo文件(mylogo参数的)的位置 | |
| 126 | + 本软件所有的四个参数控制位置的方式全部都是统一的意思,如下 | |
| 127 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 128 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 129 | + 3、水平偏移量,举例说明,如果第1个参数设置成0左对齐,第3个偏移量设置成10,就是离左边10个像素,第一个参数设置成2,偏移量如果设置的是正值就会移到播放器外面,只有设置成负值才行,设置成-1,按钮就会跑到播放器外面 | |
| 130 | + 4、垂直偏移量 | |
| 131 | + */ | |
| 132 | + logo: 'cklogo.png', | |
| 133 | + /* | |
| 134 | + 默认右上角一直显示的logo,不使用设置成null,即logo='null'; | |
| 135 | + */ | |
| 136 | + pm_logo: '2,0,-100,20', | |
| 137 | + /* | |
| 138 | + 播放器右上角的logo的位置 | |
| 139 | + 1、水平对齐方式,0是左,1是中,2是右 | |
| 140 | + 2、垂直对齐方式,0是上,1是中,2是下 | |
| 141 | + 3、水平偏移量 | |
| 142 | + 4、垂直偏移量 | |
| 143 | + 以下是播放器自带的二个插件 | |
| 144 | + */ | |
| 145 | + control_rel: 'related.swf,ckplayer/related.xml,0', | |
| 146 | + /* | |
| 147 | + 视频结束显示精彩视频的插件 | |
| 148 | + 1、视频播放结束后显示相关精彩视频的插件文件(注意,视频结束动作设置成3时(即var flashvars={e:3})有效), | |
| 149 | + 2、xml文件是调用精彩视频的示例文件,可以自定义文件类型(比如asp,php,jsp,.net只要输出的是xml格式就行),实际使用中一定要注意第二个参数的路径要正确 | |
| 150 | + 3、第三个参数是设置配置文件的编码,0是默认的utf-8,1是gbk2312 | |
| 151 | + */ | |
| 152 | + control_pv: 'Preview.swf,105,2000', | |
| 153 | + /* | |
| 154 | + 视频预览插件 | |
| 155 | + 1、插件文件名称(该插件和上面的精彩视频的插件都是放在风格压缩包里的) | |
| 156 | + 2、离进度栏的高(指的是插件的顶部离进度栏的位置) | |
| 157 | + 3、延迟时间(该处设置鼠标经过进度栏停顿多少毫秒后才显示插件) | |
| 158 | + 建议一定要设置延时时间,不然当鼠标在进度栏上划过的时候就会读取视频地址进行预览,很占资源 | |
| 159 | + */ | |
| 160 | + pm_repc: '', | |
| 161 | + /* | |
| 162 | + 视频地址替换符,该功能主要是用来做简单加密的功能,使用方法很简单,请注意,只针对f值是视频地址的时候有效,其它地方不能使用。具体的请查看http://www.ckplayer.com/manual.php?id=4#title_25 | |
| 163 | + */ | |
| 164 | + pm_spac: '|', | |
| 165 | + /* | |
| 166 | + 视频地址间隔符,这里主要是播放多段视频时使用普通调用方式或网址调用方式时使用的。默认使用|,如果视频地址里本身存在|的话需要另外设置一个间隔符,注意,即使只有一个视频也需要设置。另外在使用rtmp协议播放视频的时候,如果视频存在多级目录的话,这里要改成其它的符号,因为rtmp协议的视频地址多级的话也需要用到|隔开流地址和实例地址 | |
| 167 | + */ | |
| 168 | + pm_fpac: 'file->f', | |
| 169 | + /* | |
| 170 | + 该参数的功能是把自定义的flashvars里的变量替换成ckplayer里对应的变量,默认的参数的意思是把flashvars里的file值替换成f值,因为ckplayer里只认f值,多个替换之间用竖线隔开 | |
| 171 | + */ | |
| 172 | + pm_advtime: '2,0,-110,10,0,300,0', | |
| 173 | + /* | |
| 174 | + 前置广告倒计时文本位置,播放前置 广告时有个倒计时的显示文本框,这里是设置该文本框的位置和宽高,对齐方式的。一共7个参数,分别表示: | |
| 175 | + 1、水平对齐方式,0是左对齐,1是中间对齐,2是右对齐 | |
| 176 | + 2、垂直对齐方式,0是上对齐,1是中间对齐,2是低部对齐 | |
| 177 | + 3、水平位置偏移量 | |
| 178 | + 4、垂直位置偏移量 | |
| 179 | + 5、文字对齐方式,0是左对齐,1是中间对齐,2是右对齐,3是默认对齐 | |
| 180 | + 6、文本框宽席 | |
| 181 | + 7、文本框高度 | |
| 182 | + */ | |
| 183 | + pm_advstatus: '1,2,2,-200,-40', | |
| 184 | + /* | |
| 185 | + 前置广告静音按钮,静音按钮只在是视频广告时显示,当然也可以控制不显示 | |
| 186 | + 1、是否显示0不显示,1显示 | |
| 187 | + 2、水平对齐方式 | |
| 188 | + 3、垂直对齐方式 | |
| 189 | + 4、水平偏移量 | |
| 190 | + 5、垂直偏移量 | |
| 191 | + */ | |
| 192 | + pm_advjp: '1,1,2,2,-100,-40', | |
| 193 | + /* | |
| 194 | + 前置广告跳过广告按钮的位置 | |
| 195 | + 1、是否显示0不显示,1是显示 | |
| 196 | + 2、跳过按钮触发对象(值0/1,0是直接跳转,1是触发js:function ckadjump(){}) | |
| 197 | + 3、水平对齐方式 | |
| 198 | + 4、垂直对齐方式 | |
| 199 | + 5、水平偏移量 | |
| 200 | + 6、垂直偏移量 | |
| 201 | + */ | |
| 202 | + pm_padvc: '2,0,-13,-13', | |
| 203 | + /* | |
| 204 | + 暂停广告的关闭按钮的位置 | |
| 205 | + 1、水平对齐方式 | |
| 206 | + 2、垂直对齐方式 | |
| 207 | + 3、水平偏移量 | |
| 208 | + 4、垂直偏移量 | |
| 209 | + */ | |
| 210 | + pm_advms: '2,2,-46,-67', | |
| 211 | + /* | |
| 212 | + 滚动广告关闭按钮位置 | |
| 213 | + 1、水平对齐方式 | |
| 214 | + 2、垂直对齐方式 | |
| 215 | + 3、水平偏移量 | |
| 216 | + 4、垂直偏移量 | |
| 217 | + */ | |
| 218 | + pm_zip: '1,1,-20,-8,1,0,0', | |
| 219 | + /* | |
| 220 | + 加载皮肤压缩包时提示文字的位置 | |
| 221 | + 1、水平对齐方式,0是左对齐,1是中间对齐,2是右对齐 | |
| 222 | + 2、垂直对齐方式,0是上对齐,1是中间对齐,2是低部对齐 | |
| 223 | + 3、水平位置偏移量 | |
| 224 | + 4、垂直位置偏移量 | |
| 225 | + 5、文字对齐方式,0是左对齐,1是中间对齐,2是右对齐,3是默认对齐 | |
| 226 | + 6、文本框宽席 | |
| 227 | + 7、文本框高度 | |
| 228 | + */ | |
| 229 | + //pm_advmarquee: '1,2,50,-60,50,18,0,0x000000,50,0,20,1,15,2000', | |
| 230 | + pm_advmarquee: '1,2,50,-70,50,20,0,0x000000,50,0,20,1,30,2000', | |
| 231 | + /* | |
| 232 | + 滚动广告的控制,要使用的话需要在setup里的第9个参数设置成1 | |
| 233 | + 这里分二种情况,前六个参数是定位控制,第7个参数是设置定位方式(0:相对定位,1:绝对定位) | |
| 234 | + 第一种情况:第7个参数是0的时候,相对定位,就是播放器长宽变化的时候,控制栏也跟着变 | |
| 235 | + 1、默认1:中间对齐 | |
| 236 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 237 | + 3、离左边的距离 | |
| 238 | + 4、Y轴偏移量 | |
| 239 | + 5、离右边的距离 | |
| 240 | + 6、高度 | |
| 241 | + 7、定位方式 | |
| 242 | + 第二种情况:第7个参数是1的时候,绝对定位,就是播放器长宽变化的时候,控制栏不跟着变,这种方式一般使用在控制栏大小不变的时候 | |
| 243 | + 1、左中右对齐方式(0是左,1是中间,2是右) | |
| 244 | + 2、上中下对齐(0是上,1是中,2是下) | |
| 245 | + 3、x偏移量 | |
| 246 | + 4、y偏移量 | |
| 247 | + 5、宽度 | |
| 248 | + 6、高度 | |
| 249 | + 7、定位方式 | |
| 250 | + 以上是前7个参数的作用 | |
| 251 | + 8、是文字广告的背景色 | |
| 252 | + 9、置背景色的透明度 | |
| 253 | + 10、控制滚动方向,0是水平滚动(包括左右),1是上下滚动(包括向上和向下) | |
| 254 | + 11、移动的单位时长,即移动单位像素所需要的时长,毫秒 | |
| 255 | + 12、移动的单位像素,正数同左/上,负数向右/下 | |
| 256 | + 13、是行高,这个在设置向上或向下滚动的时候有用处 | |
| 257 | + 14、控制向上或向下滚动时每次停止的时间 | |
| 258 | + */ | |
| 259 | + pm_glowfilter:'1,0x01485d, 100, 6, 3, 10, 1, 0, 0', | |
| 260 | + /* | |
| 261 | + 滚动文字广告是否采用发光滤镜 | |
| 262 | + 1、是否使用发光滤镜,0是不采用,1是使用 | |
| 263 | + 2、(default = 0xFF0000) — 光晕颜色,采用十六进制格式 0xRRGGBB。 默认值为 0xFF0000 | |
| 264 | + 3、(default = 100) — 颜色的 Alpha 透明度值。 有效值为 0 到 100。 例如,25 设置透明度为 25% | |
| 265 | + 4、(default = 6.0) — 水平模糊量。 有效值为 0 到 255(浮点)。 2 的乘方值(如 2、4、8、16 和 32)经过优化,呈现速度比其它值更快 | |
| 266 | + 5、(default = 6.0) — 垂直模糊量。 有效值为 0 到 255(浮点)。 2 的乘方值(如 2、4、8、16 和 32)经过优化,呈现速度比其它值更快 | |
| 267 | + 6、(default = 2) —光晕的强度。 该值越高,光晕的颜色越深,而且发光与背景之间的对比度也越强。 有效值为 0 到 255 | |
| 268 | + 7、(default = 1) — 应用滤镜的次数 | |
| 269 | + 8、(default = 0) — 指定发光是否为内侧发光。 值 1 指定发光是内侧发光。 值 0 指定发光是外侧发光(对象外缘周围的发光) | |
| 270 | + 9、(default = 0) — 指定对象是否具有挖空效果。 值为 1 将使对象的填充变为透明,并显示文档的背景颜色 | |
| 271 | + */ | |
| 272 | + advmarquee: escape('{a href="http://www.ckplayer.com"}{font color="#FFFFFF" size="12" face="Microsoft YaHei"}这里可以放文字广告,播放器默认使用这里设置的广告内容,如果不想在这里使用可以清空这里的内容,如果想在页面中实时定义滚动文字广告内容,可以清空这里的内容,然后在页面中设置广告函数。{/font}{/a}'), | |
| 273 | + /* | |
| 274 | + 该处是滚动文字广告的内容,如果不想在这里设置,就把这里清空并且在页面中使用js的函数定义function ckmarqueeadv(){return '广告内容'} | |
| 275 | + */ | |
| 276 | + mainfuntion:'', | |
| 277 | + /* | |
| 278 | + 当flashvars里s=3/4时,调用的函数包名称,默认为空,调用时间轴上的函数setAppObj | |
| 279 | + */ | |
| 280 | + flashplayer:'', | |
| 281 | + /* | |
| 282 | + 当flashvars里的s=3/4时,也可以把swf文件放在这里 | |
| 283 | + */ | |
| 284 | + calljs:'ckplayer_status,ckadjump,playerstop,ckmarqueeadv', | |
| 285 | + /* | |
| 286 | + 1、全局监听返回结果的函数 | |
| 287 | + 2、跳过广告的函数 | |
| 288 | + 3、播放结束时调用的js函数 | |
| 289 | + 4、加载滚动文字广告的函 | |
| 290 | + */ | |
| 291 | + myweb: escape(''), | |
| 292 | + /* | |
| 293 | + ------------------------------------------------------------------------------------------------------------------ | |
| 294 | + 以下内容部份是和插件相关的配置,请注意,自定义插件以及其配置的命名方式要注意,不要和系统的相重复,不然就会替换掉系统的相关设置,删除相关插件的话也可以同时删除相关的配置 | |
| 295 | + ------------------------------------------------------------------------------------------------------------------ | |
| 296 | + 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 | |
| 297 | + ------------------------------------------------------------------------------------------------------------------ | |
| 298 | + */ | |
| 299 | + cpt_lights: '1', | |
| 300 | + /* | |
| 301 | + 该处定义是否使用开关灯,使用开灯效果时调用页面的js函数function closelights(){},关灯调用 function closelights(){}; | |
| 302 | + */ | |
| 303 | + cpt_share: 'ckplayer/share.xml', | |
| 304 | + /* | |
| 305 | + 分享插件调用的配置文件地址,此设设置成空,则不启用分享按钮 | |
| 306 | + 调用插件开始 | |
| 307 | + */ | |
| 308 | + cpt_list: ckcpt() | |
| 309 | + /* | |
| 310 | + ckcpt()是本文件最上方的定义插件的函数 | |
| 311 | + */ | |
| 312 | + } | |
| 313 | + return ck; | |
| 314 | +} | |
| 315 | +/* | |
| 316 | +html5部分开始 | |
| 317 | +以下代码是支持html5的,如果你不需要,可以删除。 | |
| 318 | +html5代码块的代码可以随意更改以适合你的应用,欢迎到论坛交流更改心得 | |
| 319 | +*/ | |
| 320 | +(function() { | |
| 321 | + var CKobject = { | |
| 322 | + _K_: function(d){return document.getElementById(d);}, | |
| 323 | + _T_: false, | |
| 324 | + _M_: false, | |
| 325 | + _G_: false, | |
| 326 | + _Y_: false, | |
| 327 | + _I_: null, | |
| 328 | + _J_: 0, | |
| 329 | + _O_: {}, | |
| 330 | + uaMatch:function(u,rMsie,rFirefox,rOpera,rChrome,rSafari,rSafari2,mozilla,mobile){ | |
| 331 | + var match = rMsie.exec(u); | |
| 332 | + if (match != null) { | |
| 333 | + return { | |
| 334 | + b: 'IE', | |
| 335 | + v: match[2] || '0' | |
| 336 | + } | |
| 337 | + } | |
| 338 | + match = rFirefox.exec(u); | |
| 339 | + if (match != null) { | |
| 340 | + return { | |
| 341 | + b: match[1] || '', | |
| 342 | + v: match[2] || '0' | |
| 343 | + } | |
| 344 | + } | |
| 345 | + match = rOpera.exec(u); | |
| 346 | + if (match != null) { | |
| 347 | + return { | |
| 348 | + b: match[1] || '', | |
| 349 | + v: match[2] || '0' | |
| 350 | + } | |
| 351 | + } | |
| 352 | + match = rChrome.exec(u); | |
| 353 | + if (match != null) { | |
| 354 | + return { | |
| 355 | + b: match[1] || '', | |
| 356 | + v: match[2] || '0' | |
| 357 | + } | |
| 358 | + } | |
| 359 | + match = rSafari.exec(u); | |
| 360 | + if (match != null) { | |
| 361 | + return { | |
| 362 | + b: match[2] || '', | |
| 363 | + v: match[1] || '0' | |
| 364 | + } | |
| 365 | + } | |
| 366 | + match = rSafari2.exec(u); | |
| 367 | + if (match != null) { | |
| 368 | + return { | |
| 369 | + b: match[1] || '', | |
| 370 | + v: match[2] || '0' | |
| 371 | + } | |
| 372 | + } | |
| 373 | + match = mozilla.exec(u); | |
| 374 | + if (match != null) { | |
| 375 | + return { | |
| 376 | + b: match[1] || '', | |
| 377 | + v: match[2] || '0' | |
| 378 | + } | |
| 379 | + } | |
| 380 | + match = mobile.exec(u); | |
| 381 | + if (match != null) { | |
| 382 | + return { | |
| 383 | + b: match[1] || '', | |
| 384 | + v: match[2] || '0' | |
| 385 | + } | |
| 386 | + } | |
| 387 | + else { | |
| 388 | + return { | |
| 389 | + b: 'unknown', | |
| 390 | + v: '0' | |
| 391 | + } | |
| 392 | + } | |
| 393 | + }, | |
| 394 | + browser: function() { | |
| 395 | + var u = navigator.userAgent, | |
| 396 | + rMsie = /(msie\s|trident.*rv:)([\w.]+)/, | |
| 397 | + rFirefox = /(firefox)\/([\w.]+)/, | |
| 398 | + rOpera = /(opera).+version\/([\w.]+)/, | |
| 399 | + rChrome = /(chrome)\/([\w.]+)/, | |
| 400 | + rSafari = /version\/([\w.]+).*(safari)/, | |
| 401 | + rSafari2 = /(safari)\/([\w.]+)/, | |
| 402 | + mozilla = /(mozilla)\/([\w.]+)/, | |
| 403 | + mobile = /(mobile)\/([\w.]+)/; | |
| 404 | + var c = u.toLowerCase(); | |
| 405 | + var d = this.uaMatch(c,rMsie,rFirefox,rOpera,rChrome,rSafari,rSafari2,mozilla,mobile); | |
| 406 | + if (d.b) { | |
| 407 | + b = d.b; | |
| 408 | + v = d.v; | |
| 409 | + } | |
| 410 | + return {B: b, V: v}; | |
| 411 | + }, | |
| 412 | + Platform: function() { | |
| 413 | + var w = ''; | |
| 414 | + var u = navigator.userAgent, | |
| 415 | + app = navigator.appVersion; | |
| 416 | + var b = { | |
| 417 | + iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, | |
| 418 | + iPad: u.indexOf('iPad') > -1, | |
| 419 | + ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), | |
| 420 | + android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, | |
| 421 | + webKit: u.indexOf('AppleWebKit') > -1, | |
| 422 | + trident: u.indexOf('Trident') > -1, | |
| 423 | + gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, | |
| 424 | + presto: u.indexOf('Presto') > -1, | |
| 425 | + mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), | |
| 426 | + webApp: u.indexOf('Safari') == -1 | |
| 427 | + }; | |
| 428 | + for (var k in b) { | |
| 429 | + if (b[k]) { | |
| 430 | + w = k; | |
| 431 | + break; | |
| 432 | + } | |
| 433 | + } | |
| 434 | + return w; | |
| 435 | + }, | |
| 436 | + isHTML5:function(){ | |
| 437 | + return !!document.createElement('video').canPlayType; | |
| 438 | + }, | |
| 439 | + getType:function(){ | |
| 440 | + return this._T_; | |
| 441 | + }, | |
| 442 | + getVideo: function() { | |
| 443 | + var v = ''; | |
| 444 | + var s = this._E_['v']; | |
| 445 | + if (s && s.length>1) { | |
| 446 | + for (var i = 0; i < s.length; i++) { | |
| 447 | + var a = s[i].split('->'); | |
| 448 | + if (a.length >= 1 && a[0] != '') { | |
| 449 | + v += '<source src="' + a[0] + '"'; | |
| 450 | + } | |
| 451 | + if (a.length >= 2 && a[1] != '') { | |
| 452 | + v += ' type="' + a[1] + '"'; | |
| 453 | + } | |
| 454 | + v += '>'; | |
| 455 | + } | |
| 456 | + } | |
| 457 | + return v; | |
| 458 | + }, | |
| 459 | + getVars: function(k) { | |
| 460 | + var o=this._A_; | |
| 461 | + if (typeof(o) == 'undefined') { | |
| 462 | + return null; | |
| 463 | + } | |
| 464 | + if (k in o) { | |
| 465 | + return o[k]; | |
| 466 | + } else { | |
| 467 | + return null; | |
| 468 | + } | |
| 469 | + }, | |
| 470 | + getParams: function() { | |
| 471 | + var p = ''; | |
| 472 | + if (this._A_) { | |
| 473 | + if (parseInt(this.getVars('p')) == 1) { | |
| 474 | + p += ' autoplay="autoplay"'; | |
| 475 | + } | |
| 476 | + if (parseInt(this.getVars('e')) == 1) { | |
| 477 | + p += ' loop="loop"'; | |
| 478 | + } | |
| 479 | + if (parseInt(this.getVars('p')) == 2) { | |
| 480 | + p += ' preload="metadata"'; | |
| 481 | + } | |
| 482 | + if (this.getVars('i')) { | |
| 483 | + p += ' poster="' + this.getVars('i') + '"'; | |
| 484 | + } | |
| 485 | + } | |
| 486 | + return p; | |
| 487 | + }, | |
| 488 | + getpath: function(z) { | |
| 489 | + var f='CDEFGHIJKLMNOPQRSTUVWXYZcdefghijklmnopqrstuvwxyz'; | |
| 490 | + var w=z.substr(0,1); | |
| 491 | + if(f.indexOf(w)>-1 && (z.substr(0,4)==w+'://' || z.substr(0,4)==w+':\\')){ | |
| 492 | + return z; | |
| 493 | + } | |
| 494 | + var d = unescape(window.location.href).replace('file:///', ''); | |
| 495 | + var k = parseInt(document.location.port); | |
| 496 | + var u = document.location.protocol + '//' + document.location.hostname; | |
| 497 | + var l = '', | |
| 498 | + e = '', | |
| 499 | + t = ''; | |
| 500 | + var s = 0; | |
| 501 | + var r = unescape(z).split('//'); | |
| 502 | + if (r.length > 0) { | |
| 503 | + l = r[0] + '//' | |
| 504 | + } | |
| 505 | + var h = 'http|https|ftp|rtsp|mms|ftp|rtmp|file'; | |
| 506 | + var a = h.split('|'); | |
| 507 | + if (k != 80 && k) { | |
| 508 | + u += ':' + k; | |
| 509 | + } | |
| 510 | + for (i = 0; i < a.length; i++) { | |
| 511 | + if ((a[i] + '://') == l) { | |
| 512 | + s = 1; | |
| 513 | + break; | |
| 514 | + } | |
| 515 | + } | |
| 516 | + if (s == 0) { | |
| 517 | + if (z.substr(0, 1) == '/') { | |
| 518 | + t = u + z; | |
| 519 | + } else { | |
| 520 | + e = d.substring(0, d.lastIndexOf('/') + 1).replace('\\', '/'); | |
| 521 | + var w = z.replace('../', './'); | |
| 522 | + var u = w.split('./'); | |
| 523 | + var n = u.length; | |
| 524 | + var r = w.replace('./', ''); | |
| 525 | + var q = e.split('/'); | |
| 526 | + var j = q.length - n; | |
| 527 | + for (i = 0; i < j; i++) { | |
| 528 | + t += q[i] + '/'; | |
| 529 | + } | |
| 530 | + t += r; | |
| 531 | + } | |
| 532 | + } else { | |
| 533 | + t = z; | |
| 534 | + } | |
| 535 | + return t; | |
| 536 | + }, | |
| 537 | + getXhr: function() { | |
| 538 | + var x; | |
| 539 | + try { | |
| 540 | + x = new ActiveXObject('Msxml2.XMLHTTP'); | |
| 541 | + } catch(e) { | |
| 542 | + try { | |
| 543 | + x = new ActiveXObject('Microsoft.XMLHTTP'); | |
| 544 | + } catch(e) { | |
| 545 | + x = false; | |
| 546 | + } | |
| 547 | + } | |
| 548 | + if (!x && typeof XMLHttpRequest != 'undefined') { | |
| 549 | + x = new XMLHttpRequest(); | |
| 550 | + } | |
| 551 | + return x; | |
| 552 | + }, | |
| 553 | + getX: function(){ | |
| 554 | + var f='ckstyle()'; | |
| 555 | + if (this.getVars('x') && parseInt(this.getVars('c'))!=1 ) { | |
| 556 | + f=this.getVars('x')+'()'; | |
| 557 | + } | |
| 558 | + try { | |
| 559 | + if (typeof(eval(f)) == 'object') { | |
| 560 | + this._X_ = eval(f); | |
| 561 | + } | |
| 562 | + } catch(e) { | |
| 563 | + try { | |
| 564 | + if (typeof(eval(ckstyle)) == 'object') { | |
| 565 | + this._X_ = ckstyle(); | |
| 566 | + } | |
| 567 | + } catch(e) { | |
| 568 | + this._X_ = ckstyle(); | |
| 569 | + } | |
| 570 | + } | |
| 571 | + }, | |
| 572 | + getSn: function(s, n) { | |
| 573 | + if(n>=0){ | |
| 574 | + return this._X_[s].split(',')[n]; | |
| 575 | + } | |
| 576 | + else{ | |
| 577 | + return this._X_[s]; | |
| 578 | + } | |
| 579 | + }, | |
| 580 | + getUrl: function(L, B) { | |
| 581 | + var C = this; | |
| 582 | + var b = ['get', 'utf-8']; | |
| 583 | + if (L && L.length == 2) { | |
| 584 | + var a = L[0]; | |
| 585 | + var c = L[1].split('/'); | |
| 586 | + if (c.length >= 2) { | |
| 587 | + b[0] = c[1]; | |
| 588 | + } | |
| 589 | + if (c.length >= 3) { | |
| 590 | + b[1] = c[2]; | |
| 591 | + } | |
| 592 | + this.ajax(b[0], b[1], a, | |
| 593 | + function(s) { | |
| 594 | + if (s && s != 'error') { | |
| 595 | + var d = '', | |
| 596 | + e = s; | |
| 597 | + if (s.indexOf('}') > -1) { | |
| 598 | + var f = s.split('}'); | |
| 599 | + for (var i = 0; i < f.length - 1; i++) { | |
| 600 | + d += f[i] + '}'; | |
| 601 | + var h = f[i].replace('{', '').split('->'); | |
| 602 | + if (h.length == 2) { | |
| 603 | + C._A_[h[0]] = h[1]; | |
| 604 | + } | |
| 605 | + } | |
| 606 | + e = f[f.length - 1]; | |
| 607 | + } | |
| 608 | + C._E_['v'] = e.split(','); | |
| 609 | + if (B) { | |
| 610 | + C.showHtml5(); | |
| 611 | + } else { | |
| 612 | + C.changeParams(d); | |
| 613 | + C.newAdr(); | |
| 614 | + } | |
| 615 | + } | |
| 616 | + }); | |
| 617 | + } | |
| 618 | + }, | |
| 619 | + getflashvars: function(s) { | |
| 620 | + var v = '', | |
| 621 | + i = 0; | |
| 622 | + if (s) { | |
| 623 | + for (var k in s) { | |
| 624 | + if (i > 0) { | |
| 625 | + v += '&'; | |
| 626 | + } | |
| 627 | + if (k == 'f' && s[k] && ! this.getSn('pm_repc',-1)) { | |
| 628 | + s[k] = this.getpath(s[k]); | |
| 629 | + if (s[k].indexOf('&') > -1) { | |
| 630 | + s[k] = encodeURIComponent(s[k]); | |
| 631 | + } | |
| 632 | + } | |
| 633 | + if (k == 'y' && s[k]) { | |
| 634 | + s[k] = this.getpath(s[k]); | |
| 635 | + } | |
| 636 | + v += k + '=' + s[k]; | |
| 637 | + i++; | |
| 638 | + } | |
| 639 | + } | |
| 640 | + return v; | |
| 641 | + }, | |
| 642 | + getparam: function(s) { | |
| 643 | + var w = '', | |
| 644 | + v = '', | |
| 645 | + o = { | |
| 646 | + allowScriptAccess: 'always', | |
| 647 | + allowFullScreen: true, | |
| 648 | + quality: 'high', | |
| 649 | + bgcolor: '#000' | |
| 650 | + }; | |
| 651 | + if (s) { | |
| 652 | + for (var k in s) { | |
| 653 | + o[k] = s[k]; | |
| 654 | + } | |
| 655 | + } | |
| 656 | + for (var e in o) { | |
| 657 | + w += e + '="' + o[e] + '" '; | |
| 658 | + v += '<param name="' + e + '" value="' + o[e] + '" />'; | |
| 659 | + } | |
| 660 | + w = w.replace('movie=', 'src='); | |
| 661 | + return { | |
| 662 | + w: w, | |
| 663 | + v: v | |
| 664 | + }; | |
| 665 | + }, | |
| 666 | + getObjectById: function(s) { | |
| 667 | + var C = this; | |
| 668 | + if (C._T_) { | |
| 669 | + C._V_=C._K_(s) | |
| 670 | + return C ; | |
| 671 | + } | |
| 672 | + var x = null, | |
| 673 | + y = C._K_(s), | |
| 674 | + r = 'embed'; | |
| 675 | + if (y && y.nodeName == 'OBJECT') { | |
| 676 | + if (typeof y.SetVariable != 'undefined') { | |
| 677 | + x= y; | |
| 678 | + } else { | |
| 679 | + var z = y.getElementsByTagName(r)[0]; | |
| 680 | + if (z) { | |
| 681 | + x= z; | |
| 682 | + } | |
| 683 | + } | |
| 684 | + } | |
| 685 | + return x; | |
| 686 | + }, | |
| 687 | + ajax: function(b, u, s, f) { | |
| 688 | + var x = this.getXhr(); | |
| 689 | + var a = [], | |
| 690 | + m = ''; | |
| 691 | + if (b == 'get') { | |
| 692 | + if (s.indexOf('?') > -1) { | |
| 693 | + m = s + '&t=' + new Date().getTime(); | |
| 694 | + } else { | |
| 695 | + m = s + '?t=' + new Date().getTime(); | |
| 696 | + } | |
| 697 | + x.open('get', m); | |
| 698 | + } else { | |
| 699 | + a = s.split('?'); | |
| 700 | + s = a[0], | |
| 701 | + m = a[1]; | |
| 702 | + x.open('post', s, true); | |
| 703 | + } | |
| 704 | + x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); | |
| 705 | + x.setRequestHeader('charset', u); | |
| 706 | + if (b == 'post') { | |
| 707 | + x.send(m); | |
| 708 | + } else { | |
| 709 | + x.send(null); | |
| 710 | + } | |
| 711 | + x.onreadystatechange = function() { | |
| 712 | + if (x.readyState == 4) { | |
| 713 | + var g = x.responseText; | |
| 714 | + if (g != '') { | |
| 715 | + f(g); | |
| 716 | + } else { | |
| 717 | + f(null); | |
| 718 | + } | |
| 719 | + } | |
| 720 | + } | |
| 721 | + }, | |
| 722 | + addListener: function(e, f) { | |
| 723 | + var o=this._V_; | |
| 724 | + switch(e){ | |
| 725 | + case 'time': | |
| 726 | + e='timeupdate'; | |
| 727 | + this.AT=f; | |
| 728 | + f=this.addListenerTime; | |
| 729 | + break; | |
| 730 | + case 'totaltime': | |
| 731 | + this.ATAll=f; | |
| 732 | + return; | |
| 733 | + break; | |
| 734 | + default: | |
| 735 | + break; | |
| 736 | + } | |
| 737 | + //console.log(typeof(f)); | |
| 738 | + if(typeof(f)=='string'){ | |
| 739 | + f=eval(f); | |
| 740 | + } | |
| 741 | + if (o.addEventListener) { | |
| 742 | + try{ | |
| 743 | + o.addEventListener(e, f, false); | |
| 744 | + } | |
| 745 | + catch (e) { | |
| 746 | + this.getNot(); | |
| 747 | + } | |
| 748 | + } | |
| 749 | + else if (o.attachEvent) { | |
| 750 | + try{ | |
| 751 | + o.attachEvent('on' + e, f); | |
| 752 | + } | |
| 753 | + catch(e){ | |
| 754 | + this.getNot(); | |
| 755 | + } | |
| 756 | + } | |
| 757 | + else { | |
| 758 | + o['on' + e] = f; | |
| 759 | + } | |
| 760 | + }, | |
| 761 | + removeListener: function( e, f) { | |
| 762 | + var o=this._V_; | |
| 763 | + switch(e){ | |
| 764 | + case 'time': | |
| 765 | + e='timeupdate'; | |
| 766 | + this.AT=null; | |
| 767 | + break; | |
| 768 | + case 'totaltime': | |
| 769 | + this.ATAll=null; | |
| 770 | + return; | |
| 771 | + break; | |
| 772 | + default: | |
| 773 | + break; | |
| 774 | + } | |
| 775 | + if(typeof(f)=='string'){ | |
| 776 | + f=eval(f); | |
| 777 | + } | |
| 778 | + if (o.removeEventListener) { | |
| 779 | + try{ | |
| 780 | + o.removeEventListener(e, f, false); | |
| 781 | + } | |
| 782 | + catch(e){ | |
| 783 | + this.getNot(); | |
| 784 | + } | |
| 785 | + } | |
| 786 | + else if (o.detachEvent) { | |
| 787 | + try{ | |
| 788 | + o.detachEvent('on' + e, f); | |
| 789 | + } | |
| 790 | + catch(e){ | |
| 791 | + this.getNot(); | |
| 792 | + } | |
| 793 | + } | |
| 794 | + else { | |
| 795 | + o['on' + e] = null; | |
| 796 | + } | |
| 797 | + }, | |
| 798 | + Flash: function() { | |
| 799 | + var f = false,v = 0; | |
| 800 | + if (document.all || this.browser()['B'].toLowerCase().indexOf('ie')>-1) { | |
| 801 | + try { | |
| 802 | + var s = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | |
| 803 | + f = true; | |
| 804 | + var z = s.GetVariable('$version'); | |
| 805 | + v = parseInt(z.split(' ')[1].split(',')[0]); | |
| 806 | + } catch(e) {} | |
| 807 | + } else { | |
| 808 | + if (navigator.plugins && navigator.plugins.length > 0) { | |
| 809 | + var s = navigator.plugins['Shockwave Flash']; | |
| 810 | + if (s) { | |
| 811 | + f = true; | |
| 812 | + var w = s.description.split(' '); | |
| 813 | + for (var i = 0; i < w.length; ++i) { | |
| 814 | + if (isNaN(parseInt(w[i]))) continue; | |
| 815 | + v = parseInt(w[i]); | |
| 816 | + } | |
| 817 | + } | |
| 818 | + } | |
| 819 | + } | |
| 820 | + return { | |
| 821 | + f: f, | |
| 822 | + v: v | |
| 823 | + }; | |
| 824 | + }, | |
| 825 | + embed:function(f,d,i,w,h,b,v,e,p,j){ | |
| 826 | + var s=['all']; | |
| 827 | + if(b){ | |
| 828 | + if(this.isHTML5()){ | |
| 829 | + this.embedHTML5(d,i,w,h,e,v,s,j); | |
| 830 | + } | |
| 831 | + else{ | |
| 832 | + this.embedSWF(f,d,i,w,h,v,p); | |
| 833 | + } | |
| 834 | + } | |
| 835 | + else{ | |
| 836 | + if(this.Flash()['f'] && parseInt(this.Flash()['v'])>10){ | |
| 837 | + this.embedSWF(f,d,i,w,h,v,p); | |
| 838 | + } | |
| 839 | + else if(this.isHTML5()){ | |
| 840 | + this.embedHTML5(d,i,w,h,e,v,s,j); | |
| 841 | + } | |
| 842 | + else{ | |
| 843 | + this.embedSWF(f,d,i,w,h,v,p); | |
| 844 | + } | |
| 845 | + } | |
| 846 | + }, | |
| 847 | + embedSWF: function(C, D, N, W, H, V, P) { | |
| 848 | + if (!N) { | |
| 849 | + N = 'ckplayer_a1' | |
| 850 | + } | |
| 851 | + if (!P) { | |
| 852 | + P = { | |
| 853 | + bgcolor: '#FFF', | |
| 854 | + allowFullScreen: true, | |
| 855 | + allowScriptAccess: 'always', | |
| 856 | + wmode:'transparent' | |
| 857 | + }; | |
| 858 | + } | |
| 859 | + this._A_=V; | |
| 860 | + this.getX(); | |
| 861 | + var u = 'undefined', | |
| 862 | + g = false, | |
| 863 | + j = document, | |
| 864 | + r = 'http://www.macromedia.com/go/getflashplayer', | |
| 865 | + t = '<a href="' + r + '" target="_blank">请点击此处下载安装最新的flash插件</a>', | |
| 866 | + error = { | |
| 867 | + w: '您的网页不符合w3c标准,无法显示播放器', | |
| 868 | + f: '您没有安装flash插件,无法播放视频,' + t, | |
| 869 | + v: '您的flash插件版本过低,无法播放视频,' + t | |
| 870 | + }, | |
| 871 | + w3c = typeof j.getElementById != u && typeof j.getElementsByTagName != u && typeof j.createElement != u, | |
| 872 | + i = 'id="' + N + '" name="' + N + '" ', | |
| 873 | + s = '', | |
| 874 | + l = ''; | |
| 875 | + P['movie'] = C; | |
| 876 | + P['flashvars'] = this.getflashvars(V); | |
| 877 | + if(W==-1){ | |
| 878 | + d=true; | |
| 879 | + this._K_(D).style.width='100%'; | |
| 880 | + W='100%'; | |
| 881 | + } | |
| 882 | + s += '<object pluginspage="http://www.macromedia.com/go/getflashplayer" '; | |
| 883 | + s += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '; | |
| 884 | + s += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=11,3,0,0" '; | |
| 885 | + s += 'width="' + W + '" '; | |
| 886 | + s += 'height="' + H + '" '; | |
| 887 | + s += i; | |
| 888 | + s += 'align="middle">'; | |
| 889 | + s += this.getparam(P)['v']; | |
| 890 | + s += '<embed '; | |
| 891 | + s += this.getparam(P)['w']; | |
| 892 | + s += ' width="' + W + '" height="' + H + '" name="' + N + '" id="' + N + '" align="middle" ' + i; | |
| 893 | + s += 'type="application/x-shockwave-flash" pluginspage="' + r + '" />'; | |
| 894 | + s += '</object>'; | |
| 895 | + if (!w3c) { | |
| 896 | + l = error['w']; | |
| 897 | + g = true; | |
| 898 | + } else { | |
| 899 | + if (!this.Flash()['f']) { | |
| 900 | + l = error['f']; | |
| 901 | + g = true; | |
| 902 | + } else { | |
| 903 | + if (this.Flash()['v'] < 11) { | |
| 904 | + l = error['v']; | |
| 905 | + g = true; | |
| 906 | + } else { | |
| 907 | + l = s; | |
| 908 | + this._T_=false; | |
| 909 | + } | |
| 910 | + } | |
| 911 | + } | |
| 912 | + if (l) { | |
| 913 | + this._K_(D).innerHTML = l; | |
| 914 | + } | |
| 915 | + if (g){ | |
| 916 | + this._K_(D).style.color = '#0066cc'; | |
| 917 | + this._K_(D).style.lineHeight = this._K_(D).style.height; | |
| 918 | + this._K_(D).style.textAlign= 'center'; | |
| 919 | + } | |
| 920 | + }, | |
| 921 | + embedHTML5: function(C, P, W, H, V, A, S, J) { | |
| 922 | + this._E_ = { | |
| 923 | + c: C, | |
| 924 | + p: P, | |
| 925 | + w: W, | |
| 926 | + h: H, | |
| 927 | + v: V, | |
| 928 | + s: S, | |
| 929 | + j: J==undefined || J?true:false | |
| 930 | + }; | |
| 931 | + this._A_ = A; | |
| 932 | + this.getX(); | |
| 933 | + b = this.browser()['B'], | |
| 934 | + v = this.browser()['V'], | |
| 935 | + x = v.split('.'), | |
| 936 | + t = x[0], | |
| 937 | + m = b + v, | |
| 938 | + n = b + t, | |
| 939 | + w = '', | |
| 940 | + s = false, | |
| 941 | + f = this.Flash()['f'], | |
| 942 | + a = false; | |
| 943 | + if (!S) { | |
| 944 | + S = ['iPad', 'iPhone', 'ios']; | |
| 945 | + } | |
| 946 | + for (var i = 0; i < S.length; i++) { | |
| 947 | + w = S[i]; | |
| 948 | + if (w.toLowerCase() == 'all') { | |
| 949 | + s = true; | |
| 950 | + break; | |
| 951 | + } | |
| 952 | + if (w.toLowerCase() == 'all+false' && !f) { | |
| 953 | + s = true; | |
| 954 | + break; | |
| 955 | + } | |
| 956 | + if (w.indexOf('+') > -1) { | |
| 957 | + w = w.split('+')[0]; | |
| 958 | + a = true; | |
| 959 | + } else { | |
| 960 | + a = false; | |
| 961 | + } | |
| 962 | + if (this.Platform() == w || m == w || n == w || b == w) { | |
| 963 | + if (a) { | |
| 964 | + if (!f) { | |
| 965 | + s = true; | |
| 966 | + break; | |
| 967 | + } | |
| 968 | + }else { | |
| 969 | + s = true; | |
| 970 | + break; | |
| 971 | + } | |
| 972 | + } | |
| 973 | + } | |
| 974 | + if (s) { | |
| 975 | + if (V) { | |
| 976 | + var l = V[0].split('->'); | |
| 977 | + if (l && l.length == 2 && l[1].indexOf('ajax') > -1) { | |
| 978 | + this.getUrl(l, true); | |
| 979 | + return; | |
| 980 | + } | |
| 981 | + } | |
| 982 | + this.showHtml5(); | |
| 983 | + } | |
| 984 | + }, | |
| 985 | + status: function() { | |
| 986 | + this._H_ = parseInt(this.getSn('setup', 20)); | |
| 987 | + var f='ckplayer_status'; | |
| 988 | + if (this.getSn('calljs', 0)!='') { | |
| 989 | + f=this.getSn('calljs', 0); | |
| 990 | + } | |
| 991 | + try { | |
| 992 | + if (typeof(eval(f)) == 'function') { | |
| 993 | + this._L_=eval(f); | |
| 994 | + this._M_=true; | |
| 995 | + return true; | |
| 996 | + } | |
| 997 | + } catch(e) { | |
| 998 | + try { | |
| 999 | + if (typeof(eval(ckplayer_status)) == 'function') { | |
| 1000 | + this._L_=ckplayer_status; | |
| 1001 | + this._M_=true; | |
| 1002 | + return true; | |
| 1003 | + } | |
| 1004 | + } catch(e) { | |
| 1005 | + return false; | |
| 1006 | + } | |
| 1007 | + } | |
| 1008 | + return false; | |
| 1009 | + }, | |
| 1010 | + showHtml5: function() { | |
| 1011 | + var C = this; | |
| 1012 | + var p = C._E_['p'], | |
| 1013 | + a = C._E_['v'], | |
| 1014 | + c = C._E_['c'], | |
| 1015 | + j = '', | |
| 1016 | + b = false; | |
| 1017 | + var s = this._E_['v']; | |
| 1018 | + var w=C._E_['w'],h=C._E_['h']; | |
| 1019 | + var d=false; | |
| 1020 | + var r=''; | |
| 1021 | + if(s.length==1){ | |
| 1022 | + r=' src="'+s[0].split('->')[0]+'"'; | |
| 1023 | + } | |
| 1024 | + if(w==-1){ | |
| 1025 | + d=true; | |
| 1026 | + C._K_(c).style.width='100%'; | |
| 1027 | + w='100%'; | |
| 1028 | + } | |
| 1029 | + if(w.toString().indexOf('%')>-1){ | |
| 1030 | + w='100%'; | |
| 1031 | + } | |
| 1032 | + if(h.toString().indexOf('%')>-1){ | |
| 1033 | + h='100%'; | |
| 1034 | + } | |
| 1035 | + if(C._E_['j']){ | |
| 1036 | + j=' controls="controls"'; | |
| 1037 | + } | |
| 1038 | + var v = '<video'+j+r+' id="' + p + '" width="' + w + '" height="' + h + '"' + C.getParams() + ' webkit-playsinline>' + C.getVideo() + '</video>'; | |
| 1039 | + C._K_(c).innerHTML = v; | |
| 1040 | + C._K_(c).style.backgroundColor = '#000'; | |
| 1041 | + C._V_ = C._K_(p); | |
| 1042 | + if(!d){ | |
| 1043 | + 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'; | |
| 1044 | + 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'; | |
| 1045 | + } | |
| 1046 | + C._P_ = false; | |
| 1047 | + C._T_ = true; | |
| 1048 | + if (C.getVars('loaded')!='') { | |
| 1049 | + var f=C.getVars('loaded')+'()'; | |
| 1050 | + try { | |
| 1051 | + if (typeof(eval(f)) == 'function') { | |
| 1052 | + eval(f); | |
| 1053 | + } | |
| 1054 | + } catch(e) { | |
| 1055 | + try { | |
| 1056 | + if (typeof(eval(loadedHandler)) == 'function') { | |
| 1057 | + loadedHandler(); | |
| 1058 | + } | |
| 1059 | + } catch(e) { | |
| 1060 | + } | |
| 1061 | + } | |
| 1062 | + } | |
| 1063 | + C.status(); | |
| 1064 | + C.addListener('play', C.playHandler); | |
| 1065 | + C.addListener('pause', C.playHandler); | |
| 1066 | + C.addListener('error', C.errorHandler); | |
| 1067 | + C.addListener('emptied', C.errorHandler); | |
| 1068 | + C.addListener('loadedmetadata', C.loadedMetadataHandler); | |
| 1069 | + C.addListener('ended', C.endedHandler); | |
| 1070 | + C.addListener('volumechange', C.volumeChangeHandler); | |
| 1071 | + if((C.getVars('m')!='' && C.getVars('m')!=null) || parseInt( C.getSn('setup', 0))>0){ | |
| 1072 | + C._K_(c).style.cursor='pointer'; | |
| 1073 | + } | |
| 1074 | + if((C.getVars('m')!='' && C.getVars('m')!=null) || parseInt( C.getSn('setup', 1))==1){ | |
| 1075 | + C.addListener('click', C.html5Click); | |
| 1076 | + } | |
| 1077 | + }, | |
| 1078 | + addListenerTime:function(){ | |
| 1079 | + var C = CKobject; | |
| 1080 | + if(C.AT){ | |
| 1081 | + C.AT(C._V_['currentTime']); | |
| 1082 | + } | |
| 1083 | + }, | |
| 1084 | + videoPlay: function() { | |
| 1085 | + if (this._T_) { | |
| 1086 | + this._V_.play(); | |
| 1087 | + } | |
| 1088 | + }, | |
| 1089 | + videoPause: function() { | |
| 1090 | + if (this._T_) { | |
| 1091 | + this._V_.pause(); | |
| 1092 | + } | |
| 1093 | + }, | |
| 1094 | + playOrPause: function() { | |
| 1095 | + if (this._T_) { | |
| 1096 | + if (this._V_.paused) { | |
| 1097 | + this._V_.play(); | |
| 1098 | + } else { | |
| 1099 | + this._V_.pause(); | |
| 1100 | + } | |
| 1101 | + } | |
| 1102 | + }, | |
| 1103 | + fastNext: function() { | |
| 1104 | + if (this._T_) { | |
| 1105 | + this._V_['currentTime'] = this._V_['currentTime'] + 10; | |
| 1106 | + } | |
| 1107 | + }, | |
| 1108 | + fastBack: function() { | |
| 1109 | + if (this._T_) { | |
| 1110 | + this._V_['currentTime'] = this._V_['currentTime'] - 10; | |
| 1111 | + } | |
| 1112 | + }, | |
| 1113 | + changeVolume: function(n) { | |
| 1114 | + if(n<0 || n>100){ | |
| 1115 | + return; | |
| 1116 | + } | |
| 1117 | + if (this._T_) { | |
| 1118 | + this._V_['volume'] = n * 0.01; | |
| 1119 | + } | |
| 1120 | + }, | |
| 1121 | + videoSeek: function(t) { | |
| 1122 | + if (this._T_) { | |
| 1123 | + this._V_['currentTime'] = t; | |
| 1124 | + } | |
| 1125 | + }, | |
| 1126 | + newAddress: function(u) { | |
| 1127 | + var s = []; | |
| 1128 | + if (u) { | |
| 1129 | + s = this.isHtml5New(u); | |
| 1130 | + } else { | |
| 1131 | + return; | |
| 1132 | + } | |
| 1133 | + if (s && this._T_) { | |
| 1134 | + this.changeParams(u); | |
| 1135 | + var l = s[0].split('->'); | |
| 1136 | + if (l && l.length == 2 && l[1].indexOf('ajax') > -1) { | |
| 1137 | + this.getUrl(l, false); | |
| 1138 | + return; | |
| 1139 | + } | |
| 1140 | + this._E_['v'] = s; | |
| 1141 | + this.newAdr(); | |
| 1142 | + } | |
| 1143 | + }, | |
| 1144 | + quitFullScreen:function() { | |
| 1145 | + if(document.cancelFullScreen) { | |
| 1146 | + document.cancelFullScreen(); | |
| 1147 | + } | |
| 1148 | + else if(document.mozCancelFullScreen) { | |
| 1149 | + document.mozCancelFullScreen(); | |
| 1150 | + } else if(document.webkitCancelFullScreen) { | |
| 1151 | + document.webkitCancelFullScreen(); | |
| 1152 | + } | |
| 1153 | + | |
| 1154 | + }, | |
| 1155 | + changeStatus:function(n){ | |
| 1156 | + this._H_=n; | |
| 1157 | + }, | |
| 1158 | + newAdr: function() { | |
| 1159 | + var s = this._E_['v']; | |
| 1160 | + this._V_.pause(); | |
| 1161 | + if(s.length==1){ | |
| 1162 | + this._V_.src=s[0].split('->')[0]; | |
| 1163 | + } | |
| 1164 | + else{ | |
| 1165 | + this._V_['innerHTML'] = this.getVideo(); | |
| 1166 | + } | |
| 1167 | + this._V_.load(); | |
| 1168 | + }, | |
| 1169 | + isHtml5New: function(s) { | |
| 1170 | + if (s.indexOf('html5') == -1) { | |
| 1171 | + return false; | |
| 1172 | + } | |
| 1173 | + var a = s.replace(/{/g, ''); | |
| 1174 | + var b = a.split('}'); | |
| 1175 | + var c = ''; | |
| 1176 | + for (var i = 0; i < b.length; i++) { | |
| 1177 | + if (b[i].indexOf('html5') > -1) { | |
| 1178 | + c = b[i].replace('html5->', '').split(','); | |
| 1179 | + break; | |
| 1180 | + } | |
| 1181 | + } | |
| 1182 | + return c; | |
| 1183 | + }, | |
| 1184 | + changeParams: function(f) { | |
| 1185 | + if (f) { | |
| 1186 | + var a = f.replace(/{/g, ''); | |
| 1187 | + var b = a.split('}'); | |
| 1188 | + var c = ''; | |
| 1189 | + for (var i = 0; i < b.length; i++) { | |
| 1190 | + var d = b[i].split('->'); | |
| 1191 | + if(d.length == 2){ | |
| 1192 | + switch(d[0]){ | |
| 1193 | + case 'p': | |
| 1194 | + if(parseInt(d[1]) == 1){ | |
| 1195 | + this._V_.autoplay = true; | |
| 1196 | + } | |
| 1197 | + else if(parseInt(d[1]) == 2){ | |
| 1198 | + this._V_.preload = 'metadata'; | |
| 1199 | + } | |
| 1200 | + else{ | |
| 1201 | + this._V_.autoplay = false; | |
| 1202 | + if(this._I_!=null){ | |
| 1203 | + clearInterval(this._I_); | |
| 1204 | + this._I_=null; | |
| 1205 | + } | |
| 1206 | + } | |
| 1207 | + break; | |
| 1208 | + case 'e': | |
| 1209 | + if(parseInt(d[1]) == 1){ | |
| 1210 | + this._V_.loop = true; | |
| 1211 | + } | |
| 1212 | + else{ | |
| 1213 | + this._V_.loop = false; | |
| 1214 | + } | |
| 1215 | + break; | |
| 1216 | + case 'i': | |
| 1217 | + this._V_.poster = d[1]; | |
| 1218 | + break; | |
| 1219 | + default: | |
| 1220 | + break; | |
| 1221 | + } | |
| 1222 | + } | |
| 1223 | + } | |
| 1224 | + } | |
| 1225 | + }, | |
| 1226 | + frontAdPause: function(s) { | |
| 1227 | + this.getNot(); | |
| 1228 | + }, | |
| 1229 | + frontAdUnload: function() { | |
| 1230 | + this.getNot(); | |
| 1231 | + }, | |
| 1232 | + changeFace: function(s) { | |
| 1233 | + this.getNot(); | |
| 1234 | + }, | |
| 1235 | + plugin: function(a, b, c, d, e, f, g) { | |
| 1236 | + this.getNot(); | |
| 1237 | + }, | |
| 1238 | + videoClear: function() { | |
| 1239 | + this.getNot(); | |
| 1240 | + }, | |
| 1241 | + videoBrightness: function(s) { | |
| 1242 | + this.getNot(); | |
| 1243 | + }, | |
| 1244 | + videoContrast: function(s) { | |
| 1245 | + this.getNot(); | |
| 1246 | + }, | |
| 1247 | + videoSaturation: function(s) { | |
| 1248 | + this.getNot(); | |
| 1249 | + }, | |
| 1250 | + videoSetHue: function(s) { | |
| 1251 | + this.getNot(); | |
| 1252 | + }, | |
| 1253 | + videoWAndH: function(a, b) { | |
| 1254 | + this.getNot(); | |
| 1255 | + }, | |
| 1256 | + videoWHXY: function(a, b, c, d) { | |
| 1257 | + this.getNot(); | |
| 1258 | + }, | |
| 1259 | + changeFlashvars: function(a) { | |
| 1260 | + this.getNot(); | |
| 1261 | + }, | |
| 1262 | + changeMyObject: function(a, b) { | |
| 1263 | + this.getNot(); | |
| 1264 | + }, | |
| 1265 | + getMyObject: function(a, b) { | |
| 1266 | + this.getNot(); | |
| 1267 | + }, | |
| 1268 | + changeeFace: function() { | |
| 1269 | + this.getNot(); | |
| 1270 | + }, | |
| 1271 | + changeStyle: function(a, b) { | |
| 1272 | + this.getNot(); | |
| 1273 | + }, | |
| 1274 | + promptLoad: function() { | |
| 1275 | + this.getNot(); | |
| 1276 | + }, | |
| 1277 | + promptUnload: function() { | |
| 1278 | + this.getNot(); | |
| 1279 | + }, | |
| 1280 | + marqueeLoad: function(a,b) { | |
| 1281 | + this.getNot(); | |
| 1282 | + }, | |
| 1283 | + marqueeClose: function(s) { | |
| 1284 | + this.getNot(); | |
| 1285 | + }, | |
| 1286 | + videoError: function(s) { | |
| 1287 | + this.getNot(); | |
| 1288 | + }, | |
| 1289 | + formatUrl: function(s) { | |
| 1290 | + this.getNot(); | |
| 1291 | + }, | |
| 1292 | + sendJS: function(s) { | |
| 1293 | + this.getNot(); | |
| 1294 | + }, | |
| 1295 | + plugAttribute: function(s) { | |
| 1296 | + this.getNot(); | |
| 1297 | + }, | |
| 1298 | + errorTextShow: function(s) { | |
| 1299 | + this.getNot(); | |
| 1300 | + }, | |
| 1301 | + openUrl: function(s) { | |
| 1302 | + window.open(s); | |
| 1303 | + }, | |
| 1304 | + jsonParse: function(s) { | |
| 1305 | + this.getNot(); | |
| 1306 | + }, | |
| 1307 | + promptShow: function(s,x,y) { | |
| 1308 | + this.getNot(); | |
| 1309 | + }, | |
| 1310 | + screenShot: function(s,x,y,x2,y2) { | |
| 1311 | + this.getNot(); | |
| 1312 | + }, | |
| 1313 | + fullScreen: function() { | |
| 1314 | + this.getNot(); | |
| 1315 | + }, | |
| 1316 | + allowFull: function() { | |
| 1317 | + this.getNot(); | |
| 1318 | + }, | |
| 1319 | + loadButton: function() { | |
| 1320 | + this.getNot(); | |
| 1321 | + }, | |
| 1322 | + getFile: function() { | |
| 1323 | + this.getNot(); | |
| 1324 | + }, | |
| 1325 | + textBoxShow:function() { | |
| 1326 | + this.getNot(); | |
| 1327 | + }, | |
| 1328 | + loadElement: function() { | |
| 1329 | + this.getNot(); | |
| 1330 | + }, | |
| 1331 | + textBoxClose: function() { | |
| 1332 | + this.getNot(); | |
| 1333 | + }, | |
| 1334 | + textBoxTween: function() { | |
| 1335 | + this.getNot(); | |
| 1336 | + }, | |
| 1337 | + getNot: function() { | |
| 1338 | + var s='The ckplayer\'s API for HTML5 does not exist'; | |
| 1339 | + return s; | |
| 1340 | + }, | |
| 1341 | + volumeChangeHandler: function() { | |
| 1342 | + var C = CKobject; | |
| 1343 | + if (C._V_.muted) { | |
| 1344 | + C.returnStatus('volumechange:0', 1); | |
| 1345 | + C._O_['volume'] = 0; | |
| 1346 | + C._O_['mute'] = true; | |
| 1347 | + } else { | |
| 1348 | + C._O_['mute'] = false; | |
| 1349 | + C._O_['volume'] = C._V_['volume'] * 100; | |
| 1350 | + C.returnStatus('volumechange:'+C._V_['volume'] * 100, 1); | |
| 1351 | + } | |
| 1352 | + }, | |
| 1353 | + endedHandler: function() { | |
| 1354 | + var C = CKobject; | |
| 1355 | + var e=parseInt(C.getVars('e')); | |
| 1356 | + C.returnStatus('ended', 1); | |
| 1357 | + if(C._I_){ | |
| 1358 | + clearInterval(C._I_); | |
| 1359 | + C._I_=null; | |
| 1360 | + } | |
| 1361 | + if ( e!= 0 && e !=4 && e !=6) { | |
| 1362 | + return; | |
| 1363 | + } | |
| 1364 | + if(e==6){ | |
| 1365 | + this.quitFullScreen(); | |
| 1366 | + } | |
| 1367 | + var f='playerstop()'; | |
| 1368 | + if (C.getSn('calljs', 2)!='') { | |
| 1369 | + f=C.getSn('calljs', 2)+'()'; | |
| 1370 | + } | |
| 1371 | + try { | |
| 1372 | + if (typeof(eval(f)) == 'function') { | |
| 1373 | + eval(f); | |
| 1374 | + return; | |
| 1375 | + } | |
| 1376 | + } catch(e) { | |
| 1377 | + try { | |
| 1378 | + if (typeof(eval(playerstop)) == 'function') { | |
| 1379 | + playerstop(); | |
| 1380 | + return; | |
| 1381 | + } | |
| 1382 | + } catch(e) { | |
| 1383 | + return; | |
| 1384 | + } | |
| 1385 | + } | |
| 1386 | + }, | |
| 1387 | + loadedMetadataHandler: function() { | |
| 1388 | + var C = CKobject; | |
| 1389 | + C.returnStatus('loadedmetadata', 1); | |
| 1390 | + C._O_['totalTime'] = C._V_['duration']; | |
| 1391 | + C._O_['width'] = C._V_['width']; | |
| 1392 | + C._O_['height'] = C._V_['height']; | |
| 1393 | + C._O_['awidth'] = C._V_['videoWidth']; | |
| 1394 | + C._O_['aheight'] = C._V_['videoHeight']; | |
| 1395 | + if (C._V_.defaultMuted) { | |
| 1396 | + C.returnStatus('volumechange:0', 1); | |
| 1397 | + C._O_['mute'] = true; | |
| 1398 | + C._O_['volume'] = 0; | |
| 1399 | + } else { | |
| 1400 | + C._O_['mute'] = false; | |
| 1401 | + C._O_['volume'] = C._V_['volume'] * 100; | |
| 1402 | + C.returnStatus('volumechange:'+C._V_['volume'] * 100, 1); | |
| 1403 | + } | |
| 1404 | + if (parseInt(C.getVars('p')) == 1) { | |
| 1405 | + C.playHandler(); | |
| 1406 | + } | |
| 1407 | + if(C.ATAll){ | |
| 1408 | + C.ATAll(C._V_['duration']); | |
| 1409 | + } | |
| 1410 | + }, | |
| 1411 | + errorHandler: function() { | |
| 1412 | + CKobject.returnStatus('error', 1); | |
| 1413 | + }, | |
| 1414 | + playHandler: function() { | |
| 1415 | + var C = CKobject; | |
| 1416 | + if (C._V_.paused) { | |
| 1417 | + C.returnStatus('pause', 1); | |
| 1418 | + C.addO('play', false); | |
| 1419 | + if(C._I_!=null){ | |
| 1420 | + clearInterval(C._I_); | |
| 1421 | + C._I_=null; | |
| 1422 | + } | |
| 1423 | + } else { | |
| 1424 | + C.returnStatus('play', 1); | |
| 1425 | + C.addO('play', true); | |
| 1426 | + if (!C._P_) { | |
| 1427 | + C.returnStatus('play', 1); | |
| 1428 | + C._P_ = true; | |
| 1429 | + } | |
| 1430 | + C._I_ = setInterval(C.playTime, parseInt( C.getSn('setup', 37))); | |
| 1431 | + if(!C._G_){ | |
| 1432 | + C._G_=true; | |
| 1433 | + for(var k in C._A_){ | |
| 1434 | + if(k=='g' && C._A_[k]){ | |
| 1435 | + var g=parseInt(C._A_[k]); | |
| 1436 | + C.videoSeek(g); | |
| 1437 | + } | |
| 1438 | + } | |
| 1439 | + } | |
| 1440 | + if(!C._Y_){ | |
| 1441 | + C._Y_=true; | |
| 1442 | + for(var k in C._A_){ | |
| 1443 | + if(k=='j' && C._A_[k]){ | |
| 1444 | + var j=parseInt(C._A_[k]); | |
| 1445 | + if(j>0){ | |
| 1446 | + C._J_=j; | |
| 1447 | + } | |
| 1448 | + else{ | |
| 1449 | + C._J_=parseInt(C._O_['totalTime'])+j; | |
| 1450 | + } | |
| 1451 | + } | |
| 1452 | + } | |
| 1453 | + } | |
| 1454 | + } | |
| 1455 | + }, | |
| 1456 | + html5Click: function(){ | |
| 1457 | + //console.log(this); | |
| 1458 | + var C = CKobject; | |
| 1459 | + if(C.getVars('m')!='' && C.getVars('m')!=null){ | |
| 1460 | + window.open(C.getVars('m')); | |
| 1461 | + } | |
| 1462 | + }, | |
| 1463 | + returnStatus: function(s, j) { | |
| 1464 | + var h = s; | |
| 1465 | + if (this._H_ == 3) { | |
| 1466 | + h = this._E_['p'] +'->'+ h; | |
| 1467 | + } | |
| 1468 | + if (this._M_ && j <= this._H_ ) { | |
| 1469 | + this._L_(h); | |
| 1470 | + } | |
| 1471 | + }, | |
| 1472 | + addO: function(s, z) { | |
| 1473 | + this._O_[s] = z; | |
| 1474 | + }, | |
| 1475 | + getStatus: function() { | |
| 1476 | + return this._O_; | |
| 1477 | + }, | |
| 1478 | + playTime: function() { | |
| 1479 | + var C = CKobject; | |
| 1480 | + var t = C._V_['currentTime']; | |
| 1481 | + C._O_['time'] = t; | |
| 1482 | + if(C._J_>0 && t>C._J_){ | |
| 1483 | + C._J_=0; | |
| 1484 | + C.videoSeek(C._O_['totaltime']); | |
| 1485 | + } | |
| 1486 | + C.returnStatus('time:' + t, 1); | |
| 1487 | + } | |
| 1488 | + } | |
| 1489 | + window.CKobject = CKobject; | |
| 1490 | +})(); | |
| 0 | 1491 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ckplayer/ckplayer.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/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-2三个等级 | |
| 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、加载风格是否采用加密方式传送,该功能普通用户不能使用,并且需要下载ckplayer-SN版 | |
| 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,-13,-13</pm_padvc> | |
| 178 | + <!-- | |
| 179 | + 暂停广告的关闭按钮的位置 | |
| 180 | + 1、水平对齐方式 | |
| 181 | + 2、垂直对齐方式 | |
| 182 | + 3、水平偏移量 | |
| 183 | + 4、垂直偏移量 | |
| 184 | + --> | |
| 185 | + <pm_advms>2,2,-46,-67</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,-70,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 | + 1、全局监听返回结果的函数 | |
| 260 | + 2、跳过广告的函数 | |
| 261 | + 3、播放结束时调用的js函数 | |
| 262 | + 4、加载滚动文字广告的函数 | |
| 263 | + --> | |
| 264 | + <myweb></myweb> | |
| 265 | + | |
| 266 | + <!-- | |
| 267 | + 以下内容部份是和插件相关的配置,请注意,自定义插件以及其配置的命名方式要注意,不要和系统的相重复,不然就会替换掉系统的相关设置,删除相关插件的话也可以同时删除相关的配置 | |
| 268 | + 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 | |
| 269 | + --> | |
| 270 | + <cpt_lights>0</cpt_lights> | |
| 271 | + <!-- | |
| 272 | + 该处定义是否使用开关灯,使用开灯效果时调用页面的js函数function closelights(){},关灯调用 function closelights(){}; | |
| 273 | + --> | |
| 274 | + <cpt_share>/ckplayer/share.xml</cpt_share> | |
| 275 | + <!-- | |
| 276 | + 分享插件调用的配置文件地址,此设设置成空,则不启用分享按钮 | |
| 277 | + 调用插件开始 | |
| 278 | + --> | |
| 279 | + </style> | |
| 280 | +</ckplayer> | |
| 0 | 281 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ckplayer/language.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | + <ckplayer> | |
| 3 | + <style> | |
| 4 | + <pr_zip>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}已加载[$prtage]%{/font}</pr_zip> | |
| 5 | + <!-- | |
| 6 | + 加载皮肤包进度提示的文字,[$prtage]会被替换成加载百分比 | |
| 7 | + --> | |
| 8 | + <pr_load>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}已加载[$prtage]%{/font}</pr_load> | |
| 9 | + <!-- | |
| 10 | + 当调用多段视频时,并且没有配置好各段视频的时间和字节数的情况下,播放器需要先读取各段视频的元数据进行计算,此时需要显示一个加载进度告诉用户已计算的情况。 | |
| 11 | + --> | |
| 12 | + <pr_noload>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}加载失败{/font}</pr_noload> | |
| 13 | + <!-- | |
| 14 | + 加载视频失败时显示的内容 | |
| 15 | + --> | |
| 16 | + <pr_buffer>{font color='#FFFFFF' face='Arial' size='12'}[$buffer]%{/font}</pr_buffer> | |
| 17 | + <!-- | |
| 18 | + 视频缓冲时显示的提示,[$buffer]会被替换成缓冲的百分比数字部份 | |
| 19 | + --> | |
| 20 | + <pr_play>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}点击播放{/font}</pr_play> | |
| 21 | + <!-- | |
| 22 | + 鼠标经过播放按钮时的提示,支持html | |
| 23 | + --> | |
| 24 | + <pr_pause>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}点击暂停{/font}</pr_pause> | |
| 25 | + <!-- | |
| 26 | + 鼠标经过暂停按钮时的提示,支持html | |
| 27 | + --> | |
| 28 | + <pr_mute>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}点击静音{/font}</pr_mute> | |
| 29 | + <!-- | |
| 30 | + 鼠标经过静音按钮时的提示,支持html | |
| 31 | + --> | |
| 32 | + <pr_nomute>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}取消静音{/font}</pr_nomute> | |
| 33 | + <!-- | |
| 34 | + 鼠标经过取消静音按钮时的提示,支持html | |
| 35 | + --> | |
| 36 | + <pr_full>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}点击全屏{/font}</pr_full> | |
| 37 | + <!-- | |
| 38 | + 鼠标经过全屏按钮时的提示,支持html | |
| 39 | + --> | |
| 40 | + <pr_nofull>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}退出全屏{/font}</pr_nofull> | |
| 41 | + <!-- | |
| 42 | + 鼠标经过退出全屏按钮时的提示,支持html | |
| 43 | + --> | |
| 44 | + <pr_fastf>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}快进{/font}</pr_fastf> | |
| 45 | + <!-- | |
| 46 | + 鼠标经过快进按钮时的提示,支持html | |
| 47 | + --> | |
| 48 | + <pr_fastr>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}快退{/font}</pr_fastr> | |
| 49 | + <!-- | |
| 50 | + 鼠标经过快退按钮时的提示,支持html | |
| 51 | + --> | |
| 52 | + <pr_time>{font color='#FFFFFF' face='Arial' size='16'}[$Time]{/font}</pr_time> | |
| 53 | + <!-- | |
| 54 | + 鼠标经过进度栏时提示当前点上时间的,[$Time]会被替换成时间,支持html | |
| 55 | + --> | |
| 56 | + <pr_volume>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}音量:[$Volume]%{/font}</pr_volume> | |
| 57 | + <!-- | |
| 58 | + 鼠标经过音量调节框或调整音量时提示,[$Volume]会自动替换音量值(0-100) | |
| 59 | + --> | |
| 60 | + <pr_clockwait>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}00:00 / 00:00{/font}</pr_clockwait> | |
| 61 | + <!-- | |
| 62 | + 在默认不加载视频,即m=1的时候,同时并没有设置视频的时间和字节,即o和w值的时候,pr_clock和pr_clock2里的所有内容被替换成这里设置的值 | |
| 63 | + --> | |
| 64 | + <pr_live>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}视频直播中{/font}</pr_live> | |
| 65 | + <!-- | |
| 66 | + 在直播的情况下显示的文字 | |
| 67 | + --> | |
| 68 | + <pr_adv>{font color='#FFFFFF' size='12' face='Microsoft YaHei,微软雅黑'}广告剩余:{font color='#FF0000' size='15' face='Arial'}{b}[$Second]{/b}{/font} 秒{/font}</pr_adv> | |
| 69 | + <!-- | |
| 70 | + 广告倒计时显示的内容,[$Second]将会显示倒计时的秒数 | |
| 71 | + --> | |
| 72 | + <pr_prompt>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}[$prompt]{/font}</pr_prompt> | |
| 73 | + <!-- | |
| 74 | + 提示点文字 | |
| 75 | + --> | |
| 76 | + <pr_cksetup>{font color='#FFFFFF' face='Microsoft YaHei,微软雅黑' size='14'}设置{/font}</pr_cksetup> | |
| 77 | + <!-- | |
| 78 | + 鼠标经过设置提示的文字(该定义为插件所用) | |
| 79 | + --> | |
| 80 | + </style> | |
| 81 | + </ckplayer> | |
| 0 | 82 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ckplayer/m3u8.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/ckplayer/related.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<ckplayer> | |
| 3 | +<title>{font color="#FFDD00" face="Microsoft YaHei,微软雅黑" size="14"}精彩视频推荐{/font}</title> | |
| 4 | + <!--左上角的标题说明文字,支持html--> | |
| 5 | + <area>600,400,0xFFDD00,20</area> | |
| 6 | + <!-- | |
| 7 | + 该插件在播放中的区域控制 | |
| 8 | + 固定尺寸,精彩视频区域会固定大小并且保持剧中 | |
| 9 | + 1:宽 | |
| 10 | + 2:高 | |
| 11 | + 3:边框色 | |
| 12 | + 4:边框透明度 | |
| 13 | + --> | |
| 14 | + <image>120,90</image> | |
| 15 | + <!--图片的宽,高--> | |
| 16 | + <distance>150,175,100</distance> | |
| 17 | + <!-- | |
| 18 | + 1:横排图片之间的距离,前一个图片的左边到后一个图片的左边的距离 | |
| 19 | + 2:竖排图片之间距离,上一个图片的上边到下一个图片的上边距离,这里需要特别注意,因为图片显示区域是总区域-40的高度,默认的即<area>的高400-40=360,所以比如你的图片想一列显示二个,则该参数需要设置成360/2=180 | |
| 20 | + 3:文字距离图片上方的距离 | |
| 21 | + 只要设置好这三个参数,图片的位置就可以固定住了 | |
| 22 | + --> | |
| 23 | + <rep_title>{a href="[url]" target="_blank"}{font color="#FFFFFF" face="新宋体"}[title]{/font}{/a}</rep_title> | |
| 24 | + <!--标题替换规则--> | |
| 25 | + <style>a{color:#FFFFFF;}a:hover{color:#FF0000;}</style> | |
| 26 | + <!--文本样式--> | |
| 27 | + <size>120,42,3</size> | |
| 28 | + <!--文本的宽度,高度,行和行之间距离--> | |
| 29 | + <relatedlist> | |
| 30 | + <related> | |
| 31 | + <img>temp/1.jpg</img> | |
| 32 | + <url>http://www.ckplayer.com/</url> | |
| 33 | + <title>1:这里调用的文件配置在ckplayer/related.xml里</title> | |
| 34 | + </related> | |
| 35 | + <related> | |
| 36 | + <img>temp/2.jpg</img> | |
| 37 | + <url>http://www.ckplayer.com/</url> | |
| 38 | + <title>2:支持多页调用</title> | |
| 39 | + </related> | |
| 40 | + <related> | |
| 41 | + <img>temp/3.jpg</img> | |
| 42 | + <url>http://www.ckplayer.com/</url> | |
| 43 | + <title>3:文本请保持在二行,不能多于三行,多于三行将不显示</title> | |
| 44 | + </related> | |
| 45 | + <related> | |
| 46 | + <img>temp/4.jpg</img> | |
| 47 | + <url>http://www.ckplayer.com/</url> | |
| 48 | + <title>4:支持多行调用,多页调用</title> | |
| 49 | + </related> | |
| 50 | + <related> | |
| 51 | + <img>temp/5.jpg</img> | |
| 52 | + <url>http://www.ckplayer.com/</url> | |
| 53 | + <title>5:感谢对ckplayer的支持</title> | |
| 54 | + </related> | |
| 55 | + <related> | |
| 56 | + <img>temp/6.jpg</img> | |
| 57 | + <url>http://www.ckplayer.com/</url> | |
| 58 | + <title>6:最多两行,请不要超过二行</title> | |
| 59 | + </related> | |
| 60 | + <related> | |
| 61 | + <img>temp/3.jpg</img> | |
| 62 | + <url>http://www.ckplayer.com/</url> | |
| 63 | + <title>7:这里调用的文件配置在ckplayer/related.xml里</title> | |
| 64 | + </related> | |
| 65 | + <related> | |
| 66 | + <img>temp/5.jpg</img> | |
| 67 | + <url>http://www.ckplayer.com/</url> | |
| 68 | + <title>8:支持多页调用</title> | |
| 69 | + </related> | |
| 70 | + <related> | |
| 71 | + <img>temp/4.jpg</img> | |
| 72 | + <url>http://www.ckplayer.com/</url> | |
| 73 | + <title>9:文本请保持在二行,不能多于三行,多于三行将不显示</title> | |
| 74 | + </related> | |
| 75 | + <related> | |
| 76 | + <img>temp/1.jpg</img> | |
| 77 | + <url>http://www.ckplayer.com/</url> | |
| 78 | + <title>10:支持多行调用,多页调用</title> | |
| 79 | + </related> | |
| 80 | + <related> | |
| 81 | + <img>temp/2.jpg</img> | |
| 82 | + <url>http://www.ckplayer.com/</url> | |
| 83 | + <title>11:感谢对ckplayer的支持</title> | |
| 84 | + </related> | |
| 85 | + <related> | |
| 86 | + <img>temp/6.jpg</img> | |
| 87 | + <url>http://www.ckplayer.com/</url> | |
| 88 | + <title>12:最多两行,请不要超过二行</title> | |
| 89 | + </related> | |
| 90 | + <related> | |
| 91 | + <img>temp/5.jpg</img> | |
| 92 | + <url>http://www.ckplayer.com/</url> | |
| 93 | + <title>13:这里调用的文件配置在ckplayer/related.xml里</title> | |
| 94 | + </related> | |
| 95 | + <related> | |
| 96 | + <img>temp/4.jpg</img> | |
| 97 | + <url>http://www.ckplayer.com/</url> | |
| 98 | + <title>14:支持多页调用</title> | |
| 99 | + </related> | |
| 100 | + <related> | |
| 101 | + <img>temp/6.jpg</img> | |
| 102 | + <url>http://www.ckplayer.com/</url> | |
| 103 | + <title>15:文本请保持在二行,不能多于三行,多于三行将不显示</title> | |
| 104 | + </related> | |
| 105 | + <related> | |
| 106 | + <img>temp/3.jpg</img> | |
| 107 | + <url>http://www.ckplayer.com/</url> | |
| 108 | + <title>16:支持多行调用,多页调用</title> | |
| 109 | + </related> | |
| 110 | + <related> | |
| 111 | + <img>temp/1.jpg</img> | |
| 112 | + <url>http://www.ckplayer.com/</url> | |
| 113 | + <title>17:感谢对ckplayer的支持</title> | |
| 114 | + </related> | |
| 115 | + <related> | |
| 116 | + <img>temp/2.jpg</img> | |
| 117 | + <url>http://www.ckplayer.com/</url> | |
| 118 | + <title>18:最多两行,请不要超过二行</title> | |
| 119 | + </related> | |
| 120 | + </relatedlist> | |
| 121 | +</ckplayer> | |
| 0 | 122 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ckplayer/share.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<ckplayer> | |
| 3 | + <share_html> | |
| 4 | + {embed src="贵站网址,在ckplayer/share.xml里修改/ckplayer/ckplayer.swf" flashvars="[$share]" quality="high" width="480" height="400" align="middle" allowScriptAccess="always" allowFullscreen="true" type="application/x-shockwave-flash"}{/embed} | |
| 5 | + </share_html> | |
| 6 | + <share_flash> | |
| 7 | + 贵站网址/ckplayer/ckplayer.swf?[$share] | |
| 8 | + </share_flash> | |
| 9 | + <share_flashvars> | |
| 10 | + f,my_url,my_pic,a | |
| 11 | + </share_flashvars> | |
| 12 | + <share_path>ckplayer/share/</share_path><!--分享图片的文件夹地址--> | |
| 13 | + <share_replace> | |
| 14 | + </share_replace> | |
| 15 | + <share_permit>0</share_permit><!--是否有视听许可证,默认0没有,1是有--> | |
| 16 | + <share_uuid> | |
| 17 | + c25cf02c-1705-412d-bd4b-77a10b380f08 | |
| 18 | + </share_uuid> | |
| 19 | + <share_button> | |
| 20 | + <share> | |
| 21 | + <id>qqmb</id> | |
| 22 | + <img>qq.png</img> | |
| 23 | + <coordinate>20,50</coordinate> | |
| 24 | + </share> | |
| 25 | + <share> | |
| 26 | + <id>sinaminiblog</id> | |
| 27 | + <img>sina.png</img> | |
| 28 | + <coordinate>101,50</coordinate> | |
| 29 | + </share> | |
| 30 | + <share> | |
| 31 | + <id>qzone</id> | |
| 32 | + <img>qzone.png</img> | |
| 33 | + <coordinate>182,50</coordinate> | |
| 34 | + </share> | |
| 35 | + <share> | |
| 36 | + <id>renren</id> | |
| 37 | + <img>rr.png</img> | |
| 38 | + <coordinate>263,50</coordinate> | |
| 39 | + </share> | |
| 40 | + <share> | |
| 41 | + <id>kaixin001</id> | |
| 42 | + <img>kaixin001.png</img> | |
| 43 | + <coordinate>20,85</coordinate> | |
| 44 | + </share> | |
| 45 | + <share> | |
| 46 | + <id>tianya</id> | |
| 47 | + <img>tianya.png</img> | |
| 48 | + <coordinate>101,85</coordinate> | |
| 49 | + </share> | |
| 50 | + <share> | |
| 51 | + <id>feixin</id> | |
| 52 | + <img>feixin.png</img> | |
| 53 | + <coordinate>182,85</coordinate> | |
| 54 | + </share> | |
| 55 | + <share> | |
| 56 | + <id>msn</id> | |
| 57 | + <img>msn.png</img> | |
| 58 | + <coordinate>263,85</coordinate> | |
| 59 | + </share> | |
| 60 | + </share_button> | |
| 61 | +</ckplayer> | |
| 0 | 62 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/ckplayer/share/feixin.png
0 → 100644
2.16 KB
src/main/webapp/static/assets/ckplayer/share/google.png
0 → 100644
1.78 KB
src/main/webapp/static/assets/ckplayer/share/kaixin001.png
0 → 100644
2.55 KB
src/main/webapp/static/assets/ckplayer/share/msn.png
0 → 100644
1.91 KB
src/main/webapp/static/assets/ckplayer/share/qq.png
0 → 100644
1.83 KB
src/main/webapp/static/assets/ckplayer/share/qq2.png
0 → 100644
2.08 KB
src/main/webapp/static/assets/ckplayer/share/qzone.png
0 → 100644
2.08 KB
src/main/webapp/static/assets/ckplayer/share/rr.png
0 → 100644
3 KB
src/main/webapp/static/assets/ckplayer/share/sina.png
0 → 100644
2.59 KB
src/main/webapp/static/assets/ckplayer/share/sohu.png
0 → 100644
1.38 KB
src/main/webapp/static/assets/ckplayer/share/tianya.png
0 → 100644
2.32 KB
src/main/webapp/static/assets/ckplayer/style.swf
0 → 100644
No preview for this file type
src/main/webapp/static/assets/cnlive/336x220.jpg
0 → 100644
9.06 KB
src/main/webapp/static/assets/cnlive/js/check.js
0 → 100644
| 1 | +function to_top(id) { | |
| 2 | + $.ajax({ | |
| 3 | + url : BASE+'/check/top/'+id, | |
| 4 | + type : 'get', | |
| 5 | + async : true, | |
| 6 | + error : function() { | |
| 7 | + alert('获取错误!'); | |
| 8 | + }, | |
| 9 | + success : function(data) { | |
| 10 | + window.location.href="../list/1"; | |
| 11 | + } | |
| 12 | + }); | |
| 13 | +} | |
| 14 | + | |
| 15 | +function to_pass(id) { | |
| 16 | + $.ajax({ | |
| 17 | + url : BASE+'/check/pass/'+id, | |
| 18 | + type : 'get', | |
| 19 | + async : true, | |
| 20 | + error : function() { | |
| 21 | + alert('获取错误!'); | |
| 22 | + }, | |
| 23 | + success : function(data) { | |
| 24 | + window.location.href="../list/1"; | |
| 25 | + } | |
| 26 | + }); | |
| 27 | +} | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 0 | 31 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/cnlive/js/player_m3u8.js
0 → 100644
| 1 | +var map = {}; | |
| 2 | +//获取所有播放器span | |
| 3 | +var foo= $("span[class='mailbox-attachment-icon has-img']"); | |
| 4 | + $(foo).each(function() { | |
| 5 | + var channel_id=this.id.split("_")[2]; | |
| 6 | + var play_url= $("#play_url_"+channel_id).val(); | |
| 7 | + var player_name=this.id; | |
| 8 | + //初始化播放器对象 | |
| 9 | + var player_handel="player_"+channel_id; | |
| 10 | + | |
| 11 | + player_handel=jwplayer(player_name).setup({ | |
| 12 | + flashplayer:BASE+"/static/assets/jwplayer/jwplayer.flash.swf", | |
| 13 | + file: play_url, | |
| 14 | + image: BASE+"/static/assets/jwplayer/player.jpg", | |
| 15 | + width: '155', | |
| 16 | + height: '105', | |
| 17 | + mute:true, | |
| 18 | + autostart: true | |
| 19 | + }); | |
| 20 | + | |
| 21 | + map["player_"+channel_id] = player_handel; | |
| 22 | +}) | |
| 23 | + | |
| 24 | +function play(id){ | |
| 25 | + var player=map["player_"+id]; | |
| 26 | + if(player.getState() != 'PLAYING'){ | |
| 27 | + player.play(true); | |
| 28 | + $("#play_button_"+id).html("断开"); | |
| 29 | + }else { | |
| 30 | + player.play(false); | |
| 31 | + player.stop(); | |
| 32 | + $("#play_button_"+id).html("载入"); | |
| 33 | + } | |
| 34 | + | |
| 35 | +} | |
| 36 | + | |
| 37 | + | |
| 0 | 38 | \ No newline at end of file | ... | ... |
target/classes/com/cnlive/mz/live/action/ActivityAction.class
No preview for this file type
target/classes/com/cnlive/mz/live/action/ChannelAction.class
No preview for this file type
target/classes/com/cnlive/mz/live/action/IndexAction.class
No preview for this file type
target/classes/com/cnlive/mz/live/aspect/ActionAspect.class
No preview for this file type
target/classes/com/cnlive/mz/live/aspect/AuthFilter.class
No preview for this file type
target/m2e-wtp/web-resources/META-INF/MANIFEST.MF
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.xml
| ... | ... | @@ -53,11 +53,6 @@ |
| 53 | 53 | <artifactId>cnlive_live_model</artifactId> |
| 54 | 54 | <version>0.0.1-SNAPSHOT</version> |
| 55 | 55 | </dependency> |
| 56 | - <dependency> | |
| 57 | - <groupId>com.cnlive</groupId> | |
| 58 | - <artifactId>cnlive_media_tools</artifactId> | |
| 59 | - <version>1.0.0</version> | |
| 60 | - </dependency> | |
| 61 | 56 | </dependencies> |
| 62 | 57 | <packaging>war</packaging> |
| 63 | 58 | </project> | ... | ... |