可以在ie8下播放avi等主流视频,需要插件:
media.player.codec.pack.v4.3.8.setup.exe
点击(此处)折叠或打开
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
-
-
- <%
- String webPath=request.getContextPath();
- String swfFilePath=session.getAttribute("swfpath").toString();
- System.out.println("swfFilePath:"+swfFilePath);
- %>
-
-
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>~视频文档预览页面~</title>
-
-
- <!--超链接样式-->
- <style type="text/css">
- td {
- font-size: 12px;
- font-family: 宋体;
- }
-
-
- a {
- font-family: "宋体";
- font-size: 9pt;
- text-decoration: none
- }
-
-
- .t1 {
- color: #CC0000;
- text-decoration: underline
- }
- </style>
-
-
- </head>
- <body
- style="background-image: url(img/3.jpg); background-position: center; background-repeat: repeat-y">
-
-
- <a href="./jieMaQi/media.player.codec.pack.v4.3.8.setup.exe" class="t1"
- target="_blank">如视频不能播放,点击下载解码器</a>
-
-
- <p style="text-align: center;"><object id="MediaPlayer"
- classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="800"
- height="600" standby="Loading Windows Media Player components…"
- type="application/x-oleobject"
- codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
- <param name="FileName" value="视频地址">
- <param name="AutoStart" value="true">
- <param name="ShowControls" value="true">
- <param name="BufferingTime" value="2">
- <param name="ShowStatusBar" value="true">
- <param name="AutoSize" value="true">
- <param name="InvokeURLs" value="false">
- <param name="AnimationatStart" value="1">
- <param name="TransparentatStart" value="1">
- <param name="Loop" value="1">
- <embed type="application/x-mplayer2" src="<%=swfFilePath %>"
- name="MediaPlayer" autostart="1" showstatusbar="1" showdisplay="1"
- showcontrols="1" loop="0" videoborder3d="0"
- pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
- width="800" height="600"></embed> </object> </object></p>
-
-
- </body>
- </html>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25130668/viewspace-1778311/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25130668/viewspace-1778311/