在html中简单的一个播放器 player

来源:互联网 发布:网络通信 编程 python 编辑:程序博客网 时间:2024/06/05 17:14

<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head runat="server">
    <title>player</title>
</head>
<body topmargin="10">
    <form id="form1" runat="server">     
    <span id="lrcContent">
    </span>
        <table border="0" cellpadding="0" cellspacing="0" style="width: 466px; height: 69px;">
            <tr>
                <td style="text-align: center">
                    ${sessionScope.fileNames }
                    <div style="z-index:1; background-color: #ffffff;">
                        <object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"  id="mediaPlayer"
                            height="64" style="width: 361px; margin-right: 6px;">
                            <param name="url" value="${sessionScope.url}"/>
                            <param name="volume"" value="100"/>
                            <param name="playcount" value="1"/>
                            <param name="enablecontextmenu" value="0"/>
                            <param name="enableerrordialogs" value="0"/>
                            <embed width="420" height="360" src="${sessionScope.url}" type="audio/x-pn-realaudio-plugin" controls="ImageWindow" autostart="true">
                            </embed>
                        </object>
                    </div>
                </td>
                <td style="width: 307px; text-align: left;">&nbsp;</td>
            </tr>
            <tr>
                <td valign="top" style="height: 260px;">
                <!-- lrc -->
                </td>
                <td style="width: 307px; height: 19px;"></td>
            </tr>
        </table>
    </form>
</body>
</html>

 

=================================================================================

 

                String url="";
                url=request.getContextPath()+"/void/"+wavID+".wav";

                httpSession.setAttribute("url", url);