Commit 54aba86a6b12247687fe8a5ee955c0ac59e82cf0

Authored by 张宗朋
1 parent 6d28cc30

check

src/main/webapp/pages/check/monitor.jsp
... ... @@ -3,6 +3,16 @@
3 3 <!DOCTYPE html>
4 4 <html>
5 5 <head>
  6 +<style type="text/css">
  7 +.text-overflow{
  8 +display:block;/*内联对象需加*/
  9 +width:31em;
  10 +word-break:keep-all;/* 不换行 */
  11 +white-space:nowrap;/* 不换行 */
  12 +overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
  13 +text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
  14 +}
  15 +</style>
6 16 <meta charset="UTF-8">
7 17 <title>监审管理 |<f:message key="common.title" /></title>
8 18 <meta
... ... @@ -42,13 +52,14 @@
42 52 <div class="col-md-12" id="divShow_${item.id}">
43 53 <div class="box box-success box-solid">
44 54 <div class="box-header with-border">
45   - <h3 class="box-title">${item.title}</h3>
  55 + <div class="text-overflow">
  56 + <h3 class="box-title" id="hidId">${item.title}</h3></div>
46 57 <div class="box-tools pull-right">
47 58 <button class="btn btn-sm" id="play_button_${item.id}"
48 59 onclick="play(${item.id});">重新载入</button>
49 60 </div>
50 61 </div>
51   - <div class="box-body">
  62 + <div id = "playId" class="box-body">
52 63 <input type="hidden" name="play_url_${item.id}"
53 64 id="play_url_${item.id}" value="${item.live_url}" /> <span
54 65 class="mailbox-attachment-icon has-img"
... ... @@ -66,9 +77,9 @@
66 77 </div>
67 78 <div class="box-body no-padding">
68 79 <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>
  80 + <li id="userId"><a><i class="fa fa-file-text-o"></i>用户ID:</a></li>
  81 + <li id="title"><a><i class="fa fa-file-text-o"></i>TITLE: </a></li>
  82 + <li id="startTime"><a><i class="fa fa-file-text-o"></i>开播时间: </a></li>
72 83 </ul>
73 84 </div>
74 85 </div>
... ... @@ -86,20 +97,23 @@
86 97 <div
87 98 class="box ${item.check_sort eq null ? 'box-warning':'box-success'} box-solid">
88 99 <div class="box-header with-border">
89   - <h3 class="box-title">${item.title}</h3>
  100 + <div class="text-overflow">
  101 + <h3 class="box-title">${item.title}</h3></div>
90 102 <div class="box-tools pull-right">
  103 + <button class="btn btn-sm btn-danger"
  104 + onclick="changePlay('${item.id}','${item.live_url}','${item.t_user_id}','${item.title}','${item.start_time}');">左</button>
91 105 <button class="btn btn-sm btn-danger"
92 106 onclick="to_pass(${item.id});">过</button>
93 107 <button class="btn btn-sm btn-danger"
94 108 onclick="to_top(${item.id});">顶</button>
95 109 <button class="btn btn-sm btn-danger"
96   - onclick="play(${item.id});">断</button>
  110 + onclick="play_close('${item.id}','${item.live_url}');">断</button>
97 111 </div>
98 112 </div>
99   - <div class="box-body">
  113 + <div class="box-body" >
100 114 <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"
  115 + id="play_url_${item.id}" value="${item.live_url}" /> <span
  116 + class="mailbox-attachment-icon has-img"
103 117 id="player_span_${item.id}"> <img
104 118 src="../../static/assets/dist/img/photo2.png"
105 119 alt="Attachment">
... ...
src/main/webapp/static/assets/cnlive/js/live.js
1 1 function toSubmit(){
2 2 $("#activityForm").submit();
3 3 }
4   -
5   -
  4 + jwplayer("playId").setup({
  5 + file: "",
  6 + height: 260,
  7 + image: "/assets/myVideo.jpg",
  8 + autostart:true,
  9 + rtmp: {
  10 + bufferlength: 0.1
  11 + },
  12 + width: 370
  13 + });
6 14 //修改直播开始结束时间
7 15 function update_activity_time(){
8 16 var start_time= $('#start_time').val();
... ... @@ -437,7 +445,8 @@ function do_publishreview(id){
437 445 }
438 446 //断流处理
439 447 function play_close(id,live_url){
440   - alert(111);
  448 + var id_live_url = $("hidId").val();
  449 + alert(id_live_url);
441 450 $.ajax({
442 451 url : '../../check/cut/' + id,
443 452 type : 'post',
... ... @@ -448,12 +457,31 @@ function play_close(id,live_url){
448 457 alert('关闭时发生错误!');
449 458 },
450 459 success : function(data) {
  460 + //$("#play_url_"+id).val("");
451 461 location.href = '../../check/list/1';
452 462 alert("关闭成功");
453 463 }
454 464 });
455 465 }
456   -/*function changePlay(id){
457   - alert(111);
458   - alert(id);
459   -}*/
  466 +function changePlay(id,live_url,userId,title,time){
  467 + $("input").attr("id","play_url_"+id);
  468 + $("input").attr("name","play_url_"+id);
  469 + //$("#play_url_"+id).val(live_url);
  470 + $("#hidId").val(live_url);
  471 + $("li[id='userId']").html("<a><i class='fa fa-file-text-o'></i>用户ID: "+userId+"</a>");
  472 + $("li[id='title']").html("<a><i class='fa fa-file-text-o'></i>TITLE: "+title+"</a>");
  473 + $("li[id='startTime']").html("<a><i class='fa fa-file-text-o'></i>开播时间: "+time+"</a>");
  474 + //$("#playId").html("<input type='hidden' name='play_url_"+id+"'id='play_url_"+id+"' value='"+live_url+"'/><span class='mailbox-attachment-icon has-img' id='player_span_"+id+"'><img src='../../static/assets/dist/img/photo2.png' alt='Attachment'></span>");
  475 + jwplayer("playId").setup({
  476 + file: live_url,
  477 + height: 260,
  478 + //image: "/assets/myVideo.jpg",
  479 + autostart:true,
  480 + rtmp: {
  481 + bufferlength: 0.1
  482 + },
  483 + width: 370
  484 + });
  485 +
  486 +}
  487 +
... ...