Edit D:\chineseall_products\bak\digitalLib6\pages\screen\web\horizontal\mediaAudioDetail.jsp
<%@ page contentType="text/html;charset=utf-8"%> <%@ taglib prefix="s" uri="/struts-tags"%> <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <meta charset="utf-8"> <base href="${contextPath}/pages/screen/web/horizontal/"> <link href="css/base.css" type="text/css" rel="stylesheet"> <link href="css/search.css" type="text/css" rel="stylesheet"> <link href="css/pathmenu.css" type="text/css" rel="stylesheet"> <script src="js/jquery-1.12.1.js" type="text/javascript"></script> <script type='text/javascript' src='${contextPath}/dwr/engine.js'></script> <script type='text/javascript' src='${contextPath}/dwr/interface/webDwr.js'></script> <script src="js/nav.js"></script> <script src="js/jquery.movescroll.js"></script> <script type="text/javascript" src="${contextPath}/js/jplayer-2.9.2/jplayer/jquery.jplayer.min.js"></script> <style type="text/css"> .jp-current-time, .jp-duration { color: #FFF; } .jp-current-time { float: left; display:inline; cursor:default; margin-right: 15px; } .jp-duration { float: right; display:inline; text-align: right; cursor:pointer; margin-left: 15px; } .jp-progress { bottom:0px; position:absolute; left:0px; width:100%; height:10px; overflow:hidden; background-color: #333; } .jp-seek-bar { background-color:#555; width:0px; height:100%; cursor: pointer; } .jp-seeking-bg { background-color: #55E; } .jp-play-bar { background-color:orange; width:0px; height:100%; } .jp-play{ display:inline-block; width:30px; height:30px; top:20px; background: url("img/pauseico1.png"); } .jp-state-playing .jp-play{ background: url("img/pauseico.png"); } <s:if test='"0"==showQrcode'> .right_code{display: none;} </s:if> </style> <title>??????-??????</title> </head> <body> <div class="topbar"></div> <!--center--> <div class="bodycenter"> <div class="centerleft book_res_topdetail"> <A class="leftico_bg" href="javascript:history.go(-1);"><img src="img/ico16.png"></A> <s:action namespace="/screen" name="pathMenu" executeResult="true"> <s:param name="pathMainBg" value="'img/ico20.png'"/> <s:param name="customCss" value="'margin-top:186px;'"/> </s:action> <A class="leftico_bg" href="${contextPath}/screen/search.action"><img src="img/ico4.png"></A> </div> <div class="center_content"> <div class="book_detail audio_detail"> <div class="leftimg"> <img src="${contextPath}<s:property value="media.headImage"/>" onerror="this.src='${contextPath}/bookfiles/defaultCover.jpg'" alt="" /> </div> <div class="rightdetail"> <div class="top"> <dl> <dt><s:property value="media.title"/></dt> <dd><s:property value="media.author"/></dd> </dl> <div id="remark" class="bottom" style="overflow: auto;"> <p><s:property value="media.remark"/></p> </div> <div class="right_code"> <img src="${contextPath}/resourceDownloadImg.action?type=2&imgSize=10&objectId=<s:property value='media.id'/>" alt="" /> <div class="ewm_tips">??????????????</div> </div> </div> </div> </div> <div class="clear"></div> <!--?????????--> <div class="video_cataloglist"> <div class="cataloglist_title">???</div> <ul id="catalogList"> <s:iterator value="list" status="status"> <li <s:if test="%{not((#status.count+1)%4==0 || #status.count%4 == 0)}">class="bg"</s:if> id="player_li_${id }"> <div class="chapter"> <a href="javascript:;" onclick="playMediaFile(${id},<s:property value="fileType"/>,'${title }');">${title }</a> </div> <a id="player_a_${id }" href="javascript:;" onclick="playMediaFile(${id},<s:property value="fileType"/>,'${title }');"><img class="playBtn" src="img/pause.png"></a> </li> </s:iterator> </ul> </div> </div> <div class="clear"></div> <!--??????--> <div id="jquery_jplayer_1" class="jp-jplayer" style="display:none;"></div> <div id="jp_container_1" class="jp-audio" role="application" aria-label="media player" style="display:block;"> <div class="jp-type-single"> <div class="jp-gui jp-interface"> <div class="audio_player"> <div class="center_content"> <div class="play"> <a href="javascript:;" onclick="playPrev();"><img src="img/previousbtn.png" alt="" /></a> <a href="javascript:;" class="jp-play"><img src="" alt="" /></a> <a href="javascript:;" onclick="playNext();"><img src="img/nextiousbtn.png" alt="" /></a> </div> <div class="title jp-title" aria-label="title"> </div> <div class="time"><div class="jp-current-time" role="timer" aria-label="time"> </div>/<div class="jp-duration" role="timer" aria-label="duration"> </div></div> </div> <div class="jp-progress"> <div class="jp-seek-bar"> <div class="jp-play-bar"></div> </div> </div> </div> </div> </div> </div> <div style="position:fixed;left:50px;top:50px;display:block;width:auto;height:auto;display:none;" id="swfPlayerContainer"> </div> <!--?????????--> </div> <script type="text/javascript"> if (typeof(document.onselectstart) != "undefined") { // IE???????????? document.onselectstart = new Function("return false"); } //???????????????????? $("#catalogList").movescroll(); $("#remark").movescroll(); var code = ""; try{ code = window.external.fetchCode(); }catch(E){ } webDwr.addBookVisited(<s:property value='media.id'/>); var divId1 = "#jquery_jplayer_1"; var divContainer1 = "#jp_container_1"; var swfPath = "${contextPath}/js/jplayer-2.9.2/jplayer"; var agent = navigator.userAgent.toLowerCase(); var currId; var playTimes = 0; var isPlaying = false; function playAudio(filePath,resname){ $(divId1).jPlayer( "destroy" ); $(divId1).jPlayer({ ready: function () { $(this).jPlayer("setMedia", { title: resname, mp3: filePath }); $(this).jPlayer("play"); }, play: function() { $("#player_a_"+currId+" img").attr("src", "img/play.png"); }, pause: function() { $("#player_a_"+currId+" img").attr("src", "img/pause.png"); }, ended: function () { if($.isFunction(window.playNext)){ playNext(); } }, swfPath: swfPath, supplied: "mp3", wmode: "window", useStateClassSkin: true, autoBlur: false, smoothPlayBar: true, keyEnabled: true, remainingDuration: true, toggleDuration: true }); } function playFile(filePath,fileType,title) { playAudio(filePath,title); } function playMediaFile(fileId,fileType,title){ if(currId) { //????????????????????????? $("#player_a_"+currId+" img").attr("src", "img/pause.png");//pause.png????????????????? if(currId==fileId) { if(isPlaying) { $(divId1).jPlayer("pause"); isPlaying=false; } else { $(divId1).jPlayer("play"); isPlaying = true; } return; } } currId = fileId; $("#player_a_"+currId+" img").attr("src", "img/play.png"); isPlaying = true; var filePath = "${contextPath}/getMediaFile.action?objectId=" + fileId; playFile(filePath,fileType,title); } var playList = "["; var lfileId; var lfileType; var lfileTitle; <s:iterator value="list" status="obj"> lfileId = <s:property value="id"/>; lfileType = <s:property value="fileType"/>; lfileTitle = '<s:property value="title"/>'; <s:if test="#obj.index>0"> playList += ","; </s:if> playList += "{"; playList += "'fileId':" + lfileId + ",'fileType':" + lfileType + ",'fileTitle':'" + lfileTitle + "'"; playList += "}"; </s:iterator> playList += "]"; var arr = eval(playList); var findCurr = false; //???????? function playNext() { findCurr = false; if(!currId) { findCurr = true; } $.each(arr,function(){ if(findCurr) { if($(this)[0].fileType==1 || $(this)[0].fileType==2) { playMediaFile($(this)[0].fileId,$(this)[0].fileType,$(this)[0].fileTitle); return false; } } else { if($(this)[0].fileId==currId) { findCurr = true; } } }); } //???????? function playPrev() { if(!currId) { //????????d,???????? $.each(arr,function(index){ if($(this)[0].fileType==1 || $(this)[0].fileType==2) { playMediaFile($(this)[0].fileId,$(this)[0].fileType,$(this)[0].fileTitle); return false; } }); } else { //??????Id var prevIndex=0; $.each(arr,function(index){ if($(this)[0].fileId==currId) { prevIndex = index; return false; } }); if(prevIndex) { prevIndex = prevIndex - 1; } playMediaFile(arr[prevIndex].fileId,arr[prevIndex].fileType,arr[prevIndex].fileTitle); } } <s:if test="lastMediaFile!=null"> currId = ${lastMediaFile.id}; <s:if test="lastMediaFile.filePath!=null"> playMediaFile(${lastMediaFile.id},<s:property value="lastMediaFile.fileType"/>,'${lastMediaFile.title}'); </s:if> </s:if> <s:else> playPrev(); </s:else> </script> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de