📄 movie_player.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030" import="com.blue.web.common.util.*,com.blue.web.common.model.*,com.eline.vod.client.*,com.eline.vod.model.*,com.eline.vod.utils.*"%>
<%
int movieId = StringUtils.getInt(request.getParameter("item"), 0);
int itemIndex = StringUtils.getInt(request.getParameter("index"), 0);
int pageSize = 10;
int pageIndex = itemIndex / pageSize;
int offsetInPage = itemIndex % pageSize;
Movies movies = new Movies();
MovieChapters ch = new MovieChapters();
Movie movie = movies.getMovie(movieId);
Page chapters = null;
if (movie != null) {
// 更新AccessCount
movies.updateAccessCount(movieId);
// 获取chapters
MovieChapterCondition condition = new MovieChapterCondition();
condition.setMovieId(movieId);
int start = pageIndex * pageSize;
chapters = ch.searchMovieChapter(condition, start, pageSize);
}
String streamRootURL = AppSettings.getInstance().getProperty("streamRoot");
String currentURL = SiteUrls2.getInstance().getProperty(SiteUrls2.URL_WND_MOVIEPLAYER);
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=GB18030"><link rel=stylesheet href="<%=request.getContextPath()%>/stylesheet/global.css" type="text/css" />
<style type=text/css>
<!--
.buttonUp { CURSOR: hand; FILTER: alpha(opacity=0) }
.buttonDown { CURSOR: hand; FILTER: alpha(opacity=100) }
-->
</style>
<title>96MOV电影门户 -- 影片播放</title>
<script language="javascript">
<!--
function button_onMouseOut(obj) {
obj.className = "buttonUp";
}
function button_onMouseOver(obj) {
obj.className = "buttonDown";
}
function doPlay() {
var player = document.all["RVOCX"];
player.DoPlay();
}
function doStop() {
var player = document.all["RVOCX"];
player.DoStop();
}
function doPlayPause() {
var player = document.all["RVOCX"];
player.DoPlayPause();
}
function setMute() {
var player = document.all["RVOCX"];
player.SetMute(!player.getMute());
}
function setVolume(act) {
var player = document.all["RVOCX"];
var volume = player.GetVolume();
if (act == "+") {
volume += 5;
if (volume >= 100)
volume = 99;
player.SetVolume(volume);
} else {
volume -= 5;
if (volume < 0)
volume = 0;
player.SetVolume(volume);
}
}
function setFullScreen() {
var player = document.all["RVOCX"];
player.SetFullScreen();
}
//-->
</script>
</head><body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0"><%if (movie == null) { %>
没找到该影片!
<%} else { %>
<table height="350" cellSpacing="0" cellPadding="0" width="650" border="0">
<tr>
<td width="522">
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" bgColor="#000000" border="0">
<tr>
<td width="13" height="24"><img src="<%= request.getContextPath() %>/images/05/img_0-0.gif"></td>
<td background="<%= request.getContextPath() %>/images/05/img_0-1.gif" height="24"></td>
<td width="13" height="24"><img src="<%= request.getContextPath() %>/images/05/img_0-2.gif"></td>
</tr>
<tr>
<td background="<%= request.getContextPath() %>/images/05/img_1-0.gif" height="239"></td>
<td width="496" bgColor="#000000" height="279" rowSpan="2">
<%if (chapters.getItems().size() < offsetInPage) { %>
本影片没有可播放的内容!
<%} else {
MovieChapter chapter = (MovieChapter) chapters.getItems().get(offsetInPage);
%>
<OBJECT id="RVOCX" height="279" width="496" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
VIEWASTEXT>
<PARAM NAME="SRC" VALUE="<%=streamRootURL + chapter.getStreamUrl() %>">
<PARAM NAME="CONTROLS" VALUE="ImageWindow">
<PARAM NAME="CONSOLE" VALUE="Video">
<PARAM NAME="LOOP" VALUE="0">
<PARAM NAME="NUMLOOP" VALUE="0">
<PARAM NAME="CENTER" VALUE="0">
<PARAM NAME="MAINTAINASPECT" VALUE="0">
<PARAM NAME="BACKGROUNDCOLOR" VALUE="#000000">
<embed src="<%=streamRootURL + chapter.getStreamUrl() %>" width="496" height="279" nojava="true" controls="ImageWindow"
console="one" autostart="true">
</OBJECT>
<%} %>
</td>
<td background="<%= request.getContextPath() %>/images/05/img_1-2.gif" height="239"></td>
</tr>
<tr>
<td width="13" height="40"><img src="<%= request.getContextPath() %>/images/05/img_2-0.gif"></td>
<td height="40"><img height="40" src="<%= request.getContextPath() %>/images/05/img_2-2.gif"></td>
</tr>
<tr>
<td width="13" height="15"><img src="<%= request.getContextPath() %>/images/05/img_3-0.gif"></td>
<td background="<%= request.getContextPath() %>/images/05/img_3-1.gif" height="15"></td>
<td height="15"><img src="<%= request.getContextPath() %>/images/05/img_3-2.gif"></td>
</tr>
</table>
</td>
<td width="128">
<table height="100%" cellSpacing="0" cellPadding="0" width="128" border="0">
<tr>
<td height="44"><IMG src="<%= request.getContextPath() %>/images/05/img_0-3.gif"></td>
</tr>
<tr>
<td background="<%= request.getContextPath() %>/images/05/img_1-3.gif" align="center" valign="top">
<table border="0" cellSpacing="2" cellPadding="2" width="110">
<% for (int i = 0; i < chapters.getItems().size(); i ++) {
MovieChapter chapter = (MovieChapter) chapters.getItems().get(i);
%>
<%if (i == offsetInPage) { %>
<tr>
<td style="color: #660000"><%=chapter.getTitle() %></td>
</tr>
<%} else { %>
<tr>
<td><a href="<%=currentURL %>?item=<%=movieId %>&index=<%=i %>" style="color: #660000"><%=chapter.getTitle() %></a></td>
</tr>
<%} %>
<%} %>
</table>
</td>
</tr>
<tr>
<td height="78"><IMG src="<%= request.getContextPath() %>/images/05/img_2-3.gif" useMap="#Pager" border="0"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colSpan="2" height="32">
<table height="32" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="275" height="32" background="<%= request.getContextPath() %>/images/05/img_4-0.gif">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td width="4"><span style="FONT-SIZE:1px"></span></td>
<td width="30"><img src="<%= request.getContextPath() %>/images/05/button_0.gif" class="buttonUp" onclick="window.alert('无效功能')" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)"></td>
<td width="30" vAlign="top"><img src="<%= request.getContextPath() %>/images/05/button_1.gif" class="buttonUp" onclick="doPlay()" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)"></td>
<td width="30" vAlign="top"><img src="<%= request.getContextPath() %>/images/05/button_2.gif" class="buttonUp" onclick="doPlayPause()" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)"></td>
<td vAlign="top" width="30"><img src="<%= request.getContextPath() %>/images/05/button_3.gif" class="buttonUp" onclick="doStop()" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)"></td>
<td width="30"><img src="<%= request.getContextPath() %>/images/05/button_4.gif" class="buttonUp" onclick="window.alert('无效功能')" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)"></td>
<td width="19"><span style="FONT-SIZE:1px"></span></td>
<td width="25"><img src="<%= request.getContextPath() %>/images/05/button_5.gif" class="buttonUp" onclick="setMute()" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)"></td>
<td vAlign="bottom" width="25"><img src="<%= request.getContextPath() %>/images/05/button_6.gif" class="buttonUp" onclick="setVolume('-')" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)"></td>
<td width="20"><span style="FONT-SIZE:1px"></span></td>
<td vAlign="bottom"><img src="<%= request.getContextPath() %>/images/05/button_7.gif" class="buttonUp" onclick="setVolume('+')" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)"></td>
</tr>
</table>
</td>
<td background="<%= request.getContextPath() %>/images/05/img_4-1.gif" height="32">
<table border="0">
<tr>
<td width="20"> </td>
<td>
<OBJECT style="BORDER-RIGHT: thin inset; BORDER-TOP: thin inset; BORDER-LEFT: thin inset; BORDER-BOTTOM: thin inset"
height="18" width="200" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" valign="middle">
<PARAM NAME="AUTOSTART" VALUE="-1">
<PARAM NAME="PREFETCH" VALUE="0">
<PARAM NAME="CONTROLS" VALUE="PositionSlider">
<PARAM NAME="CONSOLE" VALUE="Video">
<PARAM NAME="LOOP" VALUE="0">
<PARAM NAME="NUMLOOP" VALUE="0">
</OBJECT>
</td>
</tr>
</table>
</td>
<td background="<%= request.getContextPath() %>/images/05/img_4-1-1.gif" width="19"><img alt="全屏幕" src="<%= request.getContextPath() %>/images/05/button_8.gif" height="32" class="buttonUp" onclick="setFullScreen()" onmouseover="return button_onMouseOver(this)" onmouseout="return button_onMouseOut(this)" /></td>
<td width="16" height="32"><IMG src="<%= request.getContextPath() %>/images/05/img_4-2.gif"></td>
</tr>
</table>
</td>
</tr>
</table>
<%
String prevUrl = "#", nextUrl = "#";
if (pageIndex > 0)
prevUrl = "?item=" + movieId + "&index=" + ((pageIndex - 1) * pageSize);
if (((pageIndex+1) * pageSize) < chapters.getTotalRecords())
nextUrl = "?item=" + movieId + "&index=" + ((pageIndex + 1) * pageSize);
%>
<map name="Pager">
<area shape="CIRCLE" coords="92,29,9" href="<%=prevUrl %>">
<area shape="CIRCLE" coords="93,52,9" href="<%=nextUrl %>"></map>
<%} %>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -