搜索引擎的对视频的预览界面设计(调用windows media player)

 编写的jsp界面,实现调用windows media player进行视频的播放

<%@ page language="java" import="java.util.*" import="java.net.URLEncoder"pageEncoding="GBK"%>
<%@ page contentType="text/html;charset=GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String fileID =(String)request.getAttribute("fileID");
String url = (String)request.getAttribute("url");
String downUrl = url;
String videoID = (String)request.getAttribute("videoID");
String title = (String)request.getAttribute("title");
String describe = (String)request.getAttribute("describe");
String author = (String)request.getAttribute("author");
String kind =(String)request.getAttribute("kind");
url = url.substring(0,url.lastIndexOf("/"));
url = url +"/"+ videoID + "." + kind;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <%=url %>
  <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
    <base href="<%=basePath%>">
    <title>My JSP 'ShowDoc.jsp' starting page</title>
    
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">    
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">
 -->
<style type="text/css">
<!--
.STYLE1 {font-family: "宋体"}
-->
</style>
  </head>
<%=url %>
<body οnunlοad=SeeYouLater()>
<form action="close.action?title=<%=title%>" method="post" name="form1">
<input type="hidden" name="time" >
</form>
<script language="JavaScript">
pageOpen = new Date();
function SeeYouLater() {
pageClose = new Date();
minutes = (pageClose.getMinutes() - pageOpen.getMinutes());
seconds = (pageClose.getSeconds() - pageOpen.getSeconds());
time = (seconds + (minutes * 60));
form1.time.value=time;
document.form1.submit();
} 
</script>
  <form >
   <table width="1299" height="593" border="0">
     <tr>
       <td height="129" colspan="2" bgcolor="#66ccff"> </td>
     </tr>
     <tr>
       <td width="1006" height="133" rowspan="4" bgcolor="#ccffff"><object align=middle class=OBJECT classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95  //视频的预览
height=600 id=MediaPlayer width=900 >
         <param name="ShowStatusBar" value="-1">
         <param name="Filename"  value= <%out.println(url); %>>
         <param name="SAMIFilename" value="http://192.168.0.16:8080/resources2/4.smi">
         <param  name="Rate"  value="1">
         <embed type=application/x-oleobject autostart="true"   
codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701
flename=mp src= <%out.println(url); %> width=900 height=600> </embed>
       </object></td>
       <td width="277" bgcolor="#99ffff"><a href="download.action?downFileName=<%=url%>"><img src="pic19864video.jpg" alt="下载文档" /></a></td>
     </tr>
     <tr>
       <td height="98"   bgcolor="#99ffff">标题:<%=title %></td>
     </tr>
     <tr>
       <td height="138" bgcolor="#99ffff">作者:<%=author %></td>
     </tr>
     <tr>
       <td height="138" bgcolor="#99ffff">描述:<%=describe %></td>
     </tr>
   </table>
   <table align="center">
   <td>
   
 </table>
 <br>
    </center>
 </form>
  </body>
</html>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值